Public interface
Module
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.HydroReservoir
is a subtype ofStorage
and represents a hydro storage for cascaded hydro power systems.HydroGenerator
is a subtype ofNetwork
and represents a hydro generator for cascaded hydro power systems.HydroPump
is a subtype ofNetwork
and represents a hydro pump for cascaded hydro power systems.HydroGate
is a subtype ofNetwork
and represents a gate for cascaded hydro power systems.
Node types
Abstract types
EnergyModelsRenewableProducers.HydroStorage
— TypeAn abstract type for hydro storage nodes, with or without pumping.
EnergyModelsRenewableProducers.AbstractNonDisRES
— Typeabstract type AbstractNonDisRES <: EMB.Source
Abstract supertype for all non-dispatchable renewable energy source. All functions for the implemented version of the NonDisRES
are dispatching on this supertype.
EnergyModelsRenewableProducers.AbstractBattery
— TypeAbstractBattery{T} <: EMB.Storage{T}
Abstract supertype for the different battery storage models.
Concrete types
EnergyModelsRenewableProducers.Battery
— TypeBattery{T} <: AbstractBattery{T}
A battery storage, modelled as a Storage
node. A battery storage nodes differs from a RefStorage
node through:
- incorporating a discharge capacity,
- including charge and discharge efficiencies, and
- allow for the introduction of battery degradation and lifetime reduction.
- The discharge and charge capacities are independent of each other.
- The values for the charge and discharge efficiencies must be smaller than 1.
Fields
id
is the name/identifyer of the node.charge::EMB.UnionCapacity
are the charging parameters of theBatteryStorage
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 theBatteryStorage
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 theBatteryStorage
node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the inputResource
s with corresponding efficiency value.output::Dict{Resource, Real}
are the outputResource
s with corresponding efficiency value.battery_life::AbstractBatteryLife
is used for calculating the maximum battery lifetime and corresponding degradation of the Battery.data::Vector{Data}
additional data (e.g., for investments). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.ReserveBattery
— TypeReserveBattery{T} <: AbstractBattery{T}
A reserve battery storage, modelled as a Storage
node. A battery storage nodes differs from a Battery
node through allowing for the introduction of both upwards and downwards reserves.
- The discharge and charge capacities are independent of each other.
- The values for the charge and discharge efficiencies must be smaller than 1.
- The upwards and downwards reserves are implemented as resources leaving the battery. It is hence important to also provide a potential sink which determines the total reserve required in the system.
Fields
id
is the name/identifyer of the node.charge::EMB.UnionCapacity
are the charging parameters of theBatteryStorage
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 theBatteryStorage
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 theBatteryStorage
node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.stor_res::ResourceCarrier
is the storedResource
.input::Dict{Resource, Real}
are the inputResource
s with corresponding efficiency value.output::Dict{Resource, Real}
are the outputResource
s with corresponding efficiency value.battery_life::AbstractBatteryLife
is used for calculating the maximum battery lifetime and corresponding degradation of the Battery.reserve_up::Vector{ResourceCarrier}
are theResource
s used as reserve for providing energy to the system.reserve_down::Vector{ResourceCarrier}
are theResource
s used as reserve for removing energy from the system.data::Vector{Data}
additional data (e.g., for investments). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.NonDisRES
— TypeNonDisRES <: AbstractNonDisRES
A non-dispatchable renewable energy source. It extends the existing RefSource
node through including a profile that corresponds to the 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.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.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 thePumpedHydroStor
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 thePumpedHydroStor
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.HydroReservoir
— TypeHydroReservoir{T} <: EMB.Storage{T}
A regulated hydropower reservoir, modelled as a Storage
node.
A HydroReservoir
differs from HydroStor
andPumpedHydroStor
nodes as it models the stored energy in the form of water through the potential energy. It can only be used in conjunction with HydroGenerator
nodes.
Fields
id
is the name/identifyer of the node.vol::EMB.UnionCapacity
are the storage volume parameters of theHydroReservoir
node (typically million cubic meters).vol_inflow::TimeProfile
is the water inflow to the reservoir (typically million cubic per time unit).stor_res::ResourceCarrier
is the storedResource
.data::Vector{<:Data}
is the additional data (e.g., for investments or constraints throughAbstractScheduleType
). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroGenerator
— TypeHydroGenerator <: HydroUnit
A hydropower generator, modelled as a HydroUnit
node.
A hydropower generator is located between two HydroReservoir
s or between a HydroReservoir
and a Sink
node corresponding to the ocean. It differs from a HydroGate
as it allows for power generation desctibed through an AbstractPqCurve
.
Fields
id
is the name/identifier of the node.cap::TimeProfile
is the installed discharge or power capacity.- **
pq_curve::AbstractPqCurve
describes the relationship between power and discharge (water). opex_var::TimeProfile
is the variable operational costs per energy unit produced.opex_fixed::TimeProfile
is the fixed operational costs.electricity_resource::Resource
is the electricity resource generated as output.water_resource::Resource
is the water resource taken as input and discharged as output.data::Vector{<:Data}
is the additional data (e.g., for investments or constraints throughAbstractScheduleType
). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroPump
— TypeHydroPump <: HydroUnit
A hydropower pump, modelled as a HydroUnit
node.
A hydropower pump is located between two HydroReservoir
s and allows the transfer of water from one reservoir to the other through pumping the water.
Fields
id
is the name/identifier of the node.cap::TimeProfile
is the installed pumping capacity in piwer or volume per time unit.- **
pq_curve::AbstractPqCurve
describes the relationship between power and pumping of water. opex_var::TimeProfile
is the variable operational costs per energy unit produced.opex_fixed::TimeProfile
is the fixed operational costs.electricity_resource::Resource
is the electricity resource taken as input (consumed).water_resource::Resource
is the water resource taken as input and discharged (pumped) as output.data::Vector{<:Data}
is the additional data (e.g., for investments or constraints throughAbstractScheduleType
). The fielddata
is conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroGate
— TypeHydroGate <: EMB.NetworkNode
A hydro gate, modelled as a NetworkNode
node.
It an be used to model outlets/inlets and minimum/maximum requirements for water flow between individual reservoirs without power generation.
Fields
id
is the name/identifier of the node.cap::TimeProfile
is the installed discharge capacity.opex_var::TimeProfile
is the variational operational costs per water flow through the gate.opex_fixed::TimeProfile
is the fixed operational costs.resource::ResourceCarrier
is the water resource type since gates are only used for discharging water.data::Vector{<:Data}
is the additional data (e.g., for investments or constraints throughAbstractScheduleType
). The fielddata
is conditional through usage of a constructor.
Legacy constructors
EnergyModelsRenewableProducers.RegHydroStor
— FunctionRegHydroStor(
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.
Additional types
Providing a battery lifetime
The battery nodes can have either an infinity lifetime or a finite lifetime in which the capacity is reduced due to charging the battery. In this case, the lifetime is given by the number of cycles.
EnergyModelsRenewableProducers.InfLife
— TypeInfLife <: AbstractBatteryLife
A life type corresponding to an infinite number of cycles without any battery degradation. The charge utilization is still calculated.
EnergyModelsRenewableProducers.CycleLife
— TypeCycleLife <: AbstractBatteryLife
A life type corresponding to a linear degradation of the battery lifetime up to a given number of cycles.
Fields
cycles::Int
is the number of cycles that the battery can tolerate.degradation::Float64
is the relative allowed capacity reduction at the end of life of the battery.stack_cost::TimeProfile
is the relative cost for replacing a battery stack once it reached its maximum number of cycles.
Constraint types
EnergyModelsRenewableProducers.MinSchedule
— Typeabstract type MinSchedule <: AbstractScheduleType
Abstract type used to define a ScheduleConstraint
as a minimum constraint.
EnergyModelsRenewableProducers.MaxSchedule
— Typeabstract type MaxSchedule <: AbstractScheduleType
Abstract type used to define a ScheduleConstraint
as a maximum constraint.
EnergyModelsRenewableProducers.EqualSchedule
— Typeabstract type EqualSchedule <: AbstractScheduleType
Abstract type used to define a ScheduleConstraint
as a schedule constraint.
EnergyModelsRenewableProducers.ScheduleConstraint
— TypeScheduleConstraint{T} <: Data where {T<:AbstractScheduleType}
A constraint that can be added as Data
. T <: AbstractScheduleType
denotes the constraint type.
Fields
resource::{Union{<:Resource, Nothing}}
is the resource type the constraint applies to if the node can have multiple resources as input/outputs.value::TimeProfile
is the constraint value, that is the limit that should not be violated.flag::TimeProfile
is a boolean value indicating if the constraint is active.penalty::TimeProfile
is the penalty for violating the constraint. If penalty is set toInf
it will be built as a hard constraint.
Power-flow curves
EnergyModelsRenewableProducers.PqPoints
— Typestruct PqPoints <: AbstractPqCurve
PqPoints(power_levels::Vector{Real}, discharge_levels::Vector{Real})
PqPoints(eq::Real)
The relationship between discharge/pumping of water and power generation/consumption represented by a set of discharge and power values (PQ-points).
Fields
power_levels::Vector{Real}
is a vector of power values.discharge_levels::Vector{Real}
is a vector of discharge values.
The two vectors muct be of equal size and ordered so that the power and discharge values describes the conversion from energy (stored in the water) to electricity (power) for a HydroGenerator
node or the conversion from electric energy to energy stored as water in the reservoirs for a HydroPump
node.
The first value in each vector should be zero. Furthermore, the vectors should be relative to the installed capacity, so that either the power-vector or the discharge vector is in the range [0, 1].
If a single Real
is provided as input, it constructs the two Arrays through the energy equivalent input. If this approach is used, the installed capacity of the node must refer to the power capacity of a HydroGenerator
or HydroPump
node.
The described power-discharge relationship should be concave for a HydroGenerator
node and convex for a HydroPump
node.