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.Area
— TypeDeclaration of the general type for areas.
EnergyModelsGeography.RefArea
— TypeRefArea <: 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 theAvailability
node routing different resources within an area.
EnergyModelsGeography.LimitedExchangeArea
— TypeLimitedExchangeArea <: 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 theAvailability
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
EnergyModelsGeography.GeoAvailability
— TypeGeoAvailability <: EMB.Availability
A geography Availability
node for substituion of the general Availability
node. A GeoAvailability
is required if transmission should be included between individual Area
s due to a changed mass balance.
Fields
id
is the name/identifier of the node.input::Array{<:Resource}
are the inputResource
s with conversion valueReal
. The latter are not relevant but included for consistency with other formulations.output::Array{<:Resource}
are the generatedResource
s with conversion valueReal
. The latter are not relevant but included for consistency with other formulations.
Functions for accessing fields of Area
types
The following functions are defined for accessing fields from an Area
:
EnergyModelsGeography.name
— Functionname(a::Area)
Returns the name of area a
.
EnergyModelsGeography.availability_node
— Functionavailability_node(a::Area)
Returns the availability node of an Area
a
.
EnergyModelsGeography.limit_resources
— Functionlimit_resources(a::LimitedExchangeArea)
Returns the limited resources of a LimitedExchangeArea
a
. All other resources are considered unlimited.
EnergyModelsGeography.exchange_limit
— Functionexchange_limit(a::LimitedExchangeArea)
Returns the limits of the exchange resources in area a
.
exchange_limit(a::LimitedExchangeArea, p::Resource)
Returns the limit of exchange resource p
in area a
a TimeProfile
.
exchange_limit(a::LimitedExchangeArea, p::Resource, t)
Returns the limit of exchange resource p
in area a
at time period t
.
EnergyModelsGeography.exchange_resources
— Functionexchange_resources(ℒ, a::Area)
Return the resources exchanged (import and export) from area a on the transmission corridors in ℒ.
EnergyModelsGeography.getnodesinarea
— Functiongetnodesinarea(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.
Transmission
Transmission
occurs on specified transmission corridors from
one area to
another. On each corridor, there can exist several TransmissionMode
s 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.Transmission
— TypeA 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.
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.modes
— Functionmodes(l::Transmission)
Return an array of the transmission modes for a transmission corridor l.
modes(ℒ::Vector{::Transmission})
Return an array of all transmission modes present in the different transmission corridors.
EnergyModelsGeography.modes_sub
— Functionmodes_sub(ℳ::Vector{<:TransmissionMode}, string::String)
Returns all transmission modes that include in the name the string
.
modes_sub(ℳ::Vector{<:TransmissionMode}, string_array::Array{String})
Returns all transmission modes that include in the name all entries of the array string_array
.
modes_sub(l::Transmission, mode_type::TransmissionMode)
Return an array containing all TransmissionMode
s of type type
in Transmission
corridor l
.
modes_sub(ℒᵗʳᵃⁿˢ::Vector{<:Transmission}, mode_type::TransmissionMode)
Return an array containing all TransmissionMode
s of type type
in Transmission
s ℒ
.
modes_sub(l::Transmission, p::Resource)
Return an array containing all TransmissionMode
s that transport the resource p
in Transmission
corridor l
.
modes_sub(ℒᵗʳᵃⁿˢ::Vector{<:Transmission}, p::Resource)
Return an array containing all TransmissionMode
s that transport the resource p
in Transmission
s ℒ
.
EnergyModelsGeography.corr_from
— Functioncorr_from(from::String, ℒᵗʳᵃⁿˢ)
Returns all transmission corridors that orginate in the Area
with the name from
.
corr_from(from::Area, ℒᵗʳᵃⁿˢ)
Returns all transmission corridors that orginate in Area
from
.
EnergyModelsGeography.corr_to
— Functioncorr_to(to::String, ℒᵗʳᵃⁿˢ)
Returns all transmission corridors that end in the Area
with the name to
.
corr_to(to::Area, ℒᵗʳᵃⁿˢ)
Returns all transmission corridors that end in Area
to
.
EnergyModelsGeography.corr_from_to
— Functioncorr_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
.
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
.
EnergyModelsGeography.modes_of_dir
— Functionmodes_of_dir(ℒ, dir::Int)
Return the transmission modes of dir directions
for transmission modes ℳ
.
modes_of_dir(l, dir::Int)
Return the transmission modes of dir directions
for transmission corridor l
`.
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
). TransmissionMode
s 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 TransmissionMode
s can also include both fixed (opex_fixed
) and variable (opex_var
) operational expenditures (OPEX).
All parameters of the implemented TransmissionMode
s 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 TransmissionMode
s are implemented and exported:
EnergyModelsGeography.TransmissionMode
— TypeDeclaration of the general type for transmission mode transporting resources between areas.
EnergyModelsGeography.RefStatic
— TypeA 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 variable operating expense per energy unit transported.opex_fixed::TimeProfile
is the fixed operating expense 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 fielddata
is conditional through usage of a constructor.
EnergyModelsGeography.RefDynamic
— TypeA 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 variable operating expense per energy unit transported.opex_fixed::TimeProfile
is the fixed operating expense 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 fielddata
is conditional through usage of a constructor.
EnergyModelsGeography.PipeMode
— TypeTransmissionMode
mode for additional variable potential.
EnergyModelsGeography.PipeSimple
— TypeThis 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 theResource
going into transmission.outlet::Resource
is theResource
going out of the outlet of the transmission.consuming::Resource
is theResource
the transmission consumes by operating.consumption_rate::Real
the rate of which the resourcePipeline.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 variable operating expense per energy unit transported.opex_fixed::TimeProfile
is the fixed operating expense per installed capacity.directions
specifies that the pipeline is Unidirectional (1) by default.data::Vector{Data}
is the additional data (e.g. for investments).
EnergyModelsGeography.PipeLinepackSimple
— TypePipeLinepackSimple <: 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).
Functions for accessing fields of TransmissionMode
types
The following functions are defined and exported for accessing fields from a TransmissionMode
:
EnergyModelsGeography.map_trans_resource
— Functionmap_trans_resource(tm)
Returns the transported resource for a given TransmissionMode.
EnergyModelsGeography.loss
— Functionloss(tm::TransmissionMode)
Returns the loss of transmission mode tm
as TimeProfile
.
loss(tm::TransmissionMode, t)
Returns the loss of transmission mode tm
at time period t
.
EnergyModelsGeography.directions
— Functiondirections(tm::TransmissionMode)
Returns the directions of transmission mode tm
.
EnergyModelsGeography.consumption_rate
— Functionconsumption_rate(tm::PipeMode)
Returns the consumption rate of pipe mode tm
as TimeProfile
.
consumption_rate(tm::PipeMode, t)
Returns the consumption rate of pipe mode tm
at time period t
.
EnergyModelsGeography.energy_share
— Functionenergy_share(tm::PipeLinepackSimple)
Returns the energy share of PipeLinepackSimple tm
.