Public API Reference
Formulations
HydroPowerSimulations.HydroCommitmentRunOfRiver — Type
Formulation type to add commitment and injection variables constrained by a maximum injection time series for PowerSystems.HydroGen
HydroPowerSimulations.HydroDispatchRunOfRiver — Type
Formulation type to add injection variables constrained by a maximum injection time series for PowerSystems.HydroGen
HydroPowerSimulations.HydroDispatchRunOfRiverBudget — Type
Formulation type to add injection variables constrained by a maximum injection time series for PowerSystems.HydroGen and a budget
HydroPowerSimulations.HydroEnergyModelReservoir — Type
Formulation type to add reservoir methods with hydro turbines using only energy inflow/outflow variables (no water flow variables) for PowerSystems.HydroReservoir
HydroPowerSimulations.HydroPumpEnergyCommitment — Type
Formulation type to add injection variables for a HydroPumpTurbine only using energy variables (no water flow variables) and commitment variables
HydroPowerSimulations.HydroPumpEnergyDispatch — Type
Formulation type to add injection variables for a HydroPumpTurbine only using energy variables (no water flow variables)
HydroPowerSimulations.HydroTurbineBilinearDispatch — Type
Formulation type to add injection variables for a HydroTurbine connected to reservoirs using a bilinear model (with water flow variables) PowerSystems.HydroGen
HydroPowerSimulations.HydroTurbineEnergyCommitment — Type
Formulation type to add injection variables for a PowerSystems.HydroTurbine only using energy variables (no water flow variables) and commitment variables
HydroPowerSimulations.HydroTurbineEnergyDispatch — Type
Formulation type to add injection variables for a PowerSystems.HydroTurbine only using energy variables (no water flow variables)
HydroPowerSimulations.HydroTurbineWaterLinearDispatch — Type
Formulation type to add injection variables for a HydroTurbine connected to reservoirs using a linear model PowerSystems.HydroGen. The model assumes a shallow reservoir. The head for the conversion between water flow and power can be approximated as a linear function of the water flow on which the head elevation is always the intake elevation.
HydroPowerSimulations.HydroWaterFactorModel — Type
Formulation type to constrain hydropower production with an energy block optimization representation of the energy storage capacity and water inflow time series of a reservoir for PowerSystems.HydroGen
HydroPowerSimulations.HydroWaterModelReservoir — Type
Formulation type to add reservoir methods with hydro turbines using water flow variables for PowerSystems.HydroReservoir
Variables
HydroPowerSimulations.ActivePowerPumpVariable — Type
Struct to dispatch the creation of a variable for pumped power in a hydro pump turbine (in MWh).
HydroPowerSimulations.HydroBalanceShortageVariable — Type
Struct to dispatch the creation of a slack variable for shortage on balance constraints
Docs abbreviation: $e^\text{b,shortage}$
HydroPowerSimulations.HydroBalanceSurplusVariable — Type
Struct to dispatch the creation of a slack variable for surplus on balance constraints
Docs abbreviation: $e^\text{b,surplus}$
HydroPowerSimulations.HydroEnergyOutput — Type
Auxiliary Variable for Hydro Models that solve for total energy output
Docs abbreviation: $E^\text{hy,out}$
HydroPowerSimulations.HydroEnergyShortageVariable — Type
Struct to dispatch the creation of a slack variable for energy storage levels < target storage levels
Docs abbreviation: $e^\text{shortage}$
HydroPowerSimulations.HydroEnergySurplusVariable — Type
Struct to dispatch the creation of a slack variable for energy storage levels > target storage levels
Docs abbreviation: $e^\text{surplus}$
HydroPowerSimulations.HydroReservoirHeadVariable — Type
Aux variable which keeps track of water level (head) of hydro reservoirs (in m)
HydroPowerSimulations.HydroReservoirVolumeVariable — Type
Struct to dispatch the creation of a variable for volume stored in a hydro reservoir (in m3).
HydroPowerSimulations.HydroTurbineFlowRateVariable — Type
Struct to dispatch the creation of a variable for turbined flow rate (in m3/s).
HydroPowerSimulations.HydroWaterShortageVariable — Type
Struct to dispatch the creation of a slack variable for water storage levels < target storage levels
Docs abbreviation: $l^\text{shortage}$
HydroPowerSimulations.HydroWaterSurplusVariable — Type
Struct to dispatch the creation of a slack variable for water storage levels > target storage levels
Docs abbreviation: $l^\text{surplus}$
HydroPowerSimulations.WaterSpillageVariable — Type
Struct to dispatch the creation of energy (water) spillage variable representing energy released from a storage/reservoir not injected into the network
Docs abbreviation: $s$
Parameters
HydroPowerSimulations.EnergyBudgetTimeSeriesParameter — Type
Parameter to define energy budget time series for hydro generators
HydroPowerSimulations.EnergyTargetTimeSeriesParameter — Type
Parameter to define energy storage target level time series for hydro generators
HydroPowerSimulations.HydroUsageLimitParameter — Type
Parameter to define energy usage limit for feedforward
HydroPowerSimulations.InflowTimeSeriesParameter — Type
Parameter to define energy inflow to storage or reservoir time series
HydroPowerSimulations.OutflowTimeSeriesParameter — Type
Parameter to define energy outflow from storage or reservoir time series
HydroPowerSimulations.ReservoirLimitParameter — Type
Parameter to define energy limit for feedforward
HydroPowerSimulations.ReservoirTargetParameter — Type
Parameter to define energy target for feedforward
HydroPowerSimulations.WaterBudgetTimeSeriesParameter — Type
Parameter to define water budget time series for hydro reservoirs. The timeseries must be specified in average water flow in cubic meters per second.
HydroPowerSimulations.WaterLevelBudgetParameter — Type
Parameter to define water usage budget for feedforward
HydroPowerSimulations.WaterTargetTimeSeriesParameter — Type
Parameter to define water storage target level time series for hydro reservoirs. It will depend on the ReservoirDataType specified for the reservoir, and can be head in meters or volume in cubic meters.
Expressions
HydroPowerSimulations.HydroServedReserveDownExpression — Type
Expression for PowerSystems.HydroGen that keep track of served reserve down for energy calculations
HydroPowerSimulations.HydroServedReserveUpExpression — Type
Expression for PowerSystems.HydroGen that keep track of served reserve up for energy calculations
HydroPowerSimulations.TotalHydroFlowRateReservoirIncoming — Type
Expression for PowerSystems.HydroReservoir that keep track of total water flow turbined into a reservoir, from all the upstream turbines connected to it
HydroPowerSimulations.TotalHydroFlowRateReservoirOutgoing — Type
Expression for PowerSystems.HydroReservoir that keep track of total water turbined for a reservoir, from all the downstream turbines connected to it
HydroPowerSimulations.TotalHydroFlowRateTurbineOutgoing — Type
Expression for PowerSystems.HydroGen that keep track of total water turbined for a turbine, coming from multiple reservoirs
HydroPowerSimulations.TotalHydroPowerReservoirIncoming — Type
Expression for `PowerSystems.HydroReservoir that keep track of total power into a reservoir, from all the upstream turbines connected to it
HydroPowerSimulations.TotalHydroPowerReservoirOutgoing — Type
Expression for `PowerSystems.HydroReservoir that keep track of total power out of a reservoir, from all the downstream turbines connected to it
HydroPowerSimulations.TotalSpillageFlowRateReservoirIncoming — Type
Expression for `PowerSystems.HydroReservoir that keep track of total spillage water flow rate into a reservoir, from all the upstream reservoirs connected to it
HydroPowerSimulations.TotalSpillagePowerReservoirIncoming — Type
Expression for `PowerSystems.HydroReservoir that keep track of total spillage power into a reservoir, from all the upstream reservoirs connected to it
Constraints
HydroPowerSimulations.ActivePowerPumpReservationConstraint — Type
Struct to create the constraint that limits the pump power based on the reservoir variable for hydro pump formulations.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[p^\text{pump}_t \le P^\text{max,pump} \cdot (1 - \text{ReservationVariable}_t),\]
HydroPowerSimulations.ActivePowerPumpVariableLimitsConstraint — Type
Struct to create the constraint that limits the pump power for hydro pump formulations.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[p^\text{pump}_t \le \text{ActivePowerTimeSeriesParameter}_t,\]
HydroPowerSimulations.EnergyBudgetConstraint — Type
Struct to create the constraint that limits the budget for reservoir formulations.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[\sum_{t=1}^T p^\text{hy}_t \le \sum_{t=1}^T \text{EnergyBudgetTimeSeriesParameter}_t,\]
HydroPowerSimulations.EnergyCapacityTimeSeriesLimitsConstraint — Type
Struct to create the constraint that limits the pump power for hydro pump formulations.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[e^\text{pump}_t \le \text{EnergyCapacityTimeSeriesParameter}_t,\]
HydroPowerSimulations.EnergyTargetConstraint — Type
Struct to create the constraint that set-up the target for reservoir formulations.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[e_t + e^\text{shortage} + e^\text{surplus} = \text{EnergyTargetTimeSeriesParameter}_t, \quad \forall t \in \{1,\dots, T\}\]
HydroPowerSimulations.FeedForwardWaterLevelBudgetConstraint — Type
Feedforward constraint to limit the water level budget for reservoir formulations.
HydroPowerSimulations.ReservoirHeadToVolumeConstraint — Type
Struct to model the transformation from head to volume constraint
\[v_{t} = h_{t} \text{head_to_volume},\]
HydroPowerSimulations.ReservoirInventoryConstraint — Type
Struct to create the constraint for hydro reservoir storage
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[\ v_{t} = v_{t-1} + \Delta t (f^{UR}_{t-1} - f^{Sp}_{t-1} - f^{Tu}_{t-1})\]
HydroPowerSimulations.ReservoirLevelLimitConstraint — Type
Struct to model reservoir stored volume/head limits
\[h_{t}^{min} \le h_{t} \le h_{t}^{max},\]
HydroPowerSimulations.ReservoirLevelTargetConstraint — Type
Struct to model the final (target) volume/head storage constraint
\[v_{T} = V^\text{target},\]
HydroPowerSimulations.TurbinePowerOutputConstraint — Type
Struct to model turbine power output as a function of head
\[p_{t} = \eta \rho g h_{t} f^{Tu}_{t},\]
HydroPowerSimulations.WaterBudgetConstraint — Type
Struct to create the constraint that limits the budget for reservoir formulations.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[\sum_{t=1}^T f^\text{hy}_t \le \sum_{t=1}^T \text{WaterBudgetTimeSeriesParameter}_t,\]
HydroPowerSimulations.WaterTargetConstraint — Type
Struct to create the constraint that set-up the target for reservoir formulations. It can use head or volume as the storage variable.
For more information check HydroPowerSimulations Formulations.
The specified constraint is formulated as:
\[l_t + l^\text{shortage} + l^\text{surplus} = \text{WaterTargetTimeSeriesParameter}_t, \quad \forall t \in \{1,\dots, T\}\]
Initial Conditions
HydroPowerSimulations.InitialReservoirVolume — Type
Initial condition for volume in reservoir in PowerSystems.HydroReservoir formulations
Feedforwards
HydroPowerSimulations.HydroUsageLimitFeedforward — Type
HydroUsageLimitFeedforward(
component_type::Type{<:PowerSystems.Component},
source::Type{T},
affected_values::Vector{DataType},
meta = CONTAINER_KEY_EMPTY_META
) where {T}Adds a constraint to enforce a maximum usage of hydro energy based on the source value. It is recommended to use the Auxiliary Variable HydroEnergyOutput as Source, affecting the HydroUsageLimitParameter.
Arguments:
component_type::Type{<:PowerSystems.Component}: Specify the type of component on which the Feedforward will be appliedsource::Type{T}: Specify the VariableType, ParameterType or AuxVariableType as the source of values for the Feedforwardaffected_values::Vector{DataType}: Specify the variable on which the hydro limit will be applied using the source values
HydroPowerSimulations.ReservoirLimitFeedforward — Type
ReservoirLimitFeedforward(
component_type::Type{<:PSY.Component},
source::Type{T},
affected_values::Vector{DataType},
number_of_periods::Int,
meta = CONTAINER_KEY_EMPTY_META
) where {T}Adds a constraint to limit the sum of a variable over the number of periods to the source value.
Arguments:
component_type::Type{<:PowerSystems.Component}: Specify the type of component on which the Feedforward will be appliedsource::Type{T}: Specify the VariableType, ParameterType or AuxVariableType as the source of values for the Feedforwardaffected_values::Vector{DataType}: Specify the variable on which the reservoir limit will be applied using the source valuesnumber_of_periods::Int: Specify the total number of periods that are added on which the limits are applied. For example, in a 24-step simulation ifnumber_of_periods = 24, it will add only one constraint over the sum of 24 periods on which the reservoir limit will be applied. Ifnumber_of_periods = 12, it will create two constraints, one for the first 12 steps and one for the 13:24 steps. It is mandatory thatnumber_of_periodscan divide the total number of simulation steps.
HydroPowerSimulations.ReservoirTargetFeedforward — Type
ReservoirTargetFeedforward(
component_type::Type{<:PowerSystems.Component},
source::Type{T},
affected_values::Vector{DataType},
target_period::Int,
penalty_cost::Float64,
meta = CONTAINER_KEY_EMPTY_META
) where {T}Adds a constraint to enforce a minimum reservoir level target with a slack variable associated with a penalty term.
Arguments:
component_type::Type{<:PowerSystems.Component}: Specify the type of component on which the Feedforward will be appliedsource::Type{T}: Specify the VariableType, ParameterType or AuxVariableType as the source of values for the Feedforwardaffected_values::Vector{DataType}: Specify the variable on which the reservoir target will be applied using the source valuestarget_period::Int: Specify the time step at which the reservoir target will be applied.penalty_cost::Float64: Specify the penalty cost for not reaching the desired reservoir target.
HydroPowerSimulations.WaterLevelBudgetFeedforward — Type
WaterLevelBudgetFeedforward(
component_type::Type{<:PowerSystems.Component},
source::Type{T},
affected_values::Vector{DataType},
meta = CONTAINER_KEY_EMPTY_META
) where {T}Adds a constraint to enforce a maximum usage of hydro level volume based on the source value. It is recommended to use the Auxiliary Variable TotalHydroFlowRateReservoirOutgoing as Source, affecting the WaterLevelBudgetParameter.
Arguments:
component_type::Type{<:PowerSystems.Component}: Specify the type of component on which the Feedforward will be appliedsource::Type{T}: Specify the VariableType, ParameterType or AuxVariableType as the source of values for the Feedforwardaffected_values::Vector{DataType}: Specify the variable on which the hydro limit will be applied using the source values