EnergyModelsRenewableProducers.EnergyModelsRenewableProducers
— ModuleMain module for EnergyModelsRenewableProducers.jl
.
This module implements the following types (Nodes) with constraints:
NonDisRes
is a subtype ofSource
and represents a non-dispatchable renewable producer, as wind, solar etc.PumpedHydroStor
is a subtype ofStorage
and represents a regulated pumped hydro storage.HydroStor
is a subtype ofStorage
and represents a regulated hydro storage, that is a standard hydro powerplant without pumps.
EnergyModelsRenewableProducers.HydroStor
— TypeHydroStor{T} <: HydroStorage{T}
A regulated hydropower storage, modelled as a Storage
node. A regulated hydro storage node requires a capacity for the discharge
and does not have a required inflow from the model, except for water inflow from outside the model, although it requires a field input
.
Fields
id
is the name/identifyer of the node.level::EMB.UnionCapacity
are the level parameters of theHydroStor
node. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.discharge::EMB.UnionCapacity
are the discharging parameters of theHydroStor
node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level_init::TimeProfile
is the initial stored energy in the dam.level_inflow::TimeProfile
is the inflow of power per operational period.level_min::TimeProfile
is the minimum fraction of the reservoir capacity that has to remain in theHydroStorage
node.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the inputResource
s. In the case of aHydroStor
, this field can be left out.output::Dict{Resource, Real}
can only contain one entry, the stored resource.data::Vector{Data}
additional data (e.g. for investments). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroStor
— MethodHydroStor(
id::Any,
rate_cap::TimeProfile,
stor_cap::TimeProfile,
level_init::TimeProfile,
level_inflow::TimeProfile,
level_min::TimeProfile,
opex_var::TimeProfile,
opex_fixed::TimeProfile,
stor_res::ResourceCarrier,
input,
output,
Data,
)
Legacy constructor for a regulated hydropower plant without pumping capabilities. This version will be discontinued in the near future and replaced with the new version of HydroStor{StorageBehavior}
in which the parametric input defines the behavior of the hydropower plant. In addition, the introduction of AbstractStorageParameters
allows for an improved description of the individual capacities and OPEX contributions for the storage level
and discharge
capacity.
See the documentation for further information regarding how you can translate your existing model to the new model.
Fields
id
is the name/identifyer of the node.rate_cap::TimeProfile
is the installed installed rate capacity.stor_cap::TimeProfile
is the installed storage capacity in the dam.level_init::TimeProfile
is the initial stored energy in the dam.level_inflow::TimeProfile
is the inflow of power per operational period.level_min::TimeProfile
is the minimum fraction of the reservoir capacity that has to remain in theHydroStorage
node.opex_var::TimeProfile
are the variable operational expenses per GWh produced.opex_fixed::TimeProfile
are the fixed operational costs of the storage caacity.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the stored and used resources. The values in the Dict are ratios describing the energy loss when using the pumps.output::Dict{Resource, Real}
can only contain one entry, the stored resource.data::Array{Data}
additional data (e.g. for investments). This value is conditional through the application of a constructor.
EnergyModelsRenewableProducers.HydroStorage
— TypeAn abstract type for hydro storage nodes, with or without pumping.
EnergyModelsRenewableProducers.NonDisRES
— TypeNonDisRES <: EMB.Source
A non-dispatchable renewable energy source. It extends the existing RefSource
node through including a profile that corresponds to thr production. The profile can have variations on the strategic level.
Fields
id
is the name/identifyer of the node.cap::TimeProfile
is the installed capacity.profile::TimeProfile
is the power production in each operational period as a ratio of the installed capacity at that time.opex_var::TimeProfile
is the variable operating expense per energy unit produced.opex_fixed::TimeProfile
is the fixed operating expense.output::Dict{Resource, Real}
are the generatedResource
s, normally Power.data::Vector{Data}
is the additional data (e.g. for investments). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.PumpedHydroStor
— TypePumpedHydroStor{T} <: HydroStorage{T}
A pumped hydropower storage, modelled as a Storage
node. A pumped hydro storage node allows for storing energy through pumping water into the reservoir. The current implementation is a simplified node in which no lower reservoir is required. Instead, it is assumed that the reservoir has an infinite size.
A pumped hydro storage node requires a capacity for both charge
and discharge
to account for the potential to store energy in the form of potential energy.
Fields
id
is the name/identifyer of the node.charge::EMB.UnionCapacity
are the charging parameters of thePumpedHydroStor
node. Depending on the chosen type, the charge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level::EMB.UnionCapacity
are the level parameters of theHydroStor
node. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.discharge::EMB.UnionCapacity
are the discharging parameters of theHydroStor
node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level_init::TimeProfile
is the initial stored energy in the dam.level_inflow::TimeProfile
is the inflow of power per operational period.level_min::TimeProfile
is the minimum fraction of the reservoir capacity that has to remain in theHydroStorage
node.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the inputResource
s.output::Dict{Resource, Real}
can only contain one entry, the stored resource.data::Vector{Data}
additional data (e.g. for investments). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.PumpedHydroStor
— MethodPumpedHydroStor(
id::Any,
rate_cap::TimeProfile,
stor_cap::TimeProfile,
level_init::TimeProfile,
level_inflow::TimeProfile,
level_min::TimeProfile,
opex_var::TimeProfile,
opex_fixed::TimeProfile,
stor_res::ResourceCarrier,
input,
output,
Data,
)
Legacy constructor for a regulated pumped hydropower storage plant. This version will be discontinued in the near future and replaced with the new version of HydroStor{StorageBehavior}
in which the parametric input defines the behavior of the hydropower plant. In addition, the introduction of AbstractStorageParameters
allows for an improved description of the individual capacities and OPEX contributions for the pump capacity (charge
), storage level
and discharge
capacity.
See the documentation for further information regarding how you can translate your existing model to the new model.
Fields
id
is the name/identifyer of the node.rate_cap::TimeProfile
is the installed installed rate capacity.stor_cap::TimeProfile
is the installed storage capacity in the dam.level_init::TimeProfile
is the initial stored energy in the dam.level_inflow::TimeProfile
is the inflow of power per operational period.level_min::TimeProfile
is the minimum fraction of the reservoir capacity that has to remain in theHydroStorage
node.opex_var::TimeProfile
are the variable operational expenses per GWh produced.opex_var_pump::TimeProfile
are the variable operational expenses per GWh pumped into the storage.opex_fixed::TimeProfile
are the fixed operational costs of the storage caacity.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the stored and used resources. The values in the Dict are ratios describing the energy loss when using the pumps.output::Dict{Resource, Real}
can only contain one entry, the stored resource.data::Array{Data}
additional data (e.g. for investments). This value is conditional through the application of a constructor.
EnergyModelsBase.check_node
— MethodEMB.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]$.
EnergyModelsBase.check_node
— MethodEMB.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}$.
EnergyModelsBase.constraints_capacity
— Methodconstraints_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
— Methodconstraints_flow_in(m, n::HydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)
When n::HydroStor
, the variable :flow_in
is fixed to 0 for all potential inputs.
EnergyModelsBase.constraints_flow_in
— Methodconstraints_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
— MethodEMB.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
.
EnergyModelsBase.create_node
— MethodEMB.create_node(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)
Sets all constraints for the regulated hydro storage node.
EnergyModelsBase.variables_node
— MethodEMB.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.variables_node
— MethodEMB.variables_node(m, 𝒩ⁿᵈʳ::Vector{NonDisRES}, 𝒯, modeltype::EnergyModel)
Create the optimization variable :curtailment
for every NonDisRES node. This method is called from EnergyModelsBase.jl
.
EnergyModelsRenewableProducers.RegHydroStor
— MethodRegHydroStor(
id::Any,
rate_cap::TimeProfile,
stor_cap::TimeProfile,
has_pump::Bool,
level_init::TimeProfile,
level_inflow::TimeProfile,
level_min::TimeProfile,
opex_var::TimeProfile,
opex_fixed::TimeProfile,
stor_res::ResourceCarrier,
input,
output,
Data,
)
Original Legacy constructor for a regulated hydropower storage, with or without pumping capabilities. This version is discontinued starting with Version 0.6.0. resulting in an error It is replaced with the two new types HydroStor
and PumpedHydroStor
to utilize the concept of multiple dispatch instead of logic.
See the documentation for further information regarding how you can translate your existing model to the new model.
Fields
id
is the name/identifyer of the node.rate_cap::TimeProfile
is the installed installed rate capacity.stor_cap::TimeProfile
is the installed storage capacity in the dam.has_pump::Bool
states wheter the stored resource can flow in.level_init::TimeProfile
is the initial stored energy in the dam.level_inflow::TimeProfile
is the inflow of power per operational period.level_min::TimeProfile
is the minimum fraction of the reservoir capacity that has to remain in theHydroStorage
node.opex_var::TimeProfile
are the variable operational expenses per GWh produced.opex_fixed::TimeProfile
are the fixed operational costs of the storage caacity.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the stored and used resources. The values in the Dict are ratios describing the energy loss when using the pumps.output::Dict{Resource, Real}
can only contain one entry, the stored resource.data::Array{Data}
additional data (e.g. for investments). This value is conditional through the application of a constructor.
EnergyModelsRenewableProducers.level_inflow
— Methodlevel_inflow(n::HydroStorage)
level_inflow(n::HydroStorage, t)
Returns the inflow to a node n
of type HydroStorage
either as TimeProfile
or at operational period t
.
EnergyModelsRenewableProducers.level_init
— Methodlevel_init(n::HydroStorage)
level_init(n::HydroStorage, t)
Returns the initial level of a node n
of type HydroStorage
either as TimeProfile
or at operational period t
.
EnergyModelsRenewableProducers.level_min
— Methodlevel_min(n::HydroStorage)
level_min(n::HydroStorage, t)
Returns the minimum level of a node n
of type HydroStorage
either as TimeProfile
or at operational period t
.
EnergyModelsRenewableProducers.opex_var_pump
— Methodopex_var_pump(n::PumpedHydroStor)
opex_var_pump(n::PumpedHydroStor, t)
Returns the variable OPEX of a node n
of type PumpedHydroStor
related to pumping either as TimeProfile
or at operational period t
.
EnergyModelsRenewableProducers.profile
— Methodprofile(n::NonDisRES)
profile(n::NonDisRES, t)
Returns the profile of a node n
of type NonDisRES
either as TimeProfile
or at operational period t
.