EnergyModelsRenewableProducers.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.
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.
EnergyModelsRenewableProducers.HydroStorMethod
HydroStor(
    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 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.
EnergyModelsRenewableProducers.NonDisRESType
NonDisRES <: 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 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.
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 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.
  • 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.
EnergyModelsRenewableProducers.PumpedHydroStorMethod
PumpedHydroStor(
    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 the HydroStorage 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 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.
EnergyModelsBase.check_nodeMethod
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 field capacity in the type in the field charge is required to be non-negative if the chosen composite type has the field capacity.
  • The TimeProfile of the field capacity in the type in the field level is required to be non-negative`.
  • The TimeProfile of the field capacity in the type in the field discharge is required to be non-negative if the chosen composite type has the field capacity.
  • The TimeProfile of the field fixed_opex is required to be non-negative and accessible through a StrategicPeriod as outlined in the function check_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles) for the chosen composite type .
  • The field output can only include a single Resource.
  • 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_nodeMethod
EMB.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 the Source check).
  • The value of the field fixed_opex is required to be non-negative and accessible through a StrategicPeriod as outlined in the function check_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles).
  • The values of the dictionary output are required to be non-negative (similar to the Source check).
  • The field profile is required to be in the range $[0, 1]$ for all time steps $t ∈ \mathcal{T}$.
EnergyModelsBase.constraints_capacityMethod
constraints_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_inMethod
constraints_flow_in(m, n::HydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)

When n::HydroStor, the the variable :flow_in is fixed to 0 for all potential inputs.

EnergyModelsBase.constraints_flow_inMethod
constraints_flow_in(m, n, 𝒯::TimeStructure, modeltype::EnergyModel)

When n::PumpedHydroStor, the the variable :flow_in is used contrary to standard nodes, that is the variable :flow_in is multiplied with the inputs value.

EnergyModelsBase.constraints_level_auxMethod
EMB.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 flow_in minus the production stor_rate_use and the spillage of water due to overflow hydro_spill.

EnergyModelsBase.create_nodeMethod
EMB.create_node(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)

Sets all constraints for the regulated hydro storage node.

EnergyModelsBase.variables_nodeMethod
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.variables_nodeMethod
EMB.variables_node(m, 𝒩ⁿᵈʳ::Vector{NonDisRES}, 𝒯, modeltype::EnergyModel)

Create the optimization variable :curtailment for every NonDisRES node. This method is called from EnergyModelsBase.jl.

EnergyModelsRenewableProducers.RegHydroStorMethod
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.