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)[源代码]¶
基类:
objectClass for hydropower constraints and calculations.
- 参数
model (object) --
- __init__(model)[源代码]¶
Initialize the class. Here I define the variables needed and the constraints for the hydropower model.
- 参数
model (object) -- Model container which is a dict-like objective and includes parameters, variables and constraints.
- 返回类型
None
- end_storage_rule(s, m, y)[源代码]¶
Determine storage of reservoir in the terminal hour of each month.
For PCM rolling-horizon windows, the end of one window flows into the start of the next, so we skip the terminal-storage equality (params['skip_end_storage'] = True). The storage upper / lower bounds still apply, so the trajectory stays within [storage_min, storage_max].
- 参数
s (str) -- hydropower plant.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model, or
Nonewhen skipped.- 返回类型
poi.ConstraintIndex
- genflow_up_bound_rule(s, h, m, y)[源代码]¶
Upper bound of generation flow.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- hydro_output_rule(te, h, m, y)[源代码]¶
Bind the generation variable for a hydro plant to its physical output (when isinflow=True) or to its must-run profile (when isinflow=False).
- 参数
te (str) -- Hydro plant tech name.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- inflow_rule(s, h, m, y)[源代码]¶
Define hydrolic connnect between cascade reservoirs, total inflow of downsteam reservoir = natural inflow + upstream outflow from upsteam reservoir(s).
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
Total inflow of reservoir.
- 返回类型
poi.ExprBuilder
- init_storage_rule(s, m, y)[源代码]¶
Determine storage of reservoir in the initial hour of each month.
- 参数
s (str) -- hydropower plant.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- outflow_low_bound_rule(s, h, m, y)[源代码]¶
Lower bound of total outflow.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- outflow_rule(s, h, m, y)[源代码]¶
Total outflow of reservoir is equal to the sum of generation and spillage.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
Total outflow of reservoir.
- 返回类型
poi.ExprBuilder
- outflow_up_bound_rule(s, h, m, y)[源代码]¶
Upper bound of total outflow.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- output_calc_rule(s, h, m, y)[源代码]¶
Hydropower production calculation. Head parameter is specified after building the model.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- output_low_bound_rule(s, h, m, y)[源代码]¶
Lower bound of hydropower output.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- output_up_bound_rule(s, h, m, y)[源代码]¶
Upper bound of hydropower output.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex
- storage_low_bound_rule(s, h, m, y)[源代码]¶
Lower bound of reservoir storage.
- 参数
s (str) -- hydropower plant.
h (int) -- Hour.
m (int) -- Month.
y (int) -- Year.
- 返回
The constraint of the model.
- 返回类型
poi.ConstraintIndex