Nodes

Index

Sink Node types

The following sink node types are implemented in the EnergyModelsFlex:

EnergyModelsFlex.PeriodDemandSinkType
struct PeriodDemandSink <: AbstractPeriodDemandSink

A PeriodDemandSink is a Sink that has a demand that can be satisfied any time during a period of defined length. If the chosen time structure has operational periods of a duration of 1 hour and the demand should be fulfilled daily, period_duration should be 24. The demand for each day is then set as a time profile in the period_demand field. The cap field is the maximum capacity that can be fulfilled in each operational period.

Fields

  • id::Any is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • period_duration::TimeProfile is the sum of the durations of the individual operational periods within a given demand period. Due to a constructor, it can either be specified as number (the same duration in all demand periods), as a vector (varying duration of each demand period), or as a time profile (e.g., varying period durations due to varying operational time structures). It cannot be specified as OperationalProfile.
  • period_demand::TimeProfile is the demand within each of the periods as time profile. It cannot be specified as OperationalProfile.
  • penalty::Dict{Symbol,<:TimeProfile} are penalties for surplus or deficits. The dictionary requires the fields :surplus and :deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
Changed behavior

The field period_length was replaced with the field period_duration with a change in meaning. In addition, the position was changed. This is explained in the documentation.

source
EnergyModelsFlex.StratPeriodDemandSinkType
struct StratPeriodDemandSink <: AbstractPeriodDemandSink

A StratPeriodDemandSink is a Sink that has a total demand that can specified for each strategic period through the field strat_demand. In addition, you can specify multiple demand periods, each with a minimum and maximum fraction of the total demand that can be satisified within the demand period.

Fields

  • id::Any is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • strat_demand::TimeProfile is the demand within each strategic period that must be satisfied. It must be specified as either a FixedProfile or StrategicProfile as it is indexed over strategic periods
  • period_duration::TimeProfile is the sum of the durations of the individual operational periods within a given demand period. Due to a constructor, it can either be specified as number (the same duration in all demand periods), as a vector (varying duration of each demand period), or as a time profile (e.g., varying period durations due to varying operational time structures). It cannot be specified as OperationalProfile.
  • period_min::TimeProfile is the relative fraction of the strategic demand that must be at least satisifed in each demand period.
  • period_max::TimeProfile is the relative fraction of the strategic demand that can at most be satisifed in each demand period.
  • penalty::Dict{Symbol,<:TimeProfile} are penalties for surplus or deficits. The dictionary requires the fields :surplus and :deficit. The same penalty is utilized for the strategic surplus/deficit and period surplus/deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.MultipleInputSinkType
struct MultipleInputSink <: AbstractMultipleInputSink

A Sink node with multiple inputs for satisfying the demand.

Contrary to a standard sink, it is possible to utilize the individual input resources independent of each other.

Fields

  • id::Any is the name/identifier of the node.
  • cap::TimeProfile is the demand.
  • penalty::Dict{Symbol,<:TimeProfile} are penalties for surplus or deficits. The dictionary requires the fields :surplus and :deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.BinaryMultipleInputSinkStratType
struct BinaryMultipleInputSinkStrat <: AbstractMultipleInputSinkStrat

A Sink node with multiple inputs for satisfying the demand.

This type of node corresponds to an energy service demand where several different energy carriers can satisfy the demand, but only one resource at the time (for each strategic period).

Fields

  • id::Any is the name/identifier of the node.
  • cap::TimeProfile is the demand.
  • penalty::Dict{Symbol,<:TimeProfile} are penalties for surplus or deficits. The dictionary requires the fields :surplus and :deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
Investment options

It is not possible to utilize investments for a BinaryMultipleInputSinkStrat as this would introduce bilinear constraints.

source
EnergyModelsFlex.ContinuousMultipleInputSinkStratType
struct ContinuousMultipleInputSinkStrat <: AbstractMultipleInputSinkStrat

A Sink node with multiple inputs for satisfying the demand.

This type of node corresponds to an energy service demand where several different energy carriers can satisfy the demand after the supplied energy. The fraction of the input resources are given as a variable to be optimized (for each strategic period).

Fields

  • id::Any is the name/identifier of the node.
  • cap::TimeProfile is the demand.
  • penalty::Dict{Symbol,<:TimeProfile} are penalties for surplus or deficits. The dictionary requires the fields :surplus and :deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
Investment options

It is not possible to utilize investments for a BinaryMultipleInputSinkStrat as this would introduce bilinear constraints.

source
EnergyModelsFlex.LoadShiftingNodeType
struct LoadShiftingNode <: EMB.Sink

A Sink node where the demand can be altered by load shifting. The load shifting is based on the assumption that the production happens in discrete batches. A representative batch is defined with a magnitude and a duration. A load shift will in this case mean subtracting the consumption of a representative batch from the original consumption at one time slot and adding it on another timeslot. The node is furthermore build for a case where the working shifts dictates when the batches may be initiated. Thus the timesteps where such a batch is allowed to be added/subtracted is defined by the load_shift_times field. The load_shift_times is further grouped together in groups of load_shift_times_per_period, for which the representative batches can only be shifted within this group.

Warning

The node uses indexing of the time steps and is as of now not made to handle timesteps of different durations.

Fields

  • id::Any is the name/identifier of the node.
  • cap::TimeProfile is the original Demand (before load shifting).
  • penalty::Dict{Symbol, <:TimeProfile} (not used) are penalties for surplus or deficits. Requires the fields :surplus and :deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • load_shift_times::Vector{<:Int} are the indices of the time structure that bulks of loads may be shifted from/to.
  • load_shifts_per_period::Int the upper limit of the number of load shifts within the period defined by load_shift_times_per_period that can be performed for a given period (defined by the number of timeslots that can be shifted - n_loadshift).
  • load_shift_duration::Int the number of operational periods in each load shift.
  • load_shift_magnitude::Real the magnitude for each operational period that is load shifted.
  • load_shift_times_per_period::Int the number of timeslots (from the loadshifttimes) that can be shifted.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source

Source Node types

The following source node type are implemented in the EnergyModelsFlex:

EnergyModelsFlex.PayAsProducedPPAType
struct PayAsProducedPPA <: AbstractNonDisRES

A pay-as-produced ppa energy source. It extends the existing AbstractNonDisRES node through including a constraint on the opex_var such that curtailed energy is also included in the opex.

Fields

  • id is the name/identifyer of the node.
  • cap::TimeProfile is the installed capacity.
  • profile::TimeProfile is the power production in each operational period as a ratio of the installed capacity at that time.
  • opex_var::TimeProfile is the variable operating expense per energy unit produced.
  • opex_fixed::TimeProfile is the fixed operating expense.
  • output::Dict{Resource, Real} are the generated Resources, normally Power.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.InflexibleSourceType
struct InflexibleSource <: EMB.Source

An inflexible Source node with fixed capacity. The inflexible Source node represents a source with a fixed capacity usage. Note, that if you include investments, you can only use cap as TimeProfile a FixedProfile or StrategicProfile.

Fields

  • id is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source

Network Node types

The following network node types are implemented in the EnergyModelsFlex:

EnergyModelsFlex.MinUpDownTimeNodeType
struct MinUpDownTimeNode <: UnitCommitmentNode

MinUpDownTimeNode is a specialized NetworkNode type that introduces unit commitment logic including minimum up and down time constraints. It is useful for modeling dispatchable power plants or technologies where operation must adhere to minimum runtime constraints.

Fields

  • id: Identifier or name for the node.
  • cap::TimeProfile is the installed capacity.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • min_time_up::Real is the minimum number of operational periods the unit must remain on after being started.
  • min_time_down::Real is the minimum number of operational periods the unit must remain off after being stopped.
  • load_min::Real is the minimum capacity output when the unit is on.
  • load_max::Real is the maximum capacity output when the unit is on (usually aligned with cap).
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.ActivationCostNodeType
struct ActivationCostNode <: UnitCommitmentNode

ActivationCostNode is a specialized NetworkNode that introduces unit commitment logic with additional fuel or resource costs incurred upon startup. It models technologies that consume extra input when switching on, such as combustion turbines or thermal boilers.

Fields

  • id is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • activation_time::Real: Duration of activation effect (currently used to inform activation logic in customized formulations).
  • activation_consumption::Dict{<:Resource,<:Real} are the additional input resources required when the unit switches on with their absolute demand.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.LimitedFlexibleInputType
struct LimitedFlexibleInput <: NetworkNode

A LimitedFlexibleInput node. The LimitedFlexibleInput utilizes a linear, time independent conversion rate of the input Resources to the output Resources, subject to the available capacity and limitation of the Resources given by the limit field.

As opposed to the RefNetworkNode in EnergyModelsBase, the LimitedFlexibleInput node introduces a limit on the fraction a given resource can contribute to the total inflow.

Fields

  • id is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • limit::Dict{<:Resource, <:Real} are the limits for each Resources of the total input.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.CombustionType
struct Combustion <: NetworkNode

A Combustion node. The Combustion is similar to LimitedFlexibleInputs but requires energy balances in the sense that the output heat_res captures the lost energy.

Fields

  • id is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • limit::Dict{<:Resource, <:Real} are the limits for each Resources of the total input.
  • heat_res::Resource the residual heat resource.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsFlex.FlexibleOutputType
struct FlexibleOutput <: NetworkNode

A FlexibleOutput node.

The FlexibleOutput is similar to NetworkNodes but introduces flexibility in the output as the capacity use is given by the sum of these.

Fields

  • id is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source

Storage Node types

The following storage node types are implemented in the EnergyModelsFlex:

EnergyModelsFlex.StorageEfficiencyType
struct StorageEfficiency{T} <: EMB.Storage{T}

A StorageEfficiency node which enables storage efficiency control compared to RefStorage{T}.

It is designed as a parametric type through the type parameter T to differentiate between different cyclic behaviours. Note that the parameter T is only used for dispatching, but does not carry any other information. Hence, it is simple to fast switch between different StorageBehaviors.

The current implemented cyclic behaviours are CyclicRepresentative and CyclicStrategic.

Fields

  • id is the name/identifier of the node.
  • charge::UnionCapacity are the charging parameters of the Storage node. Depending on the chosen type, the charge parameters can include variable OPEX and/or fixed OPEX. They must include a capacity.
  • level::UnionCapacity are the level parameters of the Storage node. Depending on the chosen type, the level parameters can include variable OPEX and/or fixed OPEX. They must include a capacity.
  • stor_res::Resource is the stored Resource.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source

The following link types are implemented in the EnergyModelsFlex:

EnergyModelsFlex.CapacityCostLinkType
struct CapacityCostLink <: Link

A link between two nodes with costs on the maximum link usage for the resource cap_resource within specified price periods. All other resources have no costs associated with their usage (as they follow the Direct approach).

Fields

  • id is the name/identifier of the link.
  • from::Node is the node from which there is flow into the link.
  • to::Node is the node to which there is flow out of the link.
  • cap::TimeProfile is the capacity of the link for the cap_resource.
  • cap_price::TimeProfile is the price of capacity usage for the cap_resource.
  • cap_period_duration::TimeProfile is a time profile describing the durations of the individual capacity price periods. Due to a constructor, it can either be specified as number (the same duration in all price periods), as a vector (varying duration of each price period), or as a time profile (e.g., varying period durations due to varying operational time structures). It cannot be specified as OperationalProfile.
  • cap_resource::Resource is the resource used by CapacityCostLink
  • formulation::Formulation is the used formulation of links. The field formulation is conditional through usage of a constructor.
  • data::Vector{<:ExtensionData} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
Changed behavior

The field cap_price_periods was replaced with the field cap_period_duration with a change in meaning. This is explained in the documentation.

source