`EnergyModelsRenewableProducers.EnergyModelsRenewableProducers`

— ModuleMain 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.HydroStor`

— Type`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**

is the name/identifyer of the node.`id`

are the level parameters of the`level::EMB.UnionCapacity`

`HydroStor`

node. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.are the discharging parameters of the`discharge::EMB.UnionCapacity`

`HydroStor`

node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.is the initial stored energy in the dam.`level_init::TimeProfile`

is the inflow of power per operational period.`level_inflow::TimeProfile`

is the minimum fraction of the reservoir capacity that has to remain in the`level_min::TimeProfile`

`HydroStorage`

node.is the stored`stor_res::ResourceCarrier`

`Resource`

.are the input`input::Dict{Resource, Real}`

`Resource`

s. In the case of a`HydroStor`

, this field can be left out.can only contain one entry, the stored resource.`output::Dict{Resource, Real}`

additional data (e.g. for investments). The field`data::Vector{Data}`

`data`

is conditional through usage of a constructor.

`EnergyModelsRenewableProducers.HydroStor`

— Method```
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**

is the name/identifyer of the node.`id`

is the installed installed rate capacity.`rate_cap::TimeProfile`

is the installed storage capacity in the dam.`stor_cap::TimeProfile`

is the initial stored energy in the dam.`level_init::TimeProfile`

is the inflow of power per operational period.`level_inflow::TimeProfile`

is the minimum fraction of the reservoir capacity that has to remain in the`level_min::TimeProfile`

`HydroStorage`

node.are the variable operational expenses per GWh produced.`opex_var::TimeProfile`

are the fixed operational costs of the storage caacity.`opex_fixed::TimeProfile`

is the stored`stor_res::ResourceCarrier`

`Resource`

.are the stored and used resources. The values in the Dict are ratios describing the energy loss when using the pumps.`input::Dict{Resource, Real}`

can only contain one entry, the stored resource.`output::Dict{Resource, Real}`

additional data (e.g. for investments). This value is conditional through the application of a constructor.`data::Array{Data}`

`EnergyModelsRenewableProducers.HydroStorage`

— TypeAn abstract type for hydro storage nodes, with or without pumping.

`EnergyModelsRenewableProducers.NonDisRES`

— Type`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**

is the name/identifyer of the node.`id`

is the installed capacity.`cap::TimeProfile`

is the power production in each operational period as a ratio of the installed capacity at that time.`profile::TimeProfile`

is the variable operating expense per energy unit produced.`opex_var::TimeProfile`

is the fixed operating expense.`opex_fixed::TimeProfile`

are the generated`output::Dict{Resource, Real}`

`Resource`

s, normally Power.is the additional data (e.g. for investments). The field`data::Vector{Data}`

`data`

is conditional through usage of a constructor.

`EnergyModelsRenewableProducers.PumpedHydroStor`

— Type`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**

is the name/identifyer of the node.`id`

are the charging parameters of the`charge::EMB.UnionCapacity`

`PumpedHydroStor`

node. Depending on the chosen type, the charge parameters can include variable OPEX, fixed OPEX, and/or a capacity.are the level parameters of the`level::EMB.UnionCapacity`

`HydroStor`

node. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX.are the discharging parameters of the`discharge::EMB.UnionCapacity`

`HydroStor`

node. Depending on the chosen type, the discharge parameters can include variable OPEX, fixed OPEX, and/or a capacity.is the initial stored energy in the dam.`level_init::TimeProfile`

is the inflow of power per operational period.`level_inflow::TimeProfile`

is the minimum fraction of the reservoir capacity that has to remain in the`level_min::TimeProfile`

`HydroStorage`

node.is the stored`stor_res::ResourceCarrier`

`Resource`

.are the input`input::Dict{Resource, Real}`

`Resource`

s.can only contain one entry, the stored resource.`output::Dict{Resource, Real}`

additional data (e.g. for investments). The field`data::Vector{Data}`

`data`

is conditional through usage of a constructor.

`EnergyModelsRenewableProducers.PumpedHydroStor`

— Method```
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**

is the name/identifyer of the node.`id`

is the installed installed rate capacity.`rate_cap::TimeProfile`

is the installed storage capacity in the dam.`stor_cap::TimeProfile`

is the initial stored energy in the dam.`level_init::TimeProfile`

is the inflow of power per operational period.`level_inflow::TimeProfile`

is the minimum fraction of the reservoir capacity that has to remain in the`level_min::TimeProfile`

`HydroStorage`

node.are the variable operational expenses per GWh produced.`opex_var::TimeProfile`

are the variable operational expenses per GWh pumped into the storage.`opex_var_pump::TimeProfile`

are the fixed operational costs of the storage caacity.`opex_fixed::TimeProfile`

is the stored`stor_res::ResourceCarrier`

`Resource`

.are the stored and used resources. The values in the Dict are ratios describing the energy loss when using the pumps.`input::Dict{Resource, Real}`

can only contain one entry, the stored resource.`output::Dict{Resource, Real}`

additional data (e.g. for investments). This value is conditional through the application of a constructor.`data::Array{Data}`

`EnergyModelsBase.check_node`

— Method`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_node`

— Method`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_capacity`

— Method`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_in`

— Method`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_in`

— Method`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_aux`

— Method`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_node`

— Method`EMB.create_node(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)`

Sets all constraints for the regulated hydro storage node.

`EnergyModelsBase.variables_node`

— Method`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_node`

— Method`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.RegHydroStor`

— Method```
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**

is the name/identifyer of the node.`id`

is the installed installed rate capacity.`rate_cap::TimeProfile`

is the installed storage capacity in the dam.`stor_cap::TimeProfile`

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

is the initial stored energy in the dam.`level_init::TimeProfile`

is the inflow of power per operational period.`level_inflow::TimeProfile`

is the minimum fraction of the reservoir capacity that has to remain in the`level_min::TimeProfile`

`HydroStorage`

node.are the variable operational expenses per GWh produced.`opex_var::TimeProfile`

are the fixed operational costs of the storage caacity.`opex_fixed::TimeProfile`

is the stored`stor_res::ResourceCarrier`

`Resource`

.are the stored and used resources. The values in the Dict are ratios describing the energy loss when using the pumps.`input::Dict{Resource, Real}`

can only contain one entry, the stored resource.`output::Dict{Resource, Real}`

additional data (e.g. for investments). This value is conditional through the application of a constructor.`data::Array{Data}`

`EnergyModelsRenewableProducers.level_inflow`

— Method`level_inflow(n::HydroStorage, t)`

Returns the inflow to a node `n`

of type `HydroStorage`

at operational period `t`

`EnergyModelsRenewableProducers.level_init`

— Method`level_init(n::HydroStorage, t)`

Returns the innitial level of a node `n`

of type `HydroStorage`

at operational period `t`

`EnergyModelsRenewableProducers.level_min`

— Method`level_min(n::HydroStorage, t)`

Returns the minimum level of a node `n`

of type `HydroStorage`

at operational period `t`

`EnergyModelsRenewableProducers.opex_var_pump`

— Method`opex_var_pump(n::PumpedHydroStor, t)`

Returns the variable OPEX of a node `n`

of type `PumpedHydroStor`

related to pumping at operational period `t`

`EnergyModelsRenewableProducers.profile`

— Method`profile(n::NonDisRES, t)`

Returns the profile of a node `n`

of type `NonDisRES`

at operational period `t`

.