diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 115d930..c1fe9ac 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-03T10:00:08","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-03T11:05:32","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 708482d..9302166 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · EnergyModelsRenewableProducers.jl

EnergyModelsRenewableProducers.jl

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

This Julia package implements two main nodes with corresponding JuMP constraints, extending the package EnergyModelsBase.jl with more detailed representation of renewable energy sources.

The first node, NonDisRES, models a non-dispatchable renewable energy source, like wind power, solar power, or run of river hydropower. These all use intermittent energy sources in the production of energy, so the maximum production capacity varies with the availability of the energy source at the time.

The other node implements a regulated hydropower storage plant, both with (PumpedHydroStor) and without pumps (HydroStor) for filling the reservoir with excess energy. The hydropower storage plant can also be extended as they are declared as subtypes of HydroStorage.

The new introduced node types are also documented in the public library.

Manual outline

Library outline

+Home · EnergyModelsRenewableProducers.jl

EnergyModelsRenewableProducers.jl

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

This Julia package implements two main nodes with corresponding JuMP constraints, extending the package EnergyModelsBase.jl with more detailed representation of renewable energy sources.

The first node, NonDisRES, models a non-dispatchable renewable energy source, like wind power, solar power, or run of river hydropower. These all use intermittent energy sources in the production of energy, so the maximum production capacity varies with the availability of the energy source at the time.

The other node implements a regulated hydropower storage plant, both with (PumpedHydroStor) and without pumps (HydroStor) for filling the reservoir with excess energy. The hydropower storage plant can also be extended as they are declared as subtypes of HydroStorage.

The new introduced node types are also documented in the public library.

Manual outline

Library outline

diff --git a/dev/library/internals/index.html b/dev/library/internals/index.html index 10cdaca..302e3a1 100644 --- a/dev/library/internals/index.html +++ b/dev/library/internals/index.html @@ -1,14 +1,14 @@ -Internals · EnergyModelsRenewableProducers.jl

Internals

Types

Methods

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]$.

source
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}$.
source
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.

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

source
EnergyModelsBase.constraints_level_spMethod
EMB.constraints_level_sp(
+Internals · EnergyModelsRenewableProducers.jl

Internals

Types

Methods

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]$.

source
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}$.
source
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.

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

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

source
EnergyModelsBase.constraints_level_spMethod
EMB.constraints_level_sp(
+    ) where {T, U}

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

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

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

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

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

Sets all constraints for the regulated hydro storage node.

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.

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

source
+ ) where {T, U<:SimpleTimes}

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

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

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

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

Sets all constraints for the regulated hydro storage node.

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.

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

source
diff --git a/dev/library/public/index.html b/dev/library/public/index.html index 3409c01..9bc29db 100644 --- a/dev/library/public/index.html +++ b/dev/library/public/index.html @@ -1,2 +1,2 @@ -Public · EnergyModelsRenewableProducers.jl

Public interface

NonDisRES (non-dispatchable renewable energy source)

This type models both wind power, solar power, and run of river hydropower. These have in common that they generate power from an intermittent energy source, so they can have large variations in power output, based on the availability of the renewable source at the time. These power sources can be modelled using the same type NonDisRES. The new type is a subtype of EMB.Source. The new type only differs from its supertype through the field profile.

The field profile::TimeProfile is a dimensionless ratio (between 0 and 1) describing how much of the installed capacity is utilized at the current operational period. Therefore, when using NonDisRES to model some renewable source, the data provided to this field is what defines the intermittent characteristics of the source.

The NonDisRES node is modelled very similar to a regular EMB.Source} node. The only difference is how the intermittent nature of the non-dispatchable source is handled. The maximum power generation of the source in the operational period $t$ depends on the time-dependent Profile variable.

Note

If not needed, the production does not need to run at full capacity. The amount of energy not produced is computed using the non-negative optimization variable $\texttt{curtailment}$ (declared for NonDisRES nodes only).

The fields of the different types are listed below:

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.

source

HydroStorage (regulated hydro storage with or without pump)

A hydropower plant is much more flexible than, e.g., a wind farm since the water can be stored for later use. Energy can be produced (almost) whenever it is needed. Some hydropower plants also have pumps installed. These are used to pump water into the reservoir when excess and cheap energy is available in the network.

The field rate_cap describes the installed production capacity of the (aggregated) hydropower plant. The variable level_init represents the initial energy available in the reservoir in the beginning of each investment period, while stor_cap is the installed storage capacity in the reservoir. The variable level_inflow describes the inflow into the reservoir (measured in energy units), while level_min is the allowed minimum storage level in the dam, given as a ratio of the installed storage capacity of the reservoir at every operational period. The required minimum level is enforced by NVE and varies over the year. The resources stored in the hydro storage is set as stor_res, similar to a regular EMB.RefStorage.

The five last parameters are used in the same way as in EMB.Storage. In the implementation of PumpedHydroStor, the values set in input represents a loss of energy when using the pumps. A value of 1 means no energy loss, while a value of 0 represents 100% energy loss of that inflow variable. PumpedHydroStor has in addition the field opex_var_pump::TimeProfile. This field corresponds to the variable operational expenditures when pumping water into the storage reservoir.

Since we also want to be able to model hydropower plant nodes without pumps, we include the boolean has_pump in the type describing hydropower. For combining the behavior of a hydropower plant with and without a pump, we can disable the inflow of energy by setting the constraint

$\texttt{flow\_in}[n, t, p_{\texttt{Power}}] = 0,$

for the stored resource $p_{\texttt{Power}}$ for the node $n$ ::HydroStor. To access this variable, we therefore have to let the type HydroStorage be a subtype of EMB.Storage.

The fields of the different types are listed below:

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.

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

source
EnergyModelsRenewableProducers.RegHydroStorFunction

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

source
+Public · EnergyModelsRenewableProducers.jl

Public interface

NonDisRES (non-dispatchable renewable energy source)

This type models both wind power, solar power, and run of river hydropower. These have in common that they generate power from an intermittent energy source, so they can have large variations in power output, based on the availability of the renewable source at the time. These power sources can be modelled using the same type NonDisRES. The new type is a subtype of EMB.Source. The new type only differs from its supertype through the field profile.

The field profile::TimeProfile is a dimensionless ratio (between 0 and 1) describing how much of the installed capacity is utilized at the current operational period. Therefore, when using NonDisRES to model some renewable source, the data provided to this field is what defines the intermittent characteristics of the source.

The NonDisRES node is modelled very similar to a regular EMB.Source} node. The only difference is how the intermittent nature of the non-dispatchable source is handled. The maximum power generation of the source in the operational period $t$ depends on the time-dependent Profile variable.

Note

If not needed, the production does not need to run at full capacity. The amount of energy not produced is computed using the non-negative optimization variable $\texttt{curtailment}$ (declared for NonDisRES nodes only).

The fields of the different types are listed below:

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.

source

HydroStorage (regulated hydro storage with or without pump)

A hydropower plant is much more flexible than, e.g., a wind farm since the water can be stored for later use. Energy can be produced (almost) whenever it is needed. Some hydropower plants also have pumps installed. These are used to pump water into the reservoir when excess and cheap energy is available in the network.

The field rate_cap describes the installed production capacity of the (aggregated) hydropower plant. The variable level_init represents the initial energy available in the reservoir in the beginning of each investment period, while stor_cap is the installed storage capacity in the reservoir. The variable level_inflow describes the inflow into the reservoir (measured in energy units), while level_min is the allowed minimum storage level in the dam, given as a ratio of the installed storage capacity of the reservoir at every operational period. The required minimum level is enforced by NVE and varies over the year. The resources stored in the hydro storage is set as stor_res, similar to a regular EMB.RefStorage.

The five last parameters are used in the same way as in EMB.Storage. In the implementation of PumpedHydroStor, the values set in input represents a loss of energy when using the pumps. A value of 1 means no energy loss, while a value of 0 represents 100% energy loss of that inflow variable. PumpedHydroStor has in addition the field opex_var_pump::TimeProfile. This field corresponds to the variable operational expenditures when pumping water into the storage reservoir.

Since we also want to be able to model hydropower plant nodes without pumps, we include the boolean has_pump in the type describing hydropower. For combining the behavior of a hydropower plant with and without a pump, we can disable the inflow of energy by setting the constraint

$\texttt{flow\_in}[n, t, p_{\texttt{Power}}] = 0,$

for the stored resource $p_{\texttt{Power}}$ for the node $n$ ::HydroStor. To access this variable, we therefore have to let the type HydroStorage be a subtype of EMB.Storage.

The fields of the different types are listed below:

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.

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

source
EnergyModelsRenewableProducers.RegHydroStorFunction

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

source
diff --git a/dev/manual/NEWS/index.html b/dev/manual/NEWS/index.html index bdcb4e4..72b7b4f 100644 --- a/dev/manual/NEWS/index.html +++ b/dev/manual/NEWS/index.html @@ -1,2 +1,2 @@ -Release notes · EnergyModelsRenewableProducers.jl

Release notes

Version 0.5.3 (2024-01-30)

  • Updated the restrictions on the fields individual types to be consistent.
  • Added option to not include the field data for the individual TransmissionModes.

Version 0.5.2 (2024-01-19)

  • Updated the documenation to be in line with the updated done in EnergyModelsBsae.
  • Moved RegHydroStor to a new file, legacy_constructors.jl to highlight that a user should use the new types, namely HydroStor and PumpedHydroStor.

Version 0.5.1 (2024-01-17)

  • Update the method constraints_level to match the signature updates for these methods in EnergyModelsBase. This includes renaming constraints_level to constraints_level_sp.
  • Moved the function to EMB.constraints_level_sp to avoid problems.

Version 0.5.0 (2023-12-18)

Adjustment to release in EMB 0.6.0

  • Adjusted the code for the new release.
  • Implementation of support for RepresentativePeriods for HydroStorage nodes.

Version 0.4.2 (2023-09-01)

Create a variable :spill for hydro storage node.

  • This variable enables hydro storage nodes to spill water from the reservoir without producing energy.

Version 0.4.1 (2023-08-31)

Split the hydro storage node into to separate nodes

  • Split RegHydroStor into to types PumpedHydroStor and HydroStor. Both are subtypes

of the new abstract type HydroStorage <: EMB.Storage.

  • Fix: variational OPEX for HydroStor now depends on flow_out instead of

flow_in. The new type PumpedHydroStor has a separate parameter for variational OPEX for the pumps, which depends on flow_in.

Version 0.4.0 (2023-06-06)

Switch to TimeStruct.jl

  • Switched the time structure representation to TimeStruct.jl
  • TimeStruct.jl is implemented with only the basis features that were available in TimesStructures.jl. This implies that neither operational nor strategic uncertainty is included in the model

Version 0.3.0 (2023-05-30)

  • Adjustment to changes in EnergyModelsBase v0.4.0 related to extra input data

Version 0.2.2 (2023-05-15)

  • Adjustment to changes in EnergyModelsBase v 0.3.3 related to the calls for the constraint functions

Version 0.2.1 (2023-02-03)

  • Take the examples out to the folder examples.

Version 0.2.0 (2023-02-03)

Adjustmends to updates in EnergyModelsBase

Adjustment to version 0.3.0, namely:

  • Changed type (Node) calls in tests to be consistent with version 0.3.0
  • Removal of the type GlobalData and replacement with fields in the type OperationalModel in all tests
  • Changed type structure to be consistent with EMB version 0.3.0
  • Substitution of certain constraints in create_node through functions which utilize dispatching on node types
  • Changed the input to the function variables_node

Version 0.1.3 (2022-12-12)

Internal release

  • Renamed to follow common prefix naming scheme
  • Update README

Version 0.1.2 (2022-12-02)

  • Minor test fixes in preparation of internal release

Version 0.1.1 (2021-09-07)

Changes in naming

  • Major changes in both variable and parameter naming, check the commit message for an overview
  • Change of structure in composite type "RegHydroStor"

Version 0.1.0 (2021-08-23)

  • Initial version with inclusion of nodes for:
    • nondispatchable renewable energy sources (NonDisRES)
    • regulated hydro generation (RegHydroStor, can be used for pumped hydro storage)
+Release notes · EnergyModelsRenewableProducers.jl

Release notes

Unversioned

Examples

  • Fixed a bug when running the examples from a non-cloned version of EnergyModelsRenewableProducers.
  • This was achieved through a separate Project.toml in the examples.

NonDIsRes node

  • Moved the capcity constraints through the profile to the function constraints_capacity(n::NonDisRES, ...), and hence, removed the function EMB.create_node(n::NonDisRES, ...).

Version 0.5.3 (2024-01-30)

  • Updated the restrictions on the fields individual types to be consistent.
  • Added option to not include the field data for the individual TransmissionModes.

Version 0.5.2 (2024-01-19)

  • Updated the documenation to be in line with the updated done in EnergyModelsBsae.
  • Moved RegHydroStor to a new file, legacy_constructors.jl to highlight that a user should use the new types, namely HydroStor and PumpedHydroStor.

Version 0.5.1 (2024-01-17)

  • Update the method constraints_level to match the signature updates for these methods in EnergyModelsBase. This includes renaming constraints_level to constraints_level_sp.
  • Moved the function to EMB.constraints_level_sp to avoid problems.

Version 0.5.0 (2023-12-18)

Adjustment to release in EMB 0.6.0

  • Adjusted the code for the new release.
  • Implementation of support for RepresentativePeriods for HydroStorage nodes.

Version 0.4.2 (2023-09-01)

Create a variable :spill for hydro storage node

  • This variable enables hydro storage nodes to spill water from the reservoir without producing energy.

Version 0.4.1 (2023-08-31)

Split the hydro storage node into to separate nodes

  • Split RegHydroStor into to types PumpedHydroStor and HydroStor. Both are subtypes

of the new abstract type HydroStorage <: EMB.Storage.

  • Fix: variational OPEX for HydroStor now depends on flow_out instead of

flow_in. The new type PumpedHydroStor has a separate parameter for variational OPEX for the pumps, which depends on flow_in.

Version 0.4.0 (2023-06-06)

Switch to TimeStruct.jl

  • Switched the time structure representation to TimeStruct.jl.
  • TimeStruct.jl is implemented with only the basis features that were available in TimesStructures.jl. This implies that neither operational nor strategic uncertainty is included in the model.

Version 0.3.0 (2023-05-30)

  • Adjustment to changes in EnergyModelsBase v0.4.0 related to extra input data.

Version 0.2.2 (2023-05-15)

  • Adjustment to changes in EnergyModelsBase v 0.3.3 related to the calls for the constraint functions.

Version 0.2.1 (2023-02-03)

  • Take the examples out to the folder examples.

Version 0.2.0 (2023-02-03)

Adjustmends to updates in EnergyModelsBase

Adjustment to version 0.3.0, namely:

  • Changed type (Node) calls in tests to be consistent with version 0.3.0.
  • Removal of the type GlobalData and replacement with fields in the type OperationalModel in all tests.
  • Changed type structure to be consistent with EMB version 0.3.0.
  • Substitution of certain constraints in create_node through functions which utilize dispatching on node types.
  • Changed the input to the function variables_node.

Version 0.1.3 (2022-12-12)

Internal release

  • Renamed to follow common prefix naming scheme.
  • Update README.

Version 0.1.2 (2022-12-02)

  • Minor test fixes in preparation of internal release.

Version 0.1.1 (2021-09-07)

Changes in naming

  • Major changes in both variable and parameter naming, check the commit message for an overview.
  • Change of structure in composite type "RegHydroStor".

Version 0.1.0 (2021-08-23)

  • Initial version with inclusion of nodes for:
    • nondispatchable renewable energy sources (NonDisRES) and
    • regulated hydro generation (RegHydroStor, can be used for pumped hydro storage).
diff --git a/dev/manual/constraint-functions/index.html b/dev/manual/constraint-functions/index.html index a0aaf32..6272542 100644 --- a/dev/manual/constraint-functions/index.html +++ b/dev/manual/constraint-functions/index.html @@ -1,3 +1,3 @@ Constraint functions · EnergyModelsRenewableProducers.jl

Constraint functions

The HydroStorage types dispatch on individual functions from within EnergyModelsBase.jl ti extend the functionality

Storage level constraints

All HydroStorage subtypes utilize the same function, constraints_level(m, n::Storage, 𝒯, 𝒫, modeltype::EnergyModel), for calling the two relevant subfunctions.

The function

EMB.constraints_level_aux(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)

is extended to account for both the provision of an initial level at the start of each strategic period as well as modifying the constraint for the variable $\texttt{stor\_level\_}\Delta\texttt{\_op}$ to account for the introduction of the new variable $\texttt{hydro\_spill}$. The former is required for HydroStorage subtypes asthe initial level is frequently a function of the season (excluding small scale pumped hydro storage) while the latter is required to include spillage.

The functions

EMB.constraints_level_sp(m, n::HydroStorage, t_inv, 𝒫, modeltype::EnergyModel)

are similar to the function used for RefStorage{T} where {T<:ResourceCarrier}. It is however necessary to reintroduce it due to the declaration for RefStorage in EnergyModelsBase.jl. This will most likely be adjusted in later versions, although it will not impact the user directly.

Operational expenditure constraints

Variable operational expenditure (OPEX) constraints are slightly different defined in the case of HydroStor and PumpedHydroStor nodes. Hence, dispatch is required on the individual constraints:

EMB.constraints_opex_var(m, n::HydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)
-EMB.constraints_opex_var(m, n::PumpedHydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)

Within a HydroStor node, the variable OPEX is defined via the outflow from the hydropower plant, contrary to the definition of a RefStorage node in which the variable OPEX is defined via the inflow. A PumpedHydroStor has contributions by both the inflow (through the field opex_var_pump) and the outflow (through the field opex_var).

+EMB.constraints_opex_var(m, n::PumpedHydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)

Within a HydroStor node, the variable OPEX is defined via the outflow from the hydropower plant, contrary to the definition of a RefStorage node in which the variable OPEX is defined via the inflow. A PumpedHydroStor has contributions by both the inflow (through the field opex_var_pump) and the outflow (through the field opex_var).

diff --git a/dev/manual/optimization-variables/index.html b/dev/manual/optimization-variables/index.html index 17dec30..d698ede 100644 --- a/dev/manual/optimization-variables/index.html +++ b/dev/manual/optimization-variables/index.html @@ -1,2 +1,2 @@ -Optimization variables · EnergyModelsRenewableProducers.jl

Optimization variables

EnergyModelsRenewableProduces.jl declares new variables for the introduced Nodes. The different variables are explained below including how they are introduced in different constraints. Thes variables are created by the method EMB.variables_node which is a method dispatched on from EnergyModelsBase.jl.

NonDisRES

NonDisRES is a subtype of the Source node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefSource node declared in EnergyModelsBase.jl.

In addition, the following new optimization variable is added:

  • $\texttt{curtailment}[n, t]$: Curtailment of NonDisRES node $n$ in operational period $t$.

Curtailment represents the amount of energy not produced by node $n$ ::NonDisRes at operational period $t$.

The variable is used in the following constraint within EMB.create_node(m, n::NonDisRES, 𝒯, 𝒫, modeltype::EnergyModel),

$\texttt{cap\_use}[n, t] + \texttt{curtailment}[n, t] = \texttt{profile}(n, t) \cdot \texttt{cap\_inst}[n, t]$.

Note

Brackets $[n, t]$ correspond to accessing a variable, while parenthesis $(n, t)$ correspond to functions for accessing fields of a composite type.

HydroStorage

Both PumpedHydroStor and HydroStor are in a fist instance subtypes of HydroStorage, and hence, subtypes of the Storage node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefStorage node declared in EnergyModelsBase.jl.

In addition, the following new optimization variable is added:

  • $\texttt{hydro\_spill}[n, t]$: Spillage from HydroStorage node $n$ in operational period $t$.

The spillage is introduced to allow for an overflow from a reservoir if the inflow to a reservoir exceed its capacity and the outflow through power generation.

The variable is used in the following constraint EMB.constraints_level_aux,

$\texttt{stor\_level\_}\Delta\texttt{\_op}[n, t] = \texttt{level\_inflow}(n, t) + \texttt{inputs}(n, p_{\texttt{Power}}) \cdot \texttt{flow\_in}[n, t] + \texttt{stor\_rate\_use}[n, t] - \texttt{hydro\_spill}[n, t]$

for the stored resource $p_{\texttt{Power}}$.

Note

Brackets $[n, t]$ correspond to accessing a variable, while parenthesis $(n, t)$ correspond to functions for accessing fields of a composite type.

+Optimization variables · EnergyModelsRenewableProducers.jl

Optimization variables

EnergyModelsRenewableProduces.jl declares new variables for the introduced Nodes. The different variables are explained below including how they are introduced in different constraints. Thes variables are created by the method EMB.variables_node which is a method dispatched on from EnergyModelsBase.jl.

NonDisRES

NonDisRES is a subtype of the Source node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefSource node declared in EnergyModelsBase.jl.

In addition, the following new optimization variable is added:

  • $\texttt{curtailment}[n, t]$: Curtailment of NonDisRES node $n$ in operational period $t$.

Curtailment represents the amount of energy not produced by node $n$ ::NonDisRes at operational period $t$.

The variable is used in the following constraint within EMB.create_node(m, n::NonDisRES, 𝒯, 𝒫, modeltype::EnergyModel),

$\texttt{cap\_use}[n, t] + \texttt{curtailment}[n, t] = \texttt{profile}(n, t) \cdot \texttt{cap\_inst}[n, t]$.

Note

Brackets $[n, t]$ correspond to accessing a variable, while parenthesis $(n, t)$ correspond to functions for accessing fields of a composite type.

HydroStorage

Both PumpedHydroStor and HydroStor are in a fist instance subtypes of HydroStorage, and hence, subtypes of the Storage node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefStorage node declared in EnergyModelsBase.jl.

In addition, the following new optimization variable is added:

  • $\texttt{hydro\_spill}[n, t]$: Spillage from HydroStorage node $n$ in operational period $t$.

The spillage is introduced to allow for an overflow from a reservoir if the inflow to a reservoir exceed its capacity and the outflow through power generation.

The variable is used in the following constraint EMB.constraints_level_aux,

$\texttt{stor\_level\_}\Delta\texttt{\_op}[n, t] = \texttt{level\_inflow}(n, t) + \texttt{inputs}(n, p_{\texttt{Power}}) \cdot \texttt{flow\_in}[n, t] + \texttt{stor\_rate\_use}[n, t] - \texttt{hydro\_spill}[n, t]$

for the stored resource $p_{\texttt{Power}}$.

Note

Brackets $[n, t]$ correspond to accessing a variable, while parenthesis $(n, t)$ correspond to functions for accessing fields of a composite type.

diff --git a/dev/manual/quick-start/index.html b/dev/manual/quick-start/index.html index a2b2c34..5a929b9 100644 --- a/dev/manual/quick-start/index.html +++ b/dev/manual/quick-start/index.html @@ -1,3 +1,3 @@ Quick Start · EnergyModelsRenewableProducers.jl

Quick Start

  1. Install the most recent version of Julia
  2. Install the package EnergyModelsBase and the time package TimeStruct, by running:
    ] add TimeStruct
    -] add EnergyModelsBase
    These packages are required as we do not only use them internally, but also for building a model.
  3. Install the package EnergyModelsRenewableProducers
    ] add EnergyModelsRenewableProducers
Note

If you receive the error that EnergyModelsRenewableProducers is not yet registered, you have to add the package using the GitHub repository through

] add https://github.com/EnergyModelsX/EnergyModelsRenewableProducers.jl

Once the package is registered, this is not required.

+] add EnergyModelsBaseThese packages are required as we do not only use them internally, but also for building a model.
  • Install the package EnergyModelsRenewableProducers
    ] add EnergyModelsRenewableProducers
  • Note

    If you receive the error that EnergyModelsRenewableProducers is not yet registered, you have to add the package using the GitHub repository through

    ] add https://github.com/EnergyModelsX/EnergyModelsRenewableProducers.jl

    Once the package is registered, this is not required.

    diff --git a/dev/manual/simple-example/index.html b/dev/manual/simple-example/index.html index 26a6de1..d885660 100644 --- a/dev/manual/simple-example/index.html +++ b/dev/manual/simple-example/index.html @@ -7,4 +7,4 @@ julia> include(joinpath(exdir, "simple_nondisres.jl")) # Include the code into the Julia REPL to run the first example of the Hydropower node julia> include(joinpath(exdir, "simple_hydro_power.jl"))

    The code was downloaded with git clone

    The examples can then be run from the terminal with

    ~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_nondisres.jl
    -~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_hydro_power.jl
    +~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_hydro_power.jl diff --git a/dev/objects.inv b/dev/objects.inv index e63a716..ad234dd 100644 Binary files a/dev/objects.inv and b/dev/objects.inv differ diff --git a/dev/search_index.js b/dev/search_index.js index c0f0012..8c106a6 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"manual/quick-start/#quick_start","page":"Quick Start","title":"Quick Start","text":"","category":"section"},{"location":"manual/quick-start/","page":"Quick Start","title":"Quick Start","text":"Install the most recent version of Julia\nInstall the package EnergyModelsBase and the time package TimeStruct, by running:\n] add TimeStruct\n] add EnergyModelsBase\nThese packages are required as we do not only use them internally, but also for building a model.\nInstall the package EnergyModelsRenewableProducers\n] add EnergyModelsRenewableProducers","category":"page"},{"location":"manual/quick-start/","page":"Quick Start","title":"Quick Start","text":"note: Note\nIf you receive the error that EnergyModelsRenewableProducers is not yet registered, you have to add the package using the GitHub repository through] add https://github.com/EnergyModelsX/EnergyModelsRenewableProducers.jlOnce the package is registered, this is not required.","category":"page"},{"location":"manual/simple-example/#Examples","page":"Examples","title":"Examples","text":"","category":"section"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"For the content of the example, see the examples directory in the project repository.","category":"page"},{"location":"manual/simple-example/#The-package-is-installed-with-]-add","page":"Examples","title":"The package is installed with ] add","text":"","category":"section"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"From the Julia REPL, run","category":"page"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"# Starts the Julia REPL\njulia> using EnergyModelsRenewableProducers\n# Get the path of the examples directory\njulia> exdir = joinpath(pkgdir(EnergyModelsRenewableProducers), \"examples\")\n# Include the code into the Julia REPL to run the first example of the NonDisRes node\njulia> include(joinpath(exdir, \"simple_nondisres.jl\"))\n# Include the code into the Julia REPL to run the first example of the Hydropower node\njulia> include(joinpath(exdir, \"simple_hydro_power.jl\"))","category":"page"},{"location":"manual/simple-example/#The-code-was-downloaded-with-git-clone","page":"Examples","title":"The code was downloaded with git clone","text":"","category":"section"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"The examples can then be run from the terminal with","category":"page"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_nondisres.jl\n~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_hydro_power.jl","category":"page"},{"location":"manual/optimization-variables/#optimization_variables","page":"Optimization variables","title":"Optimization variables","text":"","category":"section"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"EnergyModelsRenewableProduces.jl declares new variables for the introduced Nodes. The different variables are explained below including how they are introduced in different constraints. Thes variables are created by the method EMB.variables_node which is a method dispatched on from EnergyModelsBase.jl.","category":"page"},{"location":"manual/optimization-variables/#[NonDisRES](@ref)","page":"Optimization variables","title":"NonDisRES","text":"","category":"section"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"NonDisRES is a subtype of the Source node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefSource node declared in EnergyModelsBase.jl.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"In addition, the following new optimization variable is added:","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"textttcurtailmentn t: Curtailment of NonDisRES node n in operational period t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"Curtailment represents the amount of energy not produced by node n ::NonDisRes at operational period t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"The variable is used in the following constraint within EMB.create_node(m, n::NonDisRES, 𝒯, 𝒫, modeltype::EnergyModel),","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"textttcap_usen t + textttcurtailmentn t = textttprofile(n t) cdot textttcap_instn t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"note: Note\nBrackets n t correspond to accessing a variable, while parenthesis (n t) correspond to functions for accessing fields of a composite type.","category":"page"},{"location":"manual/optimization-variables/#[HydroStorage](@ref)","page":"Optimization variables","title":"HydroStorage","text":"","category":"section"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"Both PumpedHydroStor and HydroStor are in a fist instance subtypes of HydroStorage, and hence, subtypes of the Storage node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefStorage node declared in EnergyModelsBase.jl.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"In addition, the following new optimization variable is added:","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"texttthydro_spilln t: Spillage from HydroStorage node n in operational period t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"The spillage is introduced to allow for an overflow from a reservoir if the inflow to a reservoir exceed its capacity and the outflow through power generation.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"The variable is used in the following constraint EMB.constraints_level_aux,","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"textttstor_level_Deltatexttt_opn t = textttlevel_inflow(n t) + textttinputs(n p_textttPower) cdot textttflow_inn t + textttstor_rate_usen t - texttthydro_spilln t","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"for the stored resource p_textttPower.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"note: Note\nBrackets n t correspond to accessing a variable, while parenthesis (n t) correspond to functions for accessing fields of a composite type.","category":"page"},{"location":"library/internals/#Internals","page":"Internals","title":"Internals","text":"","category":"section"},{"location":"library/internals/#Types","page":"Internals","title":"Types","text":"","category":"section"},{"location":"library/internals/","page":"Internals","title":"Internals","text":"Modules = [EnergyModelsRenewableProducers]\nPublic = false\nOrder = [:type]","category":"page"},{"location":"library/internals/#Methods","page":"Internals","title":"Methods","text":"","category":"section"},{"location":"library/internals/","page":"Internals","title":"Internals","text":"Modules = [EnergyModelsRenewableProducers]\nPublic = false\nOrder = [:function]","category":"page"},{"location":"library/internals/#EnergyModelsBase.check_node-Tuple{HydroStorage, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.check_node","text":"EMB.check_node(n::HydroStorage, 𝒯, modeltype::EMB.EnergyModel)\n\nThis method checks that the HydroStorage node is valid.\n\nChecks\n\nThe field n.output can only include a single Resource.\nThe value of the field output is required to be smaller or equal to 1.\nThe value of the field input is required to be in the range 0 1.\nThe 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 mathcalT.\nThe value of the field level_init is required to be in the range 0 1.\nThe value of the field rate_cap is required to be non-negative.\nThe value of the field level_min is required to be in the range 0 1.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.check_node-Tuple{NonDisRES, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.check_node","text":"EMB.check_node(n::NonDisRES, 𝒯, modeltype::EMB.EnergyModel)\n\nThis method checks that the NonDisRES node is valid.\n\nChecks\n\nThe field profile is required to be in the range 0 1 for all time steps t mathcalT.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_capacity-Tuple{Any, NonDisRES, TimeStruct.TimeStructure, EnergyModel}","page":"Internals","title":"EnergyModelsBase.constraints_capacity","text":"constraints_capacity(m, n::NonDisRES, 𝒯::TimeStructure, modeltype::EnergyModel)\n\nFunction for creating the constraint on the maximum capacity of a NonDisRES. Also sets the constraint defining curtailment.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_level_aux-Tuple{Any, HydroStorage, Any, Any, Any}","page":"Internals","title":"EnergyModelsBase.constraints_level_aux","text":"EMB.constraints_level_aux(m, n::HydroStorage, 𝒯, 𝒫, modeltype)\n\nFunction for creating the Δ constraint for the level of a HydroStorage node as well as the specificaiton of the initial level in a strategic period.\n\nThe 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.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_level_sp-Union{Tuple{U}, Tuple{T}, Tuple{Any, HydroStorage, TimeStruct.StrategicPeriod{T, TimeStruct.RepresentativePeriods{U, T, TimeStruct.SimpleTimes{T}}}, Any, Any}} where {T, U}","page":"Internals","title":"EnergyModelsBase.constraints_level_sp","text":"EMB.constraints_level_sp(\n m,\n n::HydroStorage,\n t_inv::TS.StrategicPeriod{T, RepresentativePeriods{U, T, SimpleTimes{T}}},\n 𝒫,\n modeltype\n ) where {T, U}\n\nFunction for creating the level constraint for a HydroStorage storage node when the operational TimeStructure is given as RepresentativePeriods.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_level_sp-Union{Tuple{U}, Tuple{T}, Tuple{Any, HydroStorage, TimeStruct.StrategicPeriod{T, U}, Any, Any}} where {T, U<:TimeStruct.SimpleTimes}","page":"Internals","title":"EnergyModelsBase.constraints_level_sp","text":"EMB.constraints_level_sp(\n m,\n n::HydroStorage,\n t_inv::TS.StrategicPeriod{T, U},\n 𝒫,\n modeltype\n ) where {T, U<:SimpleTimes}\n\nFunction for creating the level constraint for a HydroStorage node when the TimeStructure is given as SimpleTimes.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_opex_var-Tuple{Any, HydroStor, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.constraints_opex_var","text":"constraints_opex_var(m, n::HydroStor, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)\n\nFunction for creating the constraint on the variable OPEX of a HydroStor.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_opex_var-Tuple{Any, PumpedHydroStor, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.constraints_opex_var","text":"constraints_opex_var(m, n::PumpedHydroStor, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)\n\nFunction for creating the constraint on the variable OPEX of a PumpedHydroStor.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.create_node-Tuple{Any, HydroStorage, Any, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.create_node","text":"EMB.create_node(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)\n\nSets all constraints for the regulated hydro storage node.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.variables_node-Tuple{Any, Vector{HydroStorage}, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.variables_node","text":"EMB.variables_node(m, 𝒩::Vector{HydroStorage}, 𝒯, modeltype::EnergyModel)\n\nCreate 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. \n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.variables_node-Tuple{Any, Vector{NonDisRES}, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.variables_node","text":"EMB.variables_node(m, 𝒩ⁿᵈʳ::Vector{NonDisRES}, 𝒯, modeltype::EnergyModel)\n\nCreate the optimization variable :curtailment for every NonDisRES node. This method is called from EnergyModelsBase.jl.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.level_inflow-Tuple{HydroStorage, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.level_inflow","text":"level_inflow(n::HydroStorage, t)\n\nReturns the inflow to a node n of type HydroStorage at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.level_init-Tuple{HydroStorage, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.level_init","text":"level_init(n::HydroStorage, t)\n\nReturns the innitial level of a node n of type HydroStorage at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.level_min-Tuple{HydroStorage, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.level_min","text":"level_min(n::HydroStorage, t)\n\nReturns the minimum level of a node n of type HydroStorage at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.opex_var_pump-Tuple{PumpedHydroStor, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.opex_var_pump","text":"opex_var_pump(n::PumpedHydroStor, t)\n\nReturns the variable OPEX of a node n of type PumpedHydroStor related to pumping at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.profile-Tuple{NonDisRES, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.profile","text":"profile(n::NonDisRES, t)\n\nReturns the profile of a node n of type NonDisRES at operational period t.\n\n\n\n\n\n","category":"method"},{"location":"manual/NEWS/#Release-notes","page":"Release notes","title":"Release notes","text":"","category":"section"},{"location":"manual/NEWS/#Version-0.5.3-(2024-01-30)","page":"Release notes","title":"Version 0.5.3 (2024-01-30)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Updated the restrictions on the fields individual types to be consistent.\nAdded option to not include the field data for the individual TransmissionModes.","category":"page"},{"location":"manual/NEWS/#Version-0.5.2-(2024-01-19)","page":"Release notes","title":"Version 0.5.2 (2024-01-19)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Updated the documenation to be in line with the updated done in EnergyModelsBsae.\nMoved RegHydroStor to a new file, legacy_constructors.jl to highlight that a user should use the new types, namely HydroStor and PumpedHydroStor.","category":"page"},{"location":"manual/NEWS/#Version-0.5.1-(2024-01-17)","page":"Release notes","title":"Version 0.5.1 (2024-01-17)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Update the method constraints_level to match the signature updates for these methods in EnergyModelsBase. This includes renaming constraints_level to constraints_level_sp.\nMoved the function to EMB.constraints_level_sp to avoid problems.","category":"page"},{"location":"manual/NEWS/#Version-0.5.0-(2023-12-18)","page":"Release notes","title":"Version 0.5.0 (2023-12-18)","text":"","category":"section"},{"location":"manual/NEWS/#Adjustment-to-release-in-EMB-0.6.0","page":"Release notes","title":"Adjustment to release in EMB 0.6.0","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjusted the code for the new release.\nImplementation of support for RepresentativePeriods for HydroStorage nodes.","category":"page"},{"location":"manual/NEWS/#Version-0.4.2-(2023-09-01)","page":"Release notes","title":"Version 0.4.2 (2023-09-01)","text":"","category":"section"},{"location":"manual/NEWS/#Create-a-variable-:spill-for-hydro-storage-node.","page":"Release notes","title":"Create a variable :spill for hydro storage node.","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"This variable enables hydro storage nodes to spill water from the reservoir without producing energy.","category":"page"},{"location":"manual/NEWS/#Version-0.4.1-(2023-08-31)","page":"Release notes","title":"Version 0.4.1 (2023-08-31)","text":"","category":"section"},{"location":"manual/NEWS/#Split-the-hydro-storage-node-into-to-separate-nodes","page":"Release notes","title":"Split the hydro storage node into to separate nodes","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Split RegHydroStor into to types PumpedHydroStor and HydroStor. Both are subtypes","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"of the new abstract type HydroStorage <: EMB.Storage.","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Fix: variational OPEX for HydroStor now depends on flow_out instead of","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"flow_in. The new type PumpedHydroStor has a separate parameter for variational OPEX for the pumps, which depends on flow_in.","category":"page"},{"location":"manual/NEWS/#Version-0.4.0-(2023-06-06)","page":"Release notes","title":"Version 0.4.0 (2023-06-06)","text":"","category":"section"},{"location":"manual/NEWS/#Switch-to-TimeStruct.jl","page":"Release notes","title":"Switch to TimeStruct.jl","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Switched the time structure representation to TimeStruct.jl\nTimeStruct.jl is implemented with only the basis features that were available in TimesStructures.jl. This implies that neither operational nor strategic uncertainty is included in the model","category":"page"},{"location":"manual/NEWS/#Version-0.3.0-(2023-05-30)","page":"Release notes","title":"Version 0.3.0 (2023-05-30)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjustment to changes in EnergyModelsBase v0.4.0 related to extra input data","category":"page"},{"location":"manual/NEWS/#Version-0.2.2-(2023-05-15)","page":"Release notes","title":"Version 0.2.2 (2023-05-15)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjustment to changes in EnergyModelsBase v 0.3.3 related to the calls for the constraint functions","category":"page"},{"location":"manual/NEWS/#Version-0.2.1-(2023-02-03)","page":"Release notes","title":"Version 0.2.1 (2023-02-03)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Take the examples out to the folder examples.","category":"page"},{"location":"manual/NEWS/#Version-0.2.0-(2023-02-03)","page":"Release notes","title":"Version 0.2.0 (2023-02-03)","text":"","category":"section"},{"location":"manual/NEWS/#Adjustmends-to-updates-in-EnergyModelsBase","page":"Release notes","title":"Adjustmends to updates in EnergyModelsBase","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjustment to version 0.3.0, namely:","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Changed type (Node) calls in tests to be consistent with version 0.3.0\nRemoval of the type GlobalData and replacement with fields in the type OperationalModel in all tests\nChanged type structure to be consistent with EMB version 0.3.0\nSubstitution of certain constraints in create_node through functions which utilize dispatching on node types\nChanged the input to the function variables_node","category":"page"},{"location":"manual/NEWS/#Version-0.1.3-(2022-12-12)","page":"Release notes","title":"Version 0.1.3 (2022-12-12)","text":"","category":"section"},{"location":"manual/NEWS/#Internal-release","page":"Release notes","title":"Internal release","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Renamed to follow common prefix naming scheme\nUpdate README","category":"page"},{"location":"manual/NEWS/#Version-0.1.2-(2022-12-02)","page":"Release notes","title":"Version 0.1.2 (2022-12-02)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Minor test fixes in preparation of internal release","category":"page"},{"location":"manual/NEWS/#Version-0.1.1-(2021-09-07)","page":"Release notes","title":"Version 0.1.1 (2021-09-07)","text":"","category":"section"},{"location":"manual/NEWS/#Changes-in-naming","page":"Release notes","title":"Changes in naming","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Major changes in both variable and parameter naming, check the commit message for an overview\nChange of structure in composite type \"RegHydroStor\"","category":"page"},{"location":"manual/NEWS/#Version-0.1.0-(2021-08-23)","page":"Release notes","title":"Version 0.1.0 (2021-08-23)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Initial version with inclusion of nodes for:\nnondispatchable renewable energy sources (NonDisRES)\nregulated hydro generation (RegHydroStor, can be used for pumped hydro storage)","category":"page"},{"location":"#EnergyModelsRenewableProducers.jl","page":"Home","title":"EnergyModelsRenewableProducers.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"EnergyModelsRenewableProducers","category":"page"},{"location":"#EnergyModelsRenewableProducers","page":"Home","title":"EnergyModelsRenewableProducers","text":"Main module for EnergyModelsRenewableProducers.jl.\n\nThis module implements the following types (Nodes) with constraints:\n\nNonDisRes is a subtype of Source and represents a non-dispatchable renewable producer, as wind, solar etc.\nPumpedHydroStor is a subtype of Storage and represents a regulated pumped hydro storage.\nHydroStor is a subtype of Storage and represents a regulated hydro storage, that is a standard hydro powerplant without pumps.\n\n\n\n\n\n","category":"module"},{"location":"","page":"Home","title":"Home","text":"This Julia package implements two main nodes with corresponding JuMP constraints, extending the package EnergyModelsBase.jl with more detailed representation of renewable energy sources.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The first node, NonDisRES, models a non-dispatchable renewable energy source, like wind power, solar power, or run of river hydropower. These all use intermittent energy sources in the production of energy, so the maximum production capacity varies with the availability of the energy source at the time.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The other node implements a regulated hydropower storage plant, both with (PumpedHydroStor) and without pumps (HydroStor) for filling the reservoir with excess energy. The hydropower storage plant can also be extended as they are declared as subtypes of HydroStorage.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The new introduced node types are also documented in the public library.","category":"page"},{"location":"#Manual-outline","page":"Home","title":"Manual outline","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\n \"manual/quick-start.md\",\n \"manual/optimization-variables.md\",\n \"manual/constraint-functions.md\",\n \"manual/simple-example.md\"\n]","category":"page"},{"location":"#Library-outline","page":"Home","title":"Library outline","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\n \"library/public.md\"\n \"library/internals.md\"\n ]","category":"page"},{"location":"library/public/#sec_lib_public","page":"Public","title":"Public interface","text":"","category":"section"},{"location":"library/public/#NonDisRES_public","page":"Public","title":"NonDisRES (non-dispatchable renewable energy source)","text":"","category":"section"},{"location":"library/public/","page":"Public","title":"Public","text":"This type models both wind power, solar power, and run of river hydropower. These have in common that they generate power from an intermittent energy source, so they can have large variations in power output, based on the availability of the renewable source at the time. These power sources can be modelled using the same type NonDisRES. The new type is a subtype of EMB.Source. The new type only differs from its supertype through the field profile.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The field profile::TimeProfile is a dimensionless ratio (between 0 and 1) describing how much of the installed capacity is utilized at the current operational period. Therefore, when using NonDisRES to model some renewable source, the data provided to this field is what defines the intermittent characteristics of the source.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The NonDisRES node is modelled very similar to a regular EMB.Source} node. The only difference is how the intermittent nature of the non-dispatchable source is handled. The maximum power generation of the source in the operational period t depends on the time-dependent Profile variable.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"note: Note\nIf not needed, the production does not need to run at full capacity. The amount of energy not produced is computed using the non-negative optimization variable textttcurtailment (declared for NonDisRES nodes only).","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The fields of the different types are listed below:","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"NonDisRES","category":"page"},{"location":"library/public/#EnergyModelsRenewableProducers.NonDisRES","page":"Public","title":"EnergyModelsRenewableProducers.NonDisRES","text":"A non-dispatchable renewable energy source.\n\nFields\n\nid is the name/identifyer of the node.\ncap::TimeProfile is the installed capacity.\nprofile::TimeProfile is the power production in each operational period as a ratio of the installed capacity at that time.\nopex_var::TimeProfile is the variational operational costs per energy unit produced.\nopex_fixed::TimeProfile is the fixed operational costs.\noutput::Dict{Resource, Real} are the generated Resources, normally Power.\ndata::Vector{Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.\n\n\n\n\n\n","category":"type"},{"location":"library/public/#HydroStorage_public","page":"Public","title":"HydroStorage (regulated hydro storage with or without pump)","text":"","category":"section"},{"location":"library/public/","page":"Public","title":"Public","text":"A hydropower plant is much more flexible than, e.g., a wind farm since the water can be stored for later use. Energy can be produced (almost) whenever it is needed. Some hydropower plants also have pumps installed. These are used to pump water into the reservoir when excess and cheap energy is available in the network.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The field rate_cap describes the installed production capacity of the (aggregated) hydropower plant. The variable level_init represents the initial energy available in the reservoir in the beginning of each investment period, while stor_cap is the installed storage capacity in the reservoir. The variable level_inflow describes the inflow into the reservoir (measured in energy units), while level_min is the allowed minimum storage level in the dam, given as a ratio of the installed storage capacity of the reservoir at every operational period. The required minimum level is enforced by NVE and varies over the year. The resources stored in the hydro storage is set as stor_res, similar to a regular EMB.RefStorage.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The five last parameters are used in the same way as in EMB.Storage. In the implementation of PumpedHydroStor, the values set in input represents a loss of energy when using the pumps. A value of 1 means no energy loss, while a value of 0 represents 100% energy loss of that inflow variable. PumpedHydroStor has in addition the field opex_var_pump::TimeProfile. This field corresponds to the variable operational expenditures when pumping water into the storage reservoir.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"Since we also want to be able to model hydropower plant nodes without pumps, we include the boolean has_pump in the type describing hydropower. For combining the behavior of a hydropower plant with and without a pump, we can disable the inflow of energy by setting the constraint","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"textttflow_inn t p_textttPower = 0","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"for the stored resource p_textttPower for the node n ::HydroStor. To access this variable, we therefore have to let the type HydroStorage be a subtype of EMB.Storage.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The fields of the different types are listed below:","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"HydroStorage\nHydroStor\nPumpedHydroStor\nRegHydroStor","category":"page"},{"location":"library/public/#EnergyModelsRenewableProducers.HydroStorage","page":"Public","title":"EnergyModelsRenewableProducers.HydroStorage","text":"An abstract type for hydro storage nodes, with or without pumping. \n\n\n\n\n\n","category":"type"},{"location":"library/public/#EnergyModelsRenewableProducers.HydroStor","page":"Public","title":"EnergyModelsRenewableProducers.HydroStor","text":"A regulated hydropower storage, modelled as a Storage node.\n\nFields\n\nid is the name/identifyer of the node.\nrate_cap::TimeProfile: installed capacity.\nstor_cap::TimeProfile Initial installed storage capacity in the dam.\nlevel_init::TimeProfile Initial energy stored in the dam, in units of power.\nlevel_inflow::TimeProfile Inflow of power per operational period.\nlevel_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.\nopex_var::TimeProfile Operational cost per GWh produced.\nopex_fixed::TimeProfile Fixed operational costs.\nstor_res::ResourceCarrier is the stored Resource.\ninput::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.\noutput::Dict{Resource, Real} can only contain one entry, the stored resource.\ndata::Vector{Data} additional data (e.g. for investments). The field data is conditional through usage of a constructor.\n\n\n\n\n\n","category":"type"},{"location":"library/public/#EnergyModelsRenewableProducers.PumpedHydroStor","page":"Public","title":"EnergyModelsRenewableProducers.PumpedHydroStor","text":"A regulated hydropower storage with pumping capabilities, modelled as a Storage node.\n\nFields\n\nid is the name/identifyer of the node.\nrate_cap::TimeProfile: installed capacity.\nstor_cap::TimeProfile Initial installed storage capacity in the dam.\nlevel_init::TimeProfile Initial energy stored in the dam, in units of power.\nlevel_inflow::TimeProfile Inflow of power per operational period.\nlevel_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.\nopex_var::TimeProfile Operational cost per GWh produced.\nopex_var_pump::TimeProfile Operational cost per GWh pumped into the reservoir.\nopex_fixed::TimeProfile Fixed operational costs.\nstor_res::ResourceCarrier is the stored Resource.\ninput::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.\noutput::Dict{Resource, Real} can only contain one entry, the stored resource.\ndata::Vector{Data} additional data (e.g. for investments). The field data is conditional through usage of a constructor.\n\n\n\n\n\n","category":"type"},{"location":"library/public/#EnergyModelsRenewableProducers.RegHydroStor","page":"Public","title":"EnergyModelsRenewableProducers.RegHydroStor","text":"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.\n\nIf you are creating a new model, it is advised to directly use the types HydroStor and PumpedHydroStor.\n\nFields\n\nid is the name/identifyer of the node.\nrate_cap::TimeProfile: installed capacity.\nstor_cap::TimeProfile Initial installed storage capacity in the dam.\nhas_pump::Bool states wheter the stored resource can flow in.\nlevel_init::TimeProfile Initial energy stored in the dam, in units of power.\nlevel_inflow::TimeProfile Inflow of power per operational period.\nlevel_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.\nopex_var::TimeProfile Operational cost per GWh produced.\nopex_fixed::TimeProfile Fixed operational costs.\nstor_res::ResourceCarrier is the stored Resource.\ninput::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.\noutput::Dict{Resource, Real} can only contain one entry, the stored resource.\ndata::Array{Data} additional data (e.g. for investments).\n\n\n\n\n\n","category":"function"},{"location":"manual/constraint-functions/#constraint_functions","page":"Constraint functions","title":"Constraint functions","text":"","category":"section"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"The HydroStorage types dispatch on individual functions from within EnergyModelsBase.jl ti extend the functionality","category":"page"},{"location":"manual/constraint-functions/#Storage-level-constraints","page":"Constraint functions","title":"Storage level constraints","text":"","category":"section"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"All HydroStorage subtypes utilize the same function, constraints_level(m, n::Storage, 𝒯, 𝒫, modeltype::EnergyModel), for calling the two relevant subfunctions.","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"The function","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"EMB.constraints_level_aux(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"is extended to account for both the provision of an initial level at the start of each strategic period as well as modifying the constraint for the variable textttstor_level_Deltatexttt_op to account for the introduction of the new variable texttthydro_spill. The former is required for HydroStorage subtypes asthe initial level is frequently a function of the season (excluding small scale pumped hydro storage) while the latter is required to include spillage.","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"The functions","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"EMB.constraints_level_sp(m, n::HydroStorage, t_inv, 𝒫, modeltype::EnergyModel)","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"are similar to the function used for RefStorage{T} where {T<:ResourceCarrier}. It is however necessary to reintroduce it due to the declaration for RefStorage in EnergyModelsBase.jl. This will most likely be adjusted in later versions, although it will not impact the user directly.","category":"page"},{"location":"manual/constraint-functions/#Operational-expenditure-constraints","page":"Constraint functions","title":"Operational expenditure constraints","text":"","category":"section"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"Variable operational expenditure (OPEX) constraints are slightly different defined in the case of HydroStor and PumpedHydroStor nodes. Hence, dispatch is required on the individual constraints:","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"EMB.constraints_opex_var(m, n::HydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)\nEMB.constraints_opex_var(m, n::PumpedHydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"Within a HydroStor node, the variable OPEX is defined via the outflow from the hydropower plant, contrary to the definition of a RefStorage node in which the variable OPEX is defined via the inflow. A PumpedHydroStor has contributions by both the inflow (through the field opex_var_pump) and the outflow (through the field opex_var).","category":"page"}] +[{"location":"manual/quick-start/#quick_start","page":"Quick Start","title":"Quick Start","text":"","category":"section"},{"location":"manual/quick-start/","page":"Quick Start","title":"Quick Start","text":"Install the most recent version of Julia\nInstall the package EnergyModelsBase and the time package TimeStruct, by running:\n] add TimeStruct\n] add EnergyModelsBase\nThese packages are required as we do not only use them internally, but also for building a model.\nInstall the package EnergyModelsRenewableProducers\n] add EnergyModelsRenewableProducers","category":"page"},{"location":"manual/quick-start/","page":"Quick Start","title":"Quick Start","text":"note: Note\nIf you receive the error that EnergyModelsRenewableProducers is not yet registered, you have to add the package using the GitHub repository through] add https://github.com/EnergyModelsX/EnergyModelsRenewableProducers.jlOnce the package is registered, this is not required.","category":"page"},{"location":"manual/simple-example/#Examples","page":"Examples","title":"Examples","text":"","category":"section"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"For the content of the example, see the examples directory in the project repository.","category":"page"},{"location":"manual/simple-example/#The-package-is-installed-with-]-add","page":"Examples","title":"The package is installed with ] add","text":"","category":"section"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"From the Julia REPL, run","category":"page"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"# Starts the Julia REPL\njulia> using EnergyModelsRenewableProducers\n# Get the path of the examples directory\njulia> exdir = joinpath(pkgdir(EnergyModelsRenewableProducers), \"examples\")\n# Include the code into the Julia REPL to run the first example of the NonDisRes node\njulia> include(joinpath(exdir, \"simple_nondisres.jl\"))\n# Include the code into the Julia REPL to run the first example of the Hydropower node\njulia> include(joinpath(exdir, \"simple_hydro_power.jl\"))","category":"page"},{"location":"manual/simple-example/#The-code-was-downloaded-with-git-clone","page":"Examples","title":"The code was downloaded with git clone","text":"","category":"section"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"The examples can then be run from the terminal with","category":"page"},{"location":"manual/simple-example/","page":"Examples","title":"Examples","text":"~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_nondisres.jl\n~/../EnergyModelsRenewableProducers.jl/examples $ julia simple_hydro_power.jl","category":"page"},{"location":"manual/optimization-variables/#optimization_variables","page":"Optimization variables","title":"Optimization variables","text":"","category":"section"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"EnergyModelsRenewableProduces.jl declares new variables for the introduced Nodes. The different variables are explained below including how they are introduced in different constraints. Thes variables are created by the method EMB.variables_node which is a method dispatched on from EnergyModelsBase.jl.","category":"page"},{"location":"manual/optimization-variables/#[NonDisRES](@ref)","page":"Optimization variables","title":"NonDisRES","text":"","category":"section"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"NonDisRES is a subtype of the Source node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefSource node declared in EnergyModelsBase.jl.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"In addition, the following new optimization variable is added:","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"textttcurtailmentn t: Curtailment of NonDisRES node n in operational period t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"Curtailment represents the amount of energy not produced by node n ::NonDisRes at operational period t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"The variable is used in the following constraint within EMB.create_node(m, n::NonDisRES, 𝒯, 𝒫, modeltype::EnergyModel),","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"textttcap_usen t + textttcurtailmentn t = textttprofile(n t) cdot textttcap_instn t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"note: Note\nBrackets n t correspond to accessing a variable, while parenthesis (n t) correspond to functions for accessing fields of a composite type.","category":"page"},{"location":"manual/optimization-variables/#[HydroStorage](@ref)","page":"Optimization variables","title":"HydroStorage","text":"","category":"section"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"Both PumpedHydroStor and HydroStor are in a fist instance subtypes of HydroStorage, and hence, subtypes of the Storage node declared in EnergyModelsBase.jl. Hence, it has by default the same variables as a RefStorage node declared in EnergyModelsBase.jl.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"In addition, the following new optimization variable is added:","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"texttthydro_spilln t: Spillage from HydroStorage node n in operational period t.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"The spillage is introduced to allow for an overflow from a reservoir if the inflow to a reservoir exceed its capacity and the outflow through power generation.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"The variable is used in the following constraint EMB.constraints_level_aux,","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"textttstor_level_Deltatexttt_opn t = textttlevel_inflow(n t) + textttinputs(n p_textttPower) cdot textttflow_inn t + textttstor_rate_usen t - texttthydro_spilln t","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"for the stored resource p_textttPower.","category":"page"},{"location":"manual/optimization-variables/","page":"Optimization variables","title":"Optimization variables","text":"note: Note\nBrackets n t correspond to accessing a variable, while parenthesis (n t) correspond to functions for accessing fields of a composite type.","category":"page"},{"location":"library/internals/#Internals","page":"Internals","title":"Internals","text":"","category":"section"},{"location":"library/internals/#Types","page":"Internals","title":"Types","text":"","category":"section"},{"location":"library/internals/","page":"Internals","title":"Internals","text":"Modules = [EnergyModelsRenewableProducers]\nPublic = false\nOrder = [:type]","category":"page"},{"location":"library/internals/#Methods","page":"Internals","title":"Methods","text":"","category":"section"},{"location":"library/internals/","page":"Internals","title":"Internals","text":"Modules = [EnergyModelsRenewableProducers]\nPublic = false\nOrder = [:function]","category":"page"},{"location":"library/internals/#EnergyModelsBase.check_node-Tuple{HydroStorage, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.check_node","text":"EMB.check_node(n::HydroStorage, 𝒯, modeltype::EMB.EnergyModel)\n\nThis method checks that the HydroStorage node is valid.\n\nChecks\n\nThe field n.output can only include a single Resource.\nThe value of the field output is required to be smaller or equal to 1.\nThe value of the field input is required to be in the range 0 1.\nThe 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 mathcalT.\nThe value of the field level_init is required to be in the range 0 1.\nThe value of the field rate_cap is required to be non-negative.\nThe value of the field level_min is required to be in the range 0 1.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.check_node-Tuple{NonDisRES, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.check_node","text":"EMB.check_node(n::NonDisRES, 𝒯, modeltype::EMB.EnergyModel)\n\nThis method checks that the NonDisRES node is valid.\n\nChecks\n\nThe field profile is required to be in the range 0 1 for all time steps t mathcalT.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_capacity-Tuple{Any, NonDisRES, TimeStruct.TimeStructure, EnergyModel}","page":"Internals","title":"EnergyModelsBase.constraints_capacity","text":"constraints_capacity(m, n::NonDisRES, 𝒯::TimeStructure, modeltype::EnergyModel)\n\nFunction for creating the constraint on the maximum capacity of a NonDisRES. Also sets the constraint defining curtailment.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_level_aux-Tuple{Any, HydroStorage, Any, Any, Any}","page":"Internals","title":"EnergyModelsBase.constraints_level_aux","text":"EMB.constraints_level_aux(m, n::HydroStorage, 𝒯, 𝒫, modeltype)\n\nFunction for creating the Δ constraint for the level of a HydroStorage node as well as the specificaiton of the initial level in a strategic period.\n\nThe 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.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_level_sp-Union{Tuple{U}, Tuple{T}, Tuple{Any, HydroStorage, TimeStruct.StrategicPeriod{T, TimeStruct.RepresentativePeriods{U, T, TimeStruct.SimpleTimes{T}}}, Any, Any}} where {T, U}","page":"Internals","title":"EnergyModelsBase.constraints_level_sp","text":"EMB.constraints_level_sp(\n m,\n n::HydroStorage,\n t_inv::TS.StrategicPeriod{T, RepresentativePeriods{U, T, SimpleTimes{T}}},\n 𝒫,\n modeltype\n ) where {T, U}\n\nFunction for creating the level constraint for a HydroStorage storage node when the operational TimeStructure is given as RepresentativePeriods.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_level_sp-Union{Tuple{U}, Tuple{T}, Tuple{Any, HydroStorage, TimeStruct.StrategicPeriod{T, U}, Any, Any}} where {T, U<:TimeStruct.SimpleTimes}","page":"Internals","title":"EnergyModelsBase.constraints_level_sp","text":"EMB.constraints_level_sp(\n m,\n n::HydroStorage,\n t_inv::TS.StrategicPeriod{T, U},\n 𝒫,\n modeltype\n ) where {T, U<:SimpleTimes}\n\nFunction for creating the level constraint for a HydroStorage node when the TimeStructure is given as SimpleTimes.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_opex_var-Tuple{Any, HydroStor, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.constraints_opex_var","text":"constraints_opex_var(m, n::HydroStor, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)\n\nFunction for creating the constraint on the variable OPEX of a HydroStor.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.constraints_opex_var-Tuple{Any, PumpedHydroStor, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.constraints_opex_var","text":"constraints_opex_var(m, n::PumpedHydroStor, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)\n\nFunction for creating the constraint on the variable OPEX of a PumpedHydroStor.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.create_node-Tuple{Any, HydroStorage, Any, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.create_node","text":"EMB.create_node(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)\n\nSets all constraints for the regulated hydro storage node.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.variables_node-Tuple{Any, Vector{HydroStorage}, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.variables_node","text":"EMB.variables_node(m, 𝒩::Vector{HydroStorage}, 𝒯, modeltype::EnergyModel)\n\nCreate 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. \n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsBase.variables_node-Tuple{Any, Vector{NonDisRES}, Any, EnergyModel}","page":"Internals","title":"EnergyModelsBase.variables_node","text":"EMB.variables_node(m, 𝒩ⁿᵈʳ::Vector{NonDisRES}, 𝒯, modeltype::EnergyModel)\n\nCreate the optimization variable :curtailment for every NonDisRES node. This method is called from EnergyModelsBase.jl.\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.level_inflow-Tuple{HydroStorage, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.level_inflow","text":"level_inflow(n::HydroStorage, t)\n\nReturns the inflow to a node n of type HydroStorage at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.level_init-Tuple{HydroStorage, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.level_init","text":"level_init(n::HydroStorage, t)\n\nReturns the innitial level of a node n of type HydroStorage at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.level_min-Tuple{HydroStorage, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.level_min","text":"level_min(n::HydroStorage, t)\n\nReturns the minimum level of a node n of type HydroStorage at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.opex_var_pump-Tuple{PumpedHydroStor, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.opex_var_pump","text":"opex_var_pump(n::PumpedHydroStor, t)\n\nReturns the variable OPEX of a node n of type PumpedHydroStor related to pumping at operational period t\n\n\n\n\n\n","category":"method"},{"location":"library/internals/#EnergyModelsRenewableProducers.profile-Tuple{NonDisRES, Any}","page":"Internals","title":"EnergyModelsRenewableProducers.profile","text":"profile(n::NonDisRES, t)\n\nReturns the profile of a node n of type NonDisRES at operational period t.\n\n\n\n\n\n","category":"method"},{"location":"manual/NEWS/#Release-notes","page":"Release notes","title":"Release notes","text":"","category":"section"},{"location":"manual/NEWS/#Unversioned","page":"Release notes","title":"Unversioned","text":"","category":"section"},{"location":"manual/NEWS/#Examples","page":"Release notes","title":"Examples","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Fixed a bug when running the examples from a non-cloned version of EnergyModelsRenewableProducers.\nThis was achieved through a separate Project.toml in the examples.","category":"page"},{"location":"manual/NEWS/#NonDIsRes-node","page":"Release notes","title":"NonDIsRes node","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Moved the capcity constraints through the profile to the function constraints_capacity(n::NonDisRES, ...), and hence, removed the function EMB.create_node(n::NonDisRES, ...).","category":"page"},{"location":"manual/NEWS/#Version-0.5.3-(2024-01-30)","page":"Release notes","title":"Version 0.5.3 (2024-01-30)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Updated the restrictions on the fields individual types to be consistent.\nAdded option to not include the field data for the individual TransmissionModes.","category":"page"},{"location":"manual/NEWS/#Version-0.5.2-(2024-01-19)","page":"Release notes","title":"Version 0.5.2 (2024-01-19)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Updated the documenation to be in line with the updated done in EnergyModelsBsae.\nMoved RegHydroStor to a new file, legacy_constructors.jl to highlight that a user should use the new types, namely HydroStor and PumpedHydroStor.","category":"page"},{"location":"manual/NEWS/#Version-0.5.1-(2024-01-17)","page":"Release notes","title":"Version 0.5.1 (2024-01-17)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Update the method constraints_level to match the signature updates for these methods in EnergyModelsBase. This includes renaming constraints_level to constraints_level_sp.\nMoved the function to EMB.constraints_level_sp to avoid problems.","category":"page"},{"location":"manual/NEWS/#Version-0.5.0-(2023-12-18)","page":"Release notes","title":"Version 0.5.0 (2023-12-18)","text":"","category":"section"},{"location":"manual/NEWS/#Adjustment-to-release-in-EMB-0.6.0","page":"Release notes","title":"Adjustment to release in EMB 0.6.0","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjusted the code for the new release.\nImplementation of support for RepresentativePeriods for HydroStorage nodes.","category":"page"},{"location":"manual/NEWS/#Version-0.4.2-(2023-09-01)","page":"Release notes","title":"Version 0.4.2 (2023-09-01)","text":"","category":"section"},{"location":"manual/NEWS/#Create-a-variable-:spill-for-hydro-storage-node","page":"Release notes","title":"Create a variable :spill for hydro storage node","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"This variable enables hydro storage nodes to spill water from the reservoir without producing energy.","category":"page"},{"location":"manual/NEWS/#Version-0.4.1-(2023-08-31)","page":"Release notes","title":"Version 0.4.1 (2023-08-31)","text":"","category":"section"},{"location":"manual/NEWS/#Split-the-hydro-storage-node-into-to-separate-nodes","page":"Release notes","title":"Split the hydro storage node into to separate nodes","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Split RegHydroStor into to types PumpedHydroStor and HydroStor. Both are subtypes","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"of the new abstract type HydroStorage <: EMB.Storage.","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Fix: variational OPEX for HydroStor now depends on flow_out instead of","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"flow_in. The new type PumpedHydroStor has a separate parameter for variational OPEX for the pumps, which depends on flow_in.","category":"page"},{"location":"manual/NEWS/#Version-0.4.0-(2023-06-06)","page":"Release notes","title":"Version 0.4.0 (2023-06-06)","text":"","category":"section"},{"location":"manual/NEWS/#Switch-to-TimeStruct.jl","page":"Release notes","title":"Switch to TimeStruct.jl","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Switched the time structure representation to TimeStruct.jl.\nTimeStruct.jl is implemented with only the basis features that were available in TimesStructures.jl. This implies that neither operational nor strategic uncertainty is included in the model.","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Version 0.3.0 (2023-05-30)","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjustment to changes in EnergyModelsBase v0.4.0 related to extra input data.","category":"page"},{"location":"manual/NEWS/#Version-0.2.2-(2023-05-15)","page":"Release notes","title":"Version 0.2.2 (2023-05-15)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjustment to changes in EnergyModelsBase v 0.3.3 related to the calls for the constraint functions.","category":"page"},{"location":"manual/NEWS/#Version-0.2.1-(2023-02-03)","page":"Release notes","title":"Version 0.2.1 (2023-02-03)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Take the examples out to the folder examples.","category":"page"},{"location":"manual/NEWS/#Version-0.2.0-(2023-02-03)","page":"Release notes","title":"Version 0.2.0 (2023-02-03)","text":"","category":"section"},{"location":"manual/NEWS/#Adjustmends-to-updates-in-EnergyModelsBase","page":"Release notes","title":"Adjustmends to updates in EnergyModelsBase","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Adjustment to version 0.3.0, namely:","category":"page"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Changed type (Node) calls in tests to be consistent with version 0.3.0.\nRemoval of the type GlobalData and replacement with fields in the type OperationalModel in all tests.\nChanged type structure to be consistent with EMB version 0.3.0.\nSubstitution of certain constraints in create_node through functions which utilize dispatching on node types.\nChanged the input to the function variables_node.","category":"page"},{"location":"manual/NEWS/#Version-0.1.3-(2022-12-12)","page":"Release notes","title":"Version 0.1.3 (2022-12-12)","text":"","category":"section"},{"location":"manual/NEWS/#Internal-release","page":"Release notes","title":"Internal release","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Renamed to follow common prefix naming scheme.\nUpdate README.","category":"page"},{"location":"manual/NEWS/#Version-0.1.2-(2022-12-02)","page":"Release notes","title":"Version 0.1.2 (2022-12-02)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Minor test fixes in preparation of internal release.","category":"page"},{"location":"manual/NEWS/#Version-0.1.1-(2021-09-07)","page":"Release notes","title":"Version 0.1.1 (2021-09-07)","text":"","category":"section"},{"location":"manual/NEWS/#Changes-in-naming","page":"Release notes","title":"Changes in naming","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Major changes in both variable and parameter naming, check the commit message for an overview.\nChange of structure in composite type \"RegHydroStor\".","category":"page"},{"location":"manual/NEWS/#Version-0.1.0-(2021-08-23)","page":"Release notes","title":"Version 0.1.0 (2021-08-23)","text":"","category":"section"},{"location":"manual/NEWS/","page":"Release notes","title":"Release notes","text":"Initial version with inclusion of nodes for:\nnondispatchable renewable energy sources (NonDisRES) and\nregulated hydro generation (RegHydroStor, can be used for pumped hydro storage).","category":"page"},{"location":"#EnergyModelsRenewableProducers.jl","page":"Home","title":"EnergyModelsRenewableProducers.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"EnergyModelsRenewableProducers","category":"page"},{"location":"#EnergyModelsRenewableProducers","page":"Home","title":"EnergyModelsRenewableProducers","text":"Main module for EnergyModelsRenewableProducers.jl.\n\nThis module implements the following types (Nodes) with constraints:\n\nNonDisRes is a subtype of Source and represents a non-dispatchable renewable producer, as wind, solar etc.\nPumpedHydroStor is a subtype of Storage and represents a regulated pumped hydro storage.\nHydroStor is a subtype of Storage and represents a regulated hydro storage, that is a standard hydro powerplant without pumps.\n\n\n\n\n\n","category":"module"},{"location":"","page":"Home","title":"Home","text":"This Julia package implements two main nodes with corresponding JuMP constraints, extending the package EnergyModelsBase.jl with more detailed representation of renewable energy sources.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The first node, NonDisRES, models a non-dispatchable renewable energy source, like wind power, solar power, or run of river hydropower. These all use intermittent energy sources in the production of energy, so the maximum production capacity varies with the availability of the energy source at the time.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The other node implements a regulated hydropower storage plant, both with (PumpedHydroStor) and without pumps (HydroStor) for filling the reservoir with excess energy. The hydropower storage plant can also be extended as they are declared as subtypes of HydroStorage.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The new introduced node types are also documented in the public library.","category":"page"},{"location":"#Manual-outline","page":"Home","title":"Manual outline","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\n \"manual/quick-start.md\",\n \"manual/optimization-variables.md\",\n \"manual/constraint-functions.md\",\n \"manual/simple-example.md\"\n]","category":"page"},{"location":"#Library-outline","page":"Home","title":"Library outline","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\n \"library/public.md\"\n \"library/internals.md\"\n ]","category":"page"},{"location":"library/public/#sec_lib_public","page":"Public","title":"Public interface","text":"","category":"section"},{"location":"library/public/#NonDisRES_public","page":"Public","title":"NonDisRES (non-dispatchable renewable energy source)","text":"","category":"section"},{"location":"library/public/","page":"Public","title":"Public","text":"This type models both wind power, solar power, and run of river hydropower. These have in common that they generate power from an intermittent energy source, so they can have large variations in power output, based on the availability of the renewable source at the time. These power sources can be modelled using the same type NonDisRES. The new type is a subtype of EMB.Source. The new type only differs from its supertype through the field profile.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The field profile::TimeProfile is a dimensionless ratio (between 0 and 1) describing how much of the installed capacity is utilized at the current operational period. Therefore, when using NonDisRES to model some renewable source, the data provided to this field is what defines the intermittent characteristics of the source.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The NonDisRES node is modelled very similar to a regular EMB.Source} node. The only difference is how the intermittent nature of the non-dispatchable source is handled. The maximum power generation of the source in the operational period t depends on the time-dependent Profile variable.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"note: Note\nIf not needed, the production does not need to run at full capacity. The amount of energy not produced is computed using the non-negative optimization variable textttcurtailment (declared for NonDisRES nodes only).","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The fields of the different types are listed below:","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"NonDisRES","category":"page"},{"location":"library/public/#EnergyModelsRenewableProducers.NonDisRES","page":"Public","title":"EnergyModelsRenewableProducers.NonDisRES","text":"A non-dispatchable renewable energy source.\n\nFields\n\nid is the name/identifyer of the node.\ncap::TimeProfile is the installed capacity.\nprofile::TimeProfile is the power production in each operational period as a ratio of the installed capacity at that time.\nopex_var::TimeProfile is the variational operational costs per energy unit produced.\nopex_fixed::TimeProfile is the fixed operational costs.\noutput::Dict{Resource, Real} are the generated Resources, normally Power.\ndata::Vector{Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.\n\n\n\n\n\n","category":"type"},{"location":"library/public/#HydroStorage_public","page":"Public","title":"HydroStorage (regulated hydro storage with or without pump)","text":"","category":"section"},{"location":"library/public/","page":"Public","title":"Public","text":"A hydropower plant is much more flexible than, e.g., a wind farm since the water can be stored for later use. Energy can be produced (almost) whenever it is needed. Some hydropower plants also have pumps installed. These are used to pump water into the reservoir when excess and cheap energy is available in the network.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The field rate_cap describes the installed production capacity of the (aggregated) hydropower plant. The variable level_init represents the initial energy available in the reservoir in the beginning of each investment period, while stor_cap is the installed storage capacity in the reservoir. The variable level_inflow describes the inflow into the reservoir (measured in energy units), while level_min is the allowed minimum storage level in the dam, given as a ratio of the installed storage capacity of the reservoir at every operational period. The required minimum level is enforced by NVE and varies over the year. The resources stored in the hydro storage is set as stor_res, similar to a regular EMB.RefStorage.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The five last parameters are used in the same way as in EMB.Storage. In the implementation of PumpedHydroStor, the values set in input represents a loss of energy when using the pumps. A value of 1 means no energy loss, while a value of 0 represents 100% energy loss of that inflow variable. PumpedHydroStor has in addition the field opex_var_pump::TimeProfile. This field corresponds to the variable operational expenditures when pumping water into the storage reservoir.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"Since we also want to be able to model hydropower plant nodes without pumps, we include the boolean has_pump in the type describing hydropower. For combining the behavior of a hydropower plant with and without a pump, we can disable the inflow of energy by setting the constraint","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"textttflow_inn t p_textttPower = 0","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"for the stored resource p_textttPower for the node n ::HydroStor. To access this variable, we therefore have to let the type HydroStorage be a subtype of EMB.Storage.","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"The fields of the different types are listed below:","category":"page"},{"location":"library/public/","page":"Public","title":"Public","text":"HydroStorage\nHydroStor\nPumpedHydroStor\nRegHydroStor","category":"page"},{"location":"library/public/#EnergyModelsRenewableProducers.HydroStorage","page":"Public","title":"EnergyModelsRenewableProducers.HydroStorage","text":"An abstract type for hydro storage nodes, with or without pumping. \n\n\n\n\n\n","category":"type"},{"location":"library/public/#EnergyModelsRenewableProducers.HydroStor","page":"Public","title":"EnergyModelsRenewableProducers.HydroStor","text":"A regulated hydropower storage, modelled as a Storage node.\n\nFields\n\nid is the name/identifyer of the node.\nrate_cap::TimeProfile: installed capacity.\nstor_cap::TimeProfile Initial installed storage capacity in the dam.\nlevel_init::TimeProfile Initial energy stored in the dam, in units of power.\nlevel_inflow::TimeProfile Inflow of power per operational period.\nlevel_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.\nopex_var::TimeProfile Operational cost per GWh produced.\nopex_fixed::TimeProfile Fixed operational costs.\nstor_res::ResourceCarrier is the stored Resource.\ninput::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.\noutput::Dict{Resource, Real} can only contain one entry, the stored resource.\ndata::Vector{Data} additional data (e.g. for investments). The field data is conditional through usage of a constructor.\n\n\n\n\n\n","category":"type"},{"location":"library/public/#EnergyModelsRenewableProducers.PumpedHydroStor","page":"Public","title":"EnergyModelsRenewableProducers.PumpedHydroStor","text":"A regulated hydropower storage with pumping capabilities, modelled as a Storage node.\n\nFields\n\nid is the name/identifyer of the node.\nrate_cap::TimeProfile: installed capacity.\nstor_cap::TimeProfile Initial installed storage capacity in the dam.\nlevel_init::TimeProfile Initial energy stored in the dam, in units of power.\nlevel_inflow::TimeProfile Inflow of power per operational period.\nlevel_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.\nopex_var::TimeProfile Operational cost per GWh produced.\nopex_var_pump::TimeProfile Operational cost per GWh pumped into the reservoir.\nopex_fixed::TimeProfile Fixed operational costs.\nstor_res::ResourceCarrier is the stored Resource.\ninput::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.\noutput::Dict{Resource, Real} can only contain one entry, the stored resource.\ndata::Vector{Data} additional data (e.g. for investments). The field data is conditional through usage of a constructor.\n\n\n\n\n\n","category":"type"},{"location":"library/public/#EnergyModelsRenewableProducers.RegHydroStor","page":"Public","title":"EnergyModelsRenewableProducers.RegHydroStor","text":"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.\n\nIf you are creating a new model, it is advised to directly use the types HydroStor and PumpedHydroStor.\n\nFields\n\nid is the name/identifyer of the node.\nrate_cap::TimeProfile: installed capacity.\nstor_cap::TimeProfile Initial installed storage capacity in the dam.\nhas_pump::Bool states wheter the stored resource can flow in.\nlevel_init::TimeProfile Initial energy stored in the dam, in units of power.\nlevel_inflow::TimeProfile Inflow of power per operational period.\nlevel_min::TimeProfile Minimum fraction of the reservoir capacity that can be left.\nopex_var::TimeProfile Operational cost per GWh produced.\nopex_fixed::TimeProfile Fixed operational costs.\nstor_res::ResourceCarrier is the stored Resource.\ninput::Dict{Resource, Real} the stored and used resources. The values in the Dict is a ratio describing the energy loss when using the pumps.\noutput::Dict{Resource, Real} can only contain one entry, the stored resource.\ndata::Array{Data} additional data (e.g. for investments).\n\n\n\n\n\n","category":"function"},{"location":"manual/constraint-functions/#constraint_functions","page":"Constraint functions","title":"Constraint functions","text":"","category":"section"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"The HydroStorage types dispatch on individual functions from within EnergyModelsBase.jl ti extend the functionality","category":"page"},{"location":"manual/constraint-functions/#Storage-level-constraints","page":"Constraint functions","title":"Storage level constraints","text":"","category":"section"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"All HydroStorage subtypes utilize the same function, constraints_level(m, n::Storage, 𝒯, 𝒫, modeltype::EnergyModel), for calling the two relevant subfunctions.","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"The function","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"EMB.constraints_level_aux(m, n::HydroStorage, 𝒯, 𝒫, modeltype::EnergyModel)","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"is extended to account for both the provision of an initial level at the start of each strategic period as well as modifying the constraint for the variable textttstor_level_Deltatexttt_op to account for the introduction of the new variable texttthydro_spill. The former is required for HydroStorage subtypes asthe initial level is frequently a function of the season (excluding small scale pumped hydro storage) while the latter is required to include spillage.","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"The functions","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"EMB.constraints_level_sp(m, n::HydroStorage, t_inv, 𝒫, modeltype::EnergyModel)","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"are similar to the function used for RefStorage{T} where {T<:ResourceCarrier}. It is however necessary to reintroduce it due to the declaration for RefStorage in EnergyModelsBase.jl. This will most likely be adjusted in later versions, although it will not impact the user directly.","category":"page"},{"location":"manual/constraint-functions/#Operational-expenditure-constraints","page":"Constraint functions","title":"Operational expenditure constraints","text":"","category":"section"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"Variable operational expenditure (OPEX) constraints are slightly different defined in the case of HydroStor and PumpedHydroStor nodes. Hence, dispatch is required on the individual constraints:","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"EMB.constraints_opex_var(m, n::HydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)\nEMB.constraints_opex_var(m, n::PumpedHydroStor, 𝒯::TimeStructure, modeltype::EnergyModel)","category":"page"},{"location":"manual/constraint-functions/","page":"Constraint functions","title":"Constraint functions","text":"Within a HydroStor node, the variable OPEX is defined via the outflow from the hydropower plant, contrary to the definition of a RefStorage node in which the variable OPEX is defined via the inflow. A PumpedHydroStor has contributions by both the inflow (through the field opex_var_pump) and the outflow (through the field opex_var).","category":"page"}] }