Parameters
An overview of Pywr parmeters supported by WaterStrategy
Paramters are functions that return a value in the model at each time-step. These values can be a constant, based on time (e.g., on the day or month), a calculation based on the time step's reservoir storage and many other calculations. Custom parameter can also be written in Python.
This page describes (most of) the parameter types supported by Pywr. An overview of parameters in Pywr can be found here. The full list of built-in Pywr parameters are found here.
1. Creating a Parameter
In a Network, click the 'Parameters' Tab:
Next to the 'Parameters-Type Categories' section, click the '+' button and select 'PYWR_PARAMETER'.
A text-input will appear. Enter the name of your parameter:
Modify the parameter as required in the JSON editor provided:
2. Parameter editors in WaterStrategy
To make parameter modifications simpler, WaterStrategy offers editors for commonly used Parameters, such as Monthly Profile parameters, with pre-populated default values, and graphical editors to make entering of data simpler.
Example parameter editor
In the Parameters Tab, when adding a new Parameter, select 'PYWR_PARAMETER_MONTHLY_PROFILE' as shown:
Note that the edior which appears will show a JSON tab, but also a Plot and Table tab. Modifying the data in the table will automaticall update the data in the JSON as shown:
These changes automatically update the JSON:
Last updated