Public interface

Module

EnergyModelsRenewableProducersModule

Main module for EnergyModelsRenewableProducers.jl.

This module implements the following types (Nodes) with constraints:

  • NonDisRes is a subtype of Source and represents a non-dispatchable renewable producer, as wind, solar etc.
  • PumpedHydroStor is a subtype of Storage and represents a regulated pumped hydro storage.
  • HydroStor is a subtype of Storage and represents a regulated hydro storage, that is a standard hydro powerplant without pumps.
  • HydroReservoir is a subtype of Storage and represents a hydro storage for cascaded hydro power systems.
  • HydroGenerator is a subtype of Network and represents a hydro generator for cascaded hydro power systems.
  • HydroPump is a subtype of Network and represents a hydro pump for cascaded hydro power systems.
  • HydroGate is a subtype of Network and represents a gate for cascaded hydro power systems.
source

Node types

Abstract types

Concrete types

EnergyModelsRenewableProducers.BatteryType
Battery{T} <: AbstractBattery{T}

A battery storage, modelled as a Storage node. A battery storage nodes differs from a RefStorage node through:

  1. incorporating a discharge capacity,
  2. including charge and discharge efficiencies, and
  3. allow for the introduction of battery degradation and lifetime reduction.
Implementation details
  • 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 the BatteryStorage 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 the BatteryStorage 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 the BatteryStorage node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.
  • stor_res::ResourceCarrier is the stored Resource.
  • input::Dict{Resource, Real} are the input Resources with corresponding efficiency value.
  • output::Dict{Resource, Real} are the output Resources 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 field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.ReserveBatteryType
ReserveBattery{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.

Implementation details
  • 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 the BatteryStorage 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 the BatteryStorage 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 the BatteryStorage node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.
  • stor_res::ResourceCarrier is the stored Resource.
  • input::Dict{Resource, Real} are the input Resources with corresponding efficiency value.
  • output::Dict{Resource, Real} are the output Resources 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 the Resources used as reserve for providing energy to the system.
  • reserve_down::Vector{ResourceCarrier} are the Resources used as reserve for removing energy from the system.
  • data::Vector{Data} additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.NonDisRESType
NonDisRES <: 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 generated Resources, normally Power.
  • data::Vector{Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.HydroStorType
HydroStor{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 the HydroStor 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 the HydroStor 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 the HydroStorage node.
  • stor_res::ResourceCarrier is the stored Resource.
  • input::Dict{Resource, Real} are the input Resources. In the case of a HydroStor, 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 field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.PumpedHydroStorType
PumpedHydroStor{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 the PumpedHydroStor 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 the PumpedHydroStor 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 the PumpedHydroStor 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 the HydroStorage node.
  • stor_res::ResourceCarrier is the stored Resource.
  • input::Dict{Resource, Real} are the input Resources.
  • output::Dict{Resource, Real} can only contain one entry, the stored resource.
  • data::Vector{Data} additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.HydroReservoirType
HydroReservoir{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 the HydroReservoir 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 stored Resource.
  • data::Vector{<:Data} is the additional data (e.g., for investments or constraints through AbstractScheduleType). The field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.HydroGeneratorType
HydroGenerator <: HydroUnit

A 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

  • 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 through AbstractScheduleType). The field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.HydroPumpType
HydroPump <: HydroUnit

A 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

  • 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 through AbstractScheduleType). The field data is conditional through usage of a constructor.
source
EnergyModelsRenewableProducers.HydroGateType
HydroGate <: 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 through AbstractScheduleType). The field data is conditional through usage of a constructor.
source

Legacy constructors

EnergyModelsRenewableProducers.RegHydroStorFunction
RegHydroStor(
    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 the HydroStorage 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 stored Resource.
  • 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.
source

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.CycleLifeType
CycleLife <: 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.
source

Constraint types

EnergyModelsRenewableProducers.ScheduleConstraintType
ScheduleConstraint{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 to Inf it will be built as a hard constraint.
source

Power-flow curves

EnergyModelsRenewableProducers.PqPointsType
struct 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.

Note

The described power-discharge relationship should be concave for a HydroGenerator node and convex for a HydroPump node.

source