Using allocation penalties and control rules to balance sources
Last updated
Last updated
Allocation penalties can be used to balance the use of sources for demands. In the previous exercises the Example 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 'Adding reservoir P and E' scenario and name the new one 'Balanced sources'
Edit the 'Allocation Penalty' attribute ('cost' attribute) of the Reservoir node and change its type to 'PYWR_PARAMETER'
In the JSON tab paste the following JSON code. 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. When the reservoir is between full and empty, the Allocation Penalty is interpolated between 0 and -200.
On the Groundwater Input node, set the max_flow to 0.02 and set the allocation penalty to 50.0. A positive allocation penalty of 50, makes it so the groundwater node is only 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 input node and compare to the Demand with GW; and the simulated_volume of the Reservoir node and compare both to the Adding reservoir P and E.
As you can see the Balanced scenario which is orange, uses the Groundwater source less than the previous scenario. 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