Public interface
Module
EnergyModelsRenewableProducers — ModuleMain module for EnergyModelsRenewableProducers.jl.
This module implements the following types (Nodes) with constraints:
NonDisResis a subtype ofSourceand represents a non-dispatchable renewable producer, as wind, solar etc.PumpedHydroStoris a subtype ofStorageand represents a regulated pumped hydro storage.HydroStoris a subtype ofStorageand represents a regulated hydro storage, that is a standard hydro powerplant without pumps.HydroReservoiris a subtype ofStorageand represents a hydro storage for cascaded hydro power systems.HydroGeneratoris a subtype ofNetworkand represents a hydro generator for cascaded hydro power systems.HydroPumpis a subtype ofNetworkand represents a hydro pump for cascaded hydro power systems.HydroGateis a subtype ofNetworkand 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.SourceAbstract 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
idis the name/identifyer of the node.charge::EMB.UnionCapacityare the charging parameters of theBatteryStoragenode. Depending on the chosen type, the charge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level::EMB.UnionCapacityare the level parameters of theBatteryStoragenode. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.discharge::EMB.UnionCapacityare the discharging parameters of theBatteryStoragenode. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.stor_res::ResourceCarrieris the storedResource.input::Dict{Resource, Real}are the inputResources with corresponding efficiency value.output::Dict{Resource, Real}are the outputResources with corresponding efficiency value.battery_life::AbstractBatteryLifeis used for calculating the maximum battery lifetime and corresponding degradation of the Battery.data::Vector{Data}additional data (e.g., for investments). The fielddatais 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
idis the name/identifyer of the node.charge::EMB.UnionCapacityare the charging parameters of theBatteryStoragenode. Depending on the chosen type, the charge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level::EMB.UnionCapacityare the level parameters of theBatteryStoragenode. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.discharge::EMB.UnionCapacityare the discharging parameters of theBatteryStoragenode. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.stor_res::ResourceCarrieris the storedResource.input::Dict{Resource, Real}are the inputResources with corresponding efficiency value.output::Dict{Resource, Real}are the outputResources with corresponding efficiency value.battery_life::AbstractBatteryLifeis used for calculating the maximum battery lifetime and corresponding degradation of the Battery.reserve_up::Vector{ResourceCarrier}are theResources used as reserve for providing energy to the system.reserve_down::Vector{ResourceCarrier}are theResources used as reserve for removing energy from the system.data::Vector{Data}additional data (e.g., for investments). The fielddatais conditional through usage of a constructor.
EnergyModelsRenewableProducers.NonDisRES — TypeNonDisRES <: AbstractNonDisRESA 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
idis the name/identifyer of the node.cap::TimeProfileis the installed capacity.profile::TimeProfileis the power production in each operational period as a ratio of the installed capacity at that time.opex_var::TimeProfileis the variable operating expense per energy unit produced.opex_fixed::TimeProfileis the fixed operating expense.output::Dict{Resource, Real}are the generatedResources, normally Power.data::Vector{Data}is the additional data (e.g., for investments). The fielddatais 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
idis the name/identifyer of the node.level::EMB.UnionCapacityare the level parameters of theHydroStornode. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.discharge::EMB.UnionCapacityare the discharging parameters of theHydroStornode. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level_init::TimeProfileis the initial stored energy in the dam.level_inflow::TimeProfileis the inflow of power per operational period.level_min::TimeProfileis the minimum fraction of the reservoir capacity that has to remain in theHydroStoragenode.stor_res::ResourceCarrieris the storedResource.input::Dict{Resource, Real}are the inputResources. 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 fielddatais 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
idis the name/identifyer of the node.charge::EMB.UnionCapacityare the charging parameters of thePumpedHydroStornode. Depending on the chosen type, the charge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level::EMB.UnionCapacityare the level parameters of thePumpedHydroStornode. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.discharge::EMB.UnionCapacityare the discharging parameters of thePumpedHydroStornode. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.level_init::TimeProfileis the initial stored energy in the dam.level_inflow::TimeProfileis the inflow of power per operational period.level_min::TimeProfileis the minimum fraction of the reservoir capacity that has to remain in theHydroStoragenode.stor_res::ResourceCarrieris the storedResource.input::Dict{Resource, Real}are the inputResources.output::Dict{Resource, Real}can only contain one entry, the stored resource.data::Vector{Data}additional data (e.g., for investments). The fielddatais 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
idis the name/identifyer of the node.vol::EMB.UnionCapacityare the storage volume parameters of theHydroReservoirnode (typically million cubic meters).vol_inflow::TimeProfileis the water inflow to the reservoir (typically million cubic per time unit).stor_res::ResourceCarrieris the storedResource.data::Vector{<:Data}is the additional data (e.g., for investments or constraints throughAbstractScheduleType). The fielddatais conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroGenerator — TypeHydroGenerator <: HydroUnitA hydropower generator, modelled as a HydroUnit node.
A hydropower generator is located between two HydroReservoirs 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
idis the name/identifier of the node.cap::TimeProfileis the installed discharge or power capacity.- **
pq_curve::AbstractPqCurvedescribes the relationship between power and discharge (water). opex_var::TimeProfileis the variable operational costs per energy unit produced.opex_fixed::TimeProfileis the fixed operational costs.electricity_resource::Resourceis the electricity resource generated as output.water_resource::Resourceis 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 fielddatais conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroPump — TypeHydroPump <: HydroUnitA hydropower pump, modelled as a HydroUnit node.
A hydropower pump is located between two HydroReservoirs and allows the transfer of water from one reservoir to the other through pumping the water.
Fields
idis the name/identifier of the node.cap::TimeProfileis the installed pumping capacity in piwer or volume per time unit.- **
pq_curve::AbstractPqCurvedescribes the relationship between power and pumping of water. opex_var::TimeProfileis the variable operational costs per energy unit produced.opex_fixed::TimeProfileis the fixed operational costs.electricity_resource::Resourceis the electricity resource taken as input (consumed).water_resource::Resourceis 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 fielddatais conditional through usage of a constructor.
EnergyModelsRenewableProducers.HydroGate — TypeHydroGate <: EMB.NetworkNodeA 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
idis the name/identifier of the node.cap::TimeProfileis the installed discharge capacity.opex_var::TimeProfileis the variational operational costs per water flow through the gate.opex_fixed::TimeProfileis the fixed operational costs.resource::ResourceCarrieris 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 fielddatais 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
idis the name/identifyer of the node.rate_cap::TimeProfileis the installed installed rate capacity.stor_cap::TimeProfileis the installed storage capacity in the dam.has_pump::Boolstates wheter the stored resource can flow in.level_init::TimeProfileis the initial stored energy in the dam.level_inflow::TimeProfileis the inflow of power per operational period.level_min::TimeProfileis the minimum fraction of the reservoir capacity that has to remain in theHydroStoragenode.opex_var::TimeProfileare the variable operational expenses per GWh produced.opex_fixed::TimeProfileare the fixed operational costs of the storage caacity.stor_res::ResourceCarrieris 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 <: AbstractBatteryLifeA life type corresponding to an infinite number of cycles without any battery degradation. The charge utilization is still calculated.
EnergyModelsRenewableProducers.CycleLife — TypeCycleLife <: AbstractBatteryLifeA life type corresponding to a linear degradation of the battery lifetime up to a given number of cycles.
Fields
cycles::Intis the number of cycles that the battery can tolerate.degradation::Float64is the relative allowed capacity reduction at the end of life of the battery.stack_cost::TimeProfileis the relative cost for replacing a battery stack once it reached its maximum number of cycles.
Constraint types
EnergyModelsRenewableProducers.MinSchedule — Typeabstract type MinSchedule <: AbstractScheduleTypeAbstract type used to define a ScheduleConstraint as a minimum constraint.
EnergyModelsRenewableProducers.MaxSchedule — Typeabstract type MaxSchedule <: AbstractScheduleTypeAbstract type used to define a ScheduleConstraint as a maximum constraint.
EnergyModelsRenewableProducers.EqualSchedule — Typeabstract type EqualSchedule <: AbstractScheduleTypeAbstract 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::TimeProfileis the constraint value, that is the limit that should not be violated.flag::TimeProfileis a boolean value indicating if the constraint is active.penalty::TimeProfileis the penalty for violating the constraint. If penalty is set toInfit 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.