hydro¶
This module contains functions related to hydropower technologies.
Water balance of reservoirs.
Similar to the storage technologies, changes in reservoir storage (\({\rm{storage}}_{s,h,m,y}^{\rm{reservoir}}\)) in two successive periods should be balanced by total inflow (\({\rm{inflow}}_{s,h,m,y}^{\rm{total}}\)) and total outflow (\({\rm{outflow}}_{s,h,m,y}^{\rm{total}}\)):
Here \({\rm{inflow}}_{s,h,m,y}^{\rm{total}}\) consists of two parts: the total outflow received from all immediate upstream reservoirs (\(\sum_{{\rm{su}}\in{\mathcal{IU}}_s}{{\rm{outflow}}_ {{\rm{su}},h-\tau_{{\rm{su}},s},m,y}^{\rm{total}}}\)) and the net inflow (also called incremental inflow) of the drainage area controlled by this hydropower reservoir (\({{\rm{INFLOW}}}_{s,h,m,y}^{\rm{net}}\)), which can be expressed as follows:
Note that PREP-SHOT assumes a constant water travel (or propagation) time (\({\tau}_{{\rm{su}},s}\)). The total outflow of each reservoir consists of three parts: upstream water withdrawal (i.e., water used for non-hydro purposes such as agriculture irrigation and urban water supply) (\({\rm{outflow}}_{s,h,m,y}^{\rm{withdraw}}\)), generation flow (i.e., water flow through the turbines of the hydropower plant) (\({\rm{outflow}}_{s,h,m,y}^{\rm{gen}}\)) and spillage flow (i.e., water spilled over the spillways) (\({\rm{outflow}}_{s,h,m,y}^{\rm{spillage}}\)):
Reservoir outflow
The generation flow and spillage flow of the reservoir are limited by the maximum outflow capacity of turbines (\({\rm{OUTFLOW}}_s^{\rm{gen}}\)) and spillway (\({\rm{OUTFLOW}}_s^{\rm{spillage}}\)), respectively. The sum of these two parts also needs to meet the minimum outflow required (\({{\rm{OUTFLOW}}}_s\)) for other purposes (e.g., ecological flow, shipping flow). These constraints are summarized as:
Reservoir storage
The initial (when \(h=h_{\rm{start}}\)) and terminal (when \(h=h_{\rm{end}}\)) storage (\({\rm{storage}}_{s,h=h_{\rm{start}},m,y}^{\rm{reservoir}}\) and \({\rm{storage}}_{s,h=h_{\rm{end}},m,y}^{\rm{reservoir}}\)) of hydropower reservoir in each month of each year should be assigned as:
The reservoir storage is bounded between the maximum (\({\overline{{\rm{STORAGE}}}}_s^{\rm{reservoir}}\)) and minimum storage (\({\underline{{\rm{STORAGE}}}}_s^{\rm{reservoir}}\)) depending on the functions (e.g., flood control, recreation, and water supply) of the reservoir:
- class prepshot._model.hydro.AddHydropowerConstraints(model)[source]¶
Bases:
object
Class for hydropower constraints and calculations.
- Parameters
model (object) --
- __init__(model)[source]¶
Initialize the class. Here I define the variables needed and the constraints for the hydropower model.
- Parameters
model (object) -- Model container which is a dict-like objective and includes parameters, variables and constraints.
- Return type
None
- end_storage_rule(s, m, y)[source]¶
Determine storage of reservoir in the terminal hour of each month.
- Parameters
s (str) -- hydropower plant.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- genflow_up_bound_rule(s, h, m, y)[source]¶
Upper bound of generation flow.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- hydro_output_rule(h, m, y, z)[source]¶
Hydropower output of all hydropower plants across each zone.
- Parameters
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
z (str) -- Zone.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- inflow_rule(s, h, m, y)[source]¶
Define hydrolic connnect between cascade reservoirs, total inflow of downsteam reservoir = natural inflow + upstream outflow from upsteam reservoir(s).
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
Total inflow of reservoir.
- Return type
poi.ExprBuilder
- init_storage_rule(s, m, y)[source]¶
Determine storage of reservoir in the initial hour of each month.
- Parameters
s (str) -- hydropower plant.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- outflow_low_bound_rule(s, h, m, y)[source]¶
Lower bound of total outflow.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- outflow_rule(s, h, m, y)[source]¶
Total outflow of reservoir is equal to the sum of generation and spillage.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
Total outflow of reservoir.
- Return type
poi.ExprBuilder
- outflow_up_bound_rule(s, h, m, y)[source]¶
Upper bound of total outflow.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- output_calc_rule(s, h, m, y)[source]¶
Hydropower production calculation. Head parameter is specified after building the model.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- output_low_bound_rule(s, h, m, y)[source]¶
Lower bound of hydropower output.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- output_up_bound_rule(s, h, m, y)[source]¶
Upper bound of hydropower output.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex
- storage_low_bound_rule(s, h, m, y)[source]¶
Lower bound of reservoir storage.
- Parameters
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- Returns
The constraint of the model.
- Return type
poi.ConstraintIndex