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.

EnergyModelsGeography.GeoAvailabilityMethod

Legacy constructor for a GeoAvailability. This version will be discontinued in the near future and replaced with the application of Arrays instead of Dictionaries.

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

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

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

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 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 field data is conditional through usage of a constructor.

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 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 field data is conditional through usage of a constructor.

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.

EnergyModelsBase.capacityMethod
capacity(tm::TransmissionMode, t)

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

EnergyModelsBase.capacityMethod
capacity(tm::TransmissionMode)

Returns the capacity of transmission mode tm as TimeProfile.

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

Repaces constraints for availability nodes of type GeoAvailability. The resource balances are set by the area constraints instead.

EnergyModelsBase.opex_fixedMethod
opex_fixed(tm::TransmissionMode, t_inv)

Returns the variable OPEX of transmission mode tm at strategic period t_inv.

EnergyModelsBase.opex_fixedMethod
opex_fixed(tm::TransmissionMode)

Returns the variable OPEX of transmission mode tm as TimeProfile.

EnergyModelsBase.opex_varMethod
opex_var(tm::TransmissionMode, t)

Returns the variable OPEX of transmission mode tm at time period t.

EnergyModelsBase.opex_varMethod
opex_var(tm::TransmissionMode)

Returns the variable OPEX of transmission mode tm as TimeProfile.

EnergyModelsGeography.check_areaMethod
check_area(a::Area, 𝒯, 𝒫, modeltype::EnergyModel, check_timeprofiles::Bool)

Check that the fields of an Area corresponds to required structure.

EnergyModelsGeography.check_case_dataMethod
check_case_data(case)

Checks the case dictionary is in the correct format. The function is only checking the new, additional data as we do not yet consider dispatch on the case data.

Checks

  • The dictionary requires the keys :areas and :transmission.
  • The individual keys are of the correct type, that is
    • :areas::Area and
    • :transmission::Vector{<:Transmission}.
EnergyModelsGeography.check_dataMethod
check_data(case, modeltype, check_timeprofiles::Bool)

Check if the case data is consistent. Use the @assert_or_log macro when testing. Currently, not checking data except that the case dictionary follows the required structure.

EnergyModelsGeography.check_modeMethod
check_mode(m::TransmissionMode, 𝒯, 𝒫, modeltype::EnergyModel, check_timeprofiles::Bool)

Check that the fields of a TransmissionMode corresponds to required structure.

EnergyModelsGeography.check_time_structureMethod
check_time_structure(m::TransmissionMode, 𝒯)

Check that all fields of a TransmissionMode that are of type TimeProfile correspond to the time structure 𝒯.

EnergyModelsGeography.check_transmissionMethod
check_transmission(l::Transmission, 𝒯, 𝒫, modeltype::EnergyModel, check_timeprofiles::Bool)

Check that the fields of a Transmission corridor corresponds to required structure.

EnergyModelsGeography.compute_trans_inMethod
compute_trans_in(m, t, p, tm::TransmissionMode)

Return the amount of resources going into transmission corridor l by a generic TransmissionMode

EnergyModelsGeography.compute_trans_outMethod
compute_trans_out(m, t, p, tm::TransmissionMode)

Return the amount of resources going out of transmission corridor l by a generic TransmissionMode

EnergyModelsGeography.constraints_areaMethod
constraints_area(m, 𝒜, 𝒯, ℒᵗʳᵃⁿˢ, 𝒫, modeltype::EnergyModel)

Create constraints for the energy balances within an area for each resource using the GeoAvailability node. Keep track of the exchange with other areas in a seperate variable :area_exchange.

EnergyModelsGeography.constraints_capacityMethod
constraints_capacity(m, tm::PipeLinepackSimple, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the maximum capacity of a PipeLinepackSimple.

EnergyModelsGeography.constraints_capacityMethod
constraints_capacity(m, tm::PipeMode, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the maximum capacity of a generic PipeMode.

EnergyModelsGeography.constraints_capacityMethod
constraints_capacity(m, tm::TransmissionMode, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the maximum capacity of a generic TransmissionMode. This function serves as fallback option if no other function is specified for a TransmissionMode.

EnergyModelsGeography.constraints_opex_fixedMethod
constraints_opex_fixed(m, tm::TransmissionMode, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)

Function for creating the constraint on the fixed OPEX of a generic TransmissionMode. This function serves as fallback option if no other function is specified for a TransmissionMode.

EnergyModelsGeography.constraints_opex_varMethod
constraints_opex_var(m, tm::TransmissionMode, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)

Function for creating the constraint on the variable OPEX of a generic TransmissionMode. This function serves as fallback option if no other function is specified for a TransmissionMode.

EnergyModelsGeography.constraints_trans_balanceMethod
constraints_trans_balance(m, tm::TransmissionMode, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the transmission balance for a generic TransmissionMode. This function serves as fallback option if no other function is specified for a TransmissionMode.

EnergyModelsGeography.constraints_trans_lossMethod
constraints_trans_loss(m, tm::PipeMode, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the transmission loss of a generic PipeMode.

EnergyModelsGeography.constraints_trans_lossMethod
constraints_trans_loss(m, tm::TransmissionMode, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the transmission loss of a generic TransmissionMode. This function serves as fallback option if no other function is specified for a TransmissionMode.

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

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

EnergyModelsGeography.corr_from_toMethod
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.corr_from_toMethod
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.

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

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

EnergyModelsGeography.create_areaMethod
create_area(m, a::Area, 𝒯, ℒᵗʳᵃⁿˢ, modeltype)

Default fallback method when no function is defined for a node type.

EnergyModelsGeography.create_areaMethod
create_area(m, a::LimitedExchangeArea, 𝒯, ℒᵗʳᵃⁿˢ, modeltype)

Constraint that limit exchange with other areas based on the specified exchange_limit.

EnergyModelsGeography.create_modelMethod
create_model(case, modeltype::EnergyModel; check_timeprofiles::Bool=true)

Create the model and call all required functions.

Input

  • case - The case dictionary requiring the keys :T, :nodes, :links, products as it is the case for standard EnergyModelsBase models. In addition, the keys :areas and :transmission are required for extending the existing model. If the input is not provided in the correct form, the checks will identify the problem. In the case of a
  • modeltype::EnergyModel - Used modeltype, that is a subtype of the type EnergyModel.
  • m - the empty JuMP.Model instance. If it is not provided, then it is assumed that the input is a standard JuMP.Model.

Conditional input

  • check_timeprofiles::Bool=true - A boolean indicator whether the time profiles of the individual nodes should be checked or not. It is advised to not deactivate the check, except if you are testing new components. It may lead to unexpected behaviour and potential inconsistencies in the input data, if the time profiles are not checked.
EnergyModelsGeography.create_transmission_modeMethod
create_transmission_mode(m, tm::TransmissionMode, 𝒯, modeltype::EnergyModel)

Set all constraints for transmission mode. Serves as a fallback option for unspecified subtypes of TransmissionMode.

EnergyModelsGeography.getnodesinareaMethod
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.

EnergyModelsGeography.limit_resourcesMethod
limit_resources(a::LimitedExchangeArea)

Returns the limited resources of a LimitedExchangeArea a. All other resources are considered unlimited.

EnergyModelsGeography.modesMethod
modes(ℒ::Vector{::Transmission})

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

EnergyModelsGeography.modes_subMethod
modes_sub(l::Transmission, p::Resource)

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

EnergyModelsGeography.modes_subMethod
modes_sub(l::Transmission, mode_type::TransmissionMode)

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

EnergyModelsGeography.modes_subMethod
modes_sub(ℳ::Vector{<:TransmissionMode}, string_array::Array{String})

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

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

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

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

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

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

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

EnergyModelsGeography.update_objectiveMethod
update_objective(m, 𝒩, 𝒯, 𝒫, ℒᵗʳᵃⁿˢ, modeltype::EnergyModel)

Update the objective function with costs related to geography (areas and energy transmission).

EnergyModelsGeography.variables_areaMethod
variables_area(m, 𝒜, 𝒯, ℒᵗʳᵃⁿˢ, modeltype::EnergyModel)

Create variables to track how much energy is exchanged from an area for all time periods t ∈ 𝒯.

EnergyModelsGeography.variables_trans_capacityMethod
variables_trans_capacity(m, 𝒯, ℳ, modeltype::EnergyModel)

Declaration of variables for tracking how much of installed transmision capacity is used f or all time periods t ∈ 𝒯 of the tranmission modes.

EnergyModelsGeography.variables_trans_capexMethod
variables_trans_capex(m, 𝒯, ℳ, modeltype::EnergyModel)

Create variables for the capital costs for the investments in transmission. Empty function to allow for multiple dispatch in the EnergyModelsInvestment package.

EnergyModelsGeography.variables_trans_modeMethod
variables_trans_mode(m, 𝒯, ℳᴸᴾ::Vector{<:PipeLinepackSimple}, modeltype::EnergyModel)

Adds the following special variables for linepacking:

  • :linepack_stor_level - storage level in linepack
EnergyModelsGeography.variables_trans_modeMethod
variables_trans_mode(m, 𝒯, ℳˢᵘᵇ::Vector{<:TransmissionMode}, modeltype::EnergyModel)

Default fallback method when no function is defined for a TransmissionMode type. It introduces the variables that are required in all TransmissionModes. These variables are:

  • :trans_in - inlet flow to transmission mode
  • :trans_out - outlet flow from a transmission mode
  • :trans_loss - loss during transmission
  • :trans_loss_neg - negative loss during transmission, helper variable if bidirectional

transport is possible

  • :trans_loss_pos - positive loss during transmission, helper variable if bidirectional

transport is possible

EnergyModelsGeography.variables_trans_modesMethod
variables_trans_modes(m, 𝒯, ℳ, modeltype::EnergyModel)

Loop through all TransmissionMode types and create variables specific to each type. This is done by calling the method variables_trans_mode on all modes of each type.

The TransmissionMode type representing the widest category will be called first. That is, variables_trans_mode will be called on a TransmissionMode before it is called on PipeMode-nodes.