Additional exercises using allocation penalties and control rules
Last updated
Last updated
Allocation penalties can be used to balance the use of sources for demands. In the previous exercises the Mosetse reservoir had a static Allocation Penalty of -200.
Parameters can be used to make this Allocation Penalty vary based on real-time storage of the reservoir. This can be done with an Interpolated Volume Parameter. Once the Allocation Penalty of the reservoir is made dynamic, it can be used with the allocation penalties of other sources to balance source use.
Clone the 'Mosetse with P and E' scenario and name the new one 'Balanced sources'
Edit the 'Allocation Penalty' attribute of the Reservoir node and change its type to 'PYWR_PARAMETER'
In the JSON tab paste the following JSON. This Interpolated Volume Parameter assigns a 0 Allocation Penalty to the reservoir when it is full, and a -200 Allocation penalty when it is empty. For Storages inbetween the Allocation Penalty is interpolated between 0 and -200.
On the Goundwater Input node, set the allocation penalty to 10.0. A positive allocation penalty of 50, makes it so the groundwater node is ony used when the reservoir has an allocation penalty of less than -50, which is when it is 75% full. This means when the Reservoir is almost full, groundwater will not be used. Only once the reservoir draws down sufficiently, will the groundwater node begin to supply water to the demand.
Run the model and view the simulated_flow of the groundwater node and the simulated_volume of the Resevoir node and compare both to the
As you can see the Balanced scenario which is orange, uses the Groundwater source less than the previous scenario. The reservoir volume goes to a lower level in this scenario, however there is less pressure put on the Groundwater resources. If the groundwater node has a limited licence, this is a way to preserve the licence volume. This will be shown in another tutorial.
Hint: You can see the simulated allocation penalty is you tick the time-series output of the Allocation Penalty Pywr_Parameter. At the moment the simulated penalty is called simulated_cost on the reservoir