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

A regulated hydropower storage, modelled as a Storage node.

Fields

  • id is the name/identifyer of the node.

  • rate_cap::TimeProfile: installed capacity.

  • stor_cap::TimeProfile Initial installed storage capacity in the dam.

  • level_init::TimeProfile Initial energy stored in the dam, in units of power.

  • level_inflow::TimeProfile Inflow of power per operational period.

  • level_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.

  • opex_var::TimeProfile Operational cost per GWh produced.

  • opex_fixed::TimeProfile Fixed operational costs.

  • stor_res::ResourceCarrier is the stored Resource.

  • input::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.

  • 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.NonDisRESType

A non-dispatchable renewable energy source.

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 variational operational costs per energy unit produced.

  • opex_fixed::TimeProfile is the fixed operational costs.

  • 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

A regulated hydropower storage with pumping capabilities, modelled as a Storage node.

Fields

  • id is the name/identifyer of the node.

  • rate_cap::TimeProfile: installed capacity.

  • stor_cap::TimeProfile Initial installed storage capacity in the dam.

  • level_init::TimeProfile Initial energy stored in the dam, in units of power.

  • level_inflow::TimeProfile Inflow of power per operational period.

  • level_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.

  • opex_var::TimeProfile Operational cost per GWh produced.

  • opex_var_pump::TimeProfile Operational cost per GWh pumped into the reservoir.

  • opex_fixed::TimeProfile Fixed operational costs.

  • stor_res::ResourceCarrier is the stored Resource.

  • input::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.

  • 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.

EnergyModelsBase.check_nodeMethod
EMB.check_node(n::HydroStorage, 𝒯, modeltype::EMB.EnergyModel)

This method checks that the HydroStorage node is valid.

Checks

  • The field n.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 rate_cap is required to be non-negative.

  • 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)

This method checks that the NonDisRES node is valid.

Checks

  • The field profile is required to be in the range $[0, 1]$ for all time steps $t ∈ \mathcal{T}$.
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 specificaiton 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.constraints_level_spMethod
EMB.constraints_level_sp(
    m,
    n::HydroStorage,
    t_inv::TS.StrategicPeriod{T, RepresentativePeriods{U, T, SimpleTimes{T}}},
    𝒫,
    modeltype
    ) where {T, U}

Function for creating the level constraint for a HydroStorage storage node when the operational TimeStructure is given as RepresentativePeriods.

EnergyModelsBase.constraints_level_spMethod
EMB.constraints_level_sp(
    m,
    n::HydroStorage,
    t_inv::TS.StrategicPeriod{T, U},
    𝒫,
    modeltype
    ) where {T, U<:SimpleTimes}

Function for creating the level constraint for a HydroStorage node when the TimeStructure is given as SimpleTimes.

EnergyModelsBase.constraints_opex_varMethod
constraints_opex_var(m, n::HydroStor, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)

Function for creating the constraint on the variable OPEX of a HydroStor.

EnergyModelsBase.constraints_opex_varMethod
constraints_opex_var(m, n::PumpedHydroStor, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)

Function for creating the constraint on the variable OPEX of a PumpedHydroStor.

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

Sets all constraints for the regulated hydro storage node.

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

Sets all constraints for a non-dispatchable renewable energy source.

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

Legacy constructor for a regulated hydropower storage, with or without pumping capabilities. This version will be discontinued in the near future and is already replaced with the two new types HydroStor and PumpedHydroStor.

If you are creating a new model, it is advised to directly use the types HydroStor and PumpedHydroStor.

Fields

  • id is the name/identifyer of the node.

  • rate_cap::TimeProfile: installed capacity.

  • stor_cap::TimeProfile Initial installed storage capacity in the dam.

  • has_pump::Bool states wheter the stored resource can flow in.

  • level_init::TimeProfile Initial energy stored in the dam, in units of power.

  • level_inflow::TimeProfile Inflow of power per operational period.

  • level_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.

  • opex_var::TimeProfile Operational cost per GWh produced.

  • opex_fixed::TimeProfile Fixed operational costs.

  • stor_res::ResourceCarrier is the stored Resource.

  • input::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio 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).