Public interface

Area

A geographical Area consist of a location and a connection to a local energy system via a specialized Availability node called GeoAvailability. The specialized Availability node is required to modify the energy/mass balance to allow for imports and exports. Constraints related to the area keep track of a resource's export and import to the local system and exchange with other areas. Multiple dispatch is used on the Area type for imposing specific constraints. Hence, other restrictions can be applied on a area level, such as electricity generation reserves, CO₂ emission limits or resource limits (wind power, natural gas etc.).

Area types

The following types are inmplemented:

EnergyModelsGeography.RefAreaType
RefArea <: Area

A RefArea is an area representation with no additional constraints on energy/mass exchange.

Fields

  • id is the name/identifier of the area.

  • name is the name of the area.

  • lon::Real is the longitudinal position of the area.

  • lat::Real is the latitudinal position of the area.

  • node::Availability is the Availability node routing different resources within an area.

source
EnergyModelsGeography.LimitedExchangeAreaType
LimitedExchangeArea <: Area

A LimitedExchangeArea is an area in which the export is limited in each individual operational period for the provided resources. This can be necessary when an area is coupled with multiple other areas and the total export capacity should be restricted.

Fields

  • id is the name/identifier of the area.

  • name is the name of the area.

  • lon::Real is the longitudinal position of the area.

  • lat::Real is the latitudinal position of the area.

  • node::Availability is the Availability node routing different resources within an area.

  • limit::Dict{<:EMB.Resource, <:TimeProfile} is the amount of a resource that can be exchanged with other areas

source
EnergyModelsGeography.GeoAvailabilityType
GeoAvailability <: EMB.Availability

A geography Availability node for substituion of the general Availability node. A GeoAvailability is required if transmission should be included between individual Areas due to a changed mass balance.

Fields

  • id is the name/identifier of the node.

  • input::Array{<:Resource} are the input Resources with conversion value Real. The latter are not relevant but included for consistency with other formulations.

  • output::Array{<:Resource} are the generated Resources with conversion value Real. The latter are not relevant but included for consistency with other formulations.

source

Functions for accessing fields of Area types

The following functions are defined for accessing fields from an Area:

EnergyModelsGeography.exchange_limitFunction
exchange_limit(a::LimitedExchangeArea)

Returns the limits of the exchange resources in area a.

source
exchange_limit(a::LimitedExchangeArea, p::Resource)

Returns the limit of exchange resource p in area a a TimeProfile.

source
exchange_limit(a::LimitedExchangeArea, p::Resource, t)

Returns the limit of exchange resource p in area a at time period t.

source
EnergyModelsGeography.getnodesinareaFunction
getnodesinarea(a::Area, links)

Return a vector with all the nodes connected to the central availability node of an area.

Fields

  • a::Area.

  • links is a vector of all links in the model.

source

Transmission

Transmission occurs on specified transmission corridors from one area to another. On each corridor, there can exist several TransmissionModes that are transporting resources using a range of technologies.

It is important to consider the from and to Area when specifying a Transmission corridor. The chosen direction has an influence on whether the variables $\texttt{trans\_in}[m, t]$ and $\texttt{trans\_out}[m, t]$ are positive or negative for exports in the case of bidirectional transport. This is also explained on the page Optimization variables.

Transmission types

EnergyModelsGeography.TransmissionType

A Transmission corridor.

A geographic corridor where TransmissionModes are used to transport resources.

Fields

  • from::Area is the area resources are transported from.

  • to::Area is the area resources are transported to.

  • modes::Vector{<:Transmission} are the transmission modes that are available.

source

Functions for accessing fields of Transmission types

The following functions are defined for accessing fields from a Transmission as well as finding a subset of Transmission corridors:

EnergyModelsGeography.modesFunction
modes(l::Transmission)

Return an array of the transmission modes for a transmission corridor l.

source
modes(ℒ::Vector{::Transmission})

Return an array of all transmission modes present in the different transmission corridors.

source
EnergyModelsGeography.modes_subFunction
modes_sub(ℳ::Vector{<:TransmissionMode}, string::String)

Returns all transmission modes that include in the name the string.

source
modes_sub(ℳ::Vector{<:TransmissionMode}, string_array::Array{String})

Returns all transmission modes that include in the name all entries of the array string_array.

source
modes_sub(l::Transmission, mode_type::TransmissionMode)

Return an array containing all TransmissionModes of type type in Transmission corridor l.

source
modes_sub(ℒᵗʳᵃⁿˢ::Vector{<:Transmission}, mode_type::TransmissionMode)

Return an array containing all TransmissionModes of type type in Transmissions .

source
modes_sub(l::Transmission, p::Resource)

Return an array containing all TransmissionModes that transport the resource p in Transmission corridor l.

source
modes_sub(ℒᵗʳᵃⁿˢ::Vector{<:Transmission}, p::Resource)

Return an array containing all TransmissionModes that transport the resource p in Transmissions .

source
EnergyModelsGeography.corr_fromFunction
corr_from(from::String, ℒᵗʳᵃⁿˢ)

Returns all transmission corridors that orginate in the Area with the name from.

source
corr_from(from::Area, ℒᵗʳᵃⁿˢ)

Returns all transmission corridors that orginate in Area from.

source
EnergyModelsGeography.corr_toFunction
corr_to(to::String, ℒᵗʳᵃⁿˢ)

Returns all transmission corridors that end in the Area with the name to.

source
corr_to(to::Area, ℒᵗʳᵃⁿˢ)

Returns all transmission corridors that end in Area to.

source
EnergyModelsGeography.corr_from_toFunction
corr_from_to(from::String, to::String, ℒᵗʳᵃⁿˢ)

Returns the transmission corridor that orginate in the Area with the id from and end in the Area with the id to.

source
corr_from_to(from::Area, to::Area, ℒᵗʳᵃⁿˢ)

Returns the transmission corridor that orginate in the Area with the id from and end in the Area with the id to.

source
EnergyModelsGeography.modes_of_dirFunction
modes_of_dir(ℒ, dir::Int)

Return the transmission modes of dir directions for transmission modes .

source
modes_of_dir(l, dir::Int)

Return the transmission modes of dir directions for transmission corridor l`.

source

TransmissionMode

TransmissionMode describes how resources are transported, for example by dynamic transmission modes on ship, truck or railway (represented generically by RefDynamic, although not implemented in the current version) or by static transmission modes on overhead power lines or gas pipelines (respresented generically by RefStatic). TransmissionModes includes capacity limits (trans_cap), losses (trans_loss) and directions (directions) for the generic transmission modes RefDynamic and RefStatic. More specialized TransmissionModes such as subtypes of the abstract type PipeMode can convert one inlet resource to another outlet resource. This approach can be used for representing a static pressure drop within a pipeline. The PipeMode can be consuming another resource such as electricity for compressors at a consumption_rate in order to transport natural gas or hydrogen. The consumption_rate is in this situation proportional to the transport of the inlet resource. All TransmissionModes can also include both fixed (opex_fixed) and variable (opex_var) operational expenditures (OPEX).

Warning

All parameters of the implemented TransmissionModes are relative (based on usage, opex_var and trans_loss, or the installed capacity, opex_fixed). They are independent of the distance. The reasoning for this approach is that it allows the modeller to have a non-linear, distance dependent OPEX or loss function for providing the input to the model.

TransmissionMode types

The following TransmissionModes are implemented and exported:

EnergyModelsGeography.RefStaticType

A reference static TransmissionMode.

Generic representation of static transmission modes, such as overhead power lines or pipelines.

Fields

  • id::String is the name/identifyer of the transmission mode.

  • resource::Resource is the resource that is transported.

  • trans_cap::Real is the capacity of the transmission mode.

  • trans_loss::Real is the loss of the transported resource during transmission, modelled as a ratio.

  • opex_var::TimeProfile is the variational operational costs per energy unit transported.

  • opex_fixed::TimeProfile is the fixed operational costs per installed capacity.

  • directions is the number of directions the resource can be transported, 1 is unidirectional (A->B) or 2 is bidirectional (A<->B).

  • data::Vector{Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.

source
EnergyModelsGeography.RefDynamicType

A reference dynamic TransmissionMode.

Generic representation of dynamic transmission modes, using for example truck, ship or railway transport.

Fields

  • id::String is the name/identifyer of the transmission mode.

  • resource::Resource is the resource that is transported.

  • trans_cap::TimeProfile is the capacity of the transmission mode.

  • trans_loss::TimeProfile is the loss of the transported resource during transmission, modelled as a ratio.

  • opex_var::TimeProfile is the variational operational costs per energy unit transported.

  • opex_fixed::TimeProfile is the fixed operational costs per installed capacity.

  • directions is the number of directions the resource can be transported, 1 is unidirectional (A->B) or 2 is bidirectional (A<->B).

  • data::Vector{Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.

source
EnergyModelsGeography.PipeSimpleType

This TransmissionMode allows for altering the transported Resource.

A usage of this could e.g. be by defining a subtype struct of Resource with the field 'pressure'. This PipelineMode can then take SomeSubtype<:Resource with pressure p₁ at the inlet, and pressure p₂ at the outlet.

This type also supports consuming resources proportionally to the volume of transported Resource (at the inlet). This could be used for modeling the power needed for operating the pipeline.

Fields

  • id::String is the identifier used in printed output.

  • inlet::Resource is the Resource going into transmission.

  • outlet::Resource is the Resource going out of the outlet of the transmission.

  • consuming::Resource is the Resource the transmission consumes by operating.

  • consumption_rate::Real the rate of which the resource Pipeline.consuming is consumed, as a ratio of the volume of the resource going into the inlet. I.e.:

      `consumption_rate` = consumed volume / inlet volume (per operational period)
  • trans_cap::Real is the capacity of the transmission mode.

  • trans_loss::Real is the loss of the transported resource during transmission, modelled as a ratio.

  • opex_var::TimeProfile is the variational operational costs per energy unit transported.

  • opex_fixed::TimeProfile is the fixed operational costs per installed capacity.

  • directions specifies that the pipeline is Unidirectional (1) by default.

  • data::Vector{Data} is the additional data (e.g. for investments).

source
EnergyModelsGeography.PipeLinepackSimpleType
PipeLinepackSimple <: TransmissionMode

Pipeline model with linepacking implemented as simple storage function.

Fields (additional to PipeSimple)

  • energy_share::Float64 - is the storage energy capacity relative to pipeline capacity.

  • Level_share_init::Float64 - is the initial storage level.

  • data::Vector{Data} is the additional data (e.g. for investments).

source

Functions for accessing fields of TransmissionMode types

The following functions are defined and exported for accessing fields from a TransmissionMode:

EnergyModelsGeography.lossFunction
loss(tm::TransmissionMode)

Returns the loss of transmission mode tm as TimeProfile.

source
loss(tm::TransmissionMode, t)

Returns the loss of transmission mode tm at time period t.

source