Methods - EnergyModelsBase
Index
EnergyModelsBase.check_node
EnergyModelsBase.constraints_capacity
EnergyModelsBase.constraints_flow_in
EnergyModelsBase.constraints_level_aux
EnergyModelsBase.create_node
EnergyModelsBase.variables_node
Extension methods
EnergyModelsBase.variables_node
— FunctionEMB.variables_node(m, 𝒩ⁿᵈʳ::Vector{NonDisRES}, 𝒯, modeltype::EnergyModel)
Create the optimization variable :curtailment
for every NonDisRES node. This method is called from EnergyModelsBase.jl
.
EMB.variables_node(m, 𝒩::Vector{<:HydroStorage}, 𝒯, modeltype::EnergyModel)
Create the optimization variable :hydro_spill
for every HydroStorage node. This variable enables hydro storage nodes to spill water from the reservoir without producing energy. Wihtout this slack variable, parameters with too much inflow would else lead to an infeasible model.
EnergyModelsBase.create_node
— FunctionEMB.create_node(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)
Sets all constraints for the regulated hydro storage node.
Constraint methods
EnergyModelsBase.constraints_capacity
— Functionconstraints_capacity(m, n::NonDisRES, 𝒯::TimeStructure, modeltype::EnergyModel)
Function for creating the constraint on the maximum capacity of a NonDisRES
. Also sets the constraint defining curtailment.
EnergyModelsBase.constraints_flow_in
— Functionconstraints_flow_in(m, n::HydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)
When n::HydroStor
, the variable :flow_in
is fixed to 0 for all potential inputs.
constraints_flow_in(m, n::PumpedHydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)
When n::PumpedHydroStor
, the variable :flow_in
is multiplied with the inputs
value to calculate the variable :stor_charge_use
.
EnergyModelsBase.constraints_level_aux
— FunctionEMB.constraints_level_aux(m, n::HydroStorage, 𝒯, 𝒫, modeltype)
Function for creating the Δ constraint for the level of a HydroStorage
node as well as the specification of the initial level in a strategic period.
The change in storage level in the reservoir at operational periods t
is the inflow through :level_inflow
plus the input :stor_charge_use
minus the production :stor_discharge_use
and the spillage of water due to overflow :hydro_spill
.
Check methods
EnergyModelsBase.check_node
— FunctionEMB.check_node(n::NonDisRES, 𝒯, modeltype::EMB.EnergyModel, check_timeprofiles::Bool)
This method checks that the NonDisRES
node is valid.
Checks
- The field
cap
is required to be non-negative (similar to theSource
check). - The value of the field
fixed_opex
is required to be non-negative and accessible through aStrategicPeriod
as outlined in the functioncheck_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles)
. - The values of the dictionary
output
are required to be non-negative (similar to theSource
check). - The field
profile
is required to be in the range $[0, 1]$ for all time steps $t ∈ \mathcal{T}$.
EMB.check_node(n::HydroStorage, 𝒯, modeltype::EMB.EnergyModel, check_timeprofiles::Bool)
This method checks that the HydroStorage
node is valid.
Checks
- The
TimeProfile
of the fieldcapacity
in the type in the fieldcharge
is required to be non-negative if the chosen composite type has the fieldcapacity
. - The
TimeProfile
of the fieldcapacity
in the type in the fieldlevel
is required to be non-negative`. - The
TimeProfile
of the fieldcapacity
in the type in the fielddischarge
is required to be non-negative if the chosen composite type has the fieldcapacity
. - The
TimeProfile
of the fieldfixed_opex
is required to be non-negative and accessible through aStrategicPeriod
as outlined in the functioncheck_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles)
for the chosen composite type . - The field
output
can only include a singleResource
. - The value of the field
output
is required to be smaller or equal to 1. - The value of the field
input
is required to be in the range $[0, 1]$. - The value of the field
level_init
is required to be in the range $[level\_min, 1] \cdot stor\_cap(t)$ for all time steps $t ∈ \mathcal{T}$. - The value of the field
level_init
is required to be in the range $[0, 1]$. - The value of the field
level_min
is required to be in the range $[0, 1]$.