Model and data

EnergyModel

The type EnergyModel is used for creating the global parameters of a model. It can be as well used for extending EnergyModelsBase as described in the section Extensions to the model. EnergyModelsBase provides an OperationalModel for analyses with given capacities. OperationalModel contains some key information for the model such as the emissions limits and penalties for each ResourceEmit, as well as the ResourceEmit instance of CO₂.

EnergyModelsBase.OperationalModelType
OperationalModel <: EnergyModel

Operational Energy Model without investments.

Fields

  • emission_limit::Dict{<:ResourceEmit, <:TimeProfile} is a dictionary with individual emission limits as TimeProfile for each emission resource ResourceEmit.
  • emission_price::Dict{<:ResourceEmit, <:TimeProfile} are the emission costs for each emission resources ResourceEmit.
  • co2_instance is a ResourceEmit and corresponds to the type used for CO₂.
source

Functions for accessing fields of EnergyModel types

The following functions are declared for accessing fields from an EnergyModel type.

Warning

If you want to introduce new EnergyModel types, it is important that the functions emission_limit, emission_price, and co2_instance are either functional for your new types or you have to declare corresponding functions. The first approach can be achieved through using the same name for the respective fields.

EnergyModelsBase.emission_limitFunction
emission_limit(modeltype::EnergyModel)
emission_limit(modeltype, p::ResourceEmit)
emission_limit(modeltype, p::ResourceEmit, t_inv::TS.AbstractStrategicPeriod)

Returns the emission limit of EnergyModel model as dictionary with TimeProfiles for each ResourceEmit, as TimeProfile for ResourceEmit p or, in strategic period t_inv for ResourceEmit p.

source
EnergyModelsBase.emission_priceFunction
emission_price(modeltype::EnergyModel)
emission_price(modeltype, p::ResourceEmit)
emission_price(modeltype, p::ResourceEmit, t_inv::TS.AbstractStrategicPeriod)

Returns the emission price of EnergyModel model as dictionary with TimeProfiles for each ResourceEmit, as TimeProfile for ResourceEmit p or, in strategic period t_inv for ResourceEmit p.

source

Additional data

Emission data are used to provide the individual nodes with potential emissions. The approach is also explained on the page Data functions.

Data and Emission types

Data types are introduced for introducing additional parameters, variables, and constraints to the Nodes. The approach of using the data field of Nodes is explained on the page Data functions. EmptyData is no longer relevant for the modelling, but it is retained for avoiding any problems with existing models.

EnergyModelsBase.DataType

Abstract type used to define concrete struct containing the package specific elements to add to the composite type defined in this package.

source

EmissionData is one approach for utilizing the data field of Nodes. The thought process with EmissionData is to provide the user with options for each individual node to include emissions and potentially capture or not. The individual types can be used for all included reference Nodes, although capture is not possible for Sink nodes due to the lack of an output. This explained in more detail on the corresponding node page.

EnergyModelsBase.EmissionsDataType
EmissionsData{T<:Union{TimeProfile,Float64}} <: Data

Abstract type for EmissionsData can be used to dispatch on different types of capture configurations.

In general, the different types require the following input:

  • emissions::Dict{ResourceEmit, T} are the process emissions per capacity usage through the variable :cap_use. It allows for an input as TimeProfile or Float64.
  • co2_capture::Float64 is the CO₂ capture rate.

Types

  • CaptureProcessEnergyEmissions: Capture both the process emissions and the energy usage related emissions.
  • CaptureProcessEmissions: Capture the process emissions, but not the energy usage related emissions.
  • CaptureEnergyEmissions: Capture the energy usage related emissions, but not the process emissions. Does not require emissions as input.
  • EmissionsProcess: No capture, but process emissions are present. Does not require co2_capture as input, but will ignore it, if provided.
  • EmissionsEnergy: No capture and no process emissions. Does not require co2_capture or emissions as input, but will ignore them, if provided.
source
EnergyModelsBase.EmissionsEnergyType
struct EmissionsEnergy{T} <: EmissionsData{T}

EmissionsEnergy(_, _)
EmissionsEnergy(_)
EmissionsEnergy()

No capture, no process emissions are present. Does not require co2_capture or emissions as input, but accepts it and will ignore it, if provided.

source
EnergyModelsBase.EmissionsProcessType
struct EmissionsProcess{T} <: EmissionsData{T}

EmissionsProcess(emissions::Dict{<:ResourceEmit,T}) where T
EmissionsProcess(emissions::Dict{<:ResourceEmit,T}, _) where T
EmissionsProcess()

No capture, but process emissions are present. Does not require co2_capture as input, but accepts it and will ignore it, if provided.

Fields

  • emissions::Dict{ResourceEmit, T}: emissions per unit produced.
source
EnergyModelsBase.CaptureEnergyEmissionsType
struct CaptureEnergyEmissions{T} <: CaptureData{T}

CaptureEnergyEmissions(emissions::Dict{<:ResourceEmit, T}, co2_capture::Float64) where T
CaptureEnergyEmissions(co2_capture::Float64)

Capture the energy usage related emissions, but not the process emissions. Does not require emissions as input, but can be supplied.

Fields

  • emissions::Dict{ResourceEmit, T} are the process emissions per capacity usage through the variable :cap_use.
  • co2_capture::Float64 is the CO₂ capture rate.
source
EnergyModelsBase.CaptureProcessEmissionsType
struct CaptureProcessEmissions{T} <: CaptureData{T}

CaptureProcessEmissions(emissions::Dict{<:ResourceEmit, T}, co2_capture::Float64) where T

Capture the process emissions, but not the energy usage related emissions.

Fields

  • emissions::Dict{ResourceEmit, T} are the process emissions per capacity usage through the variable :cap_use.
  • co2_capture::Float64 is the CO₂ capture rate.
source
EnergyModelsBase.CaptureProcessEnergyEmissionsType
struct CaptureProcessEnergyEmissions{T} <: CaptureData{T}

CaptureProcessEnergyEmissions(emissions::Dict{<:ResourceEmit, T}, co2_capture::Float64) where T

Capture both the process emissions and the energy usage related emissions.

Fields

  • emissions::Dict{ResourceEmit, T} are the process emissions per capacity usage through the variable :cap_use.
  • co2_capture::Float64 is the CO₂ capture rate.
source

Functions for accessing fields of EmissionsData types

The following functions are declared for accessing fields from an EmissionsData type.

Warning

If you want to introduce new EmissionsData types, it is important that the functions co2_capture and process_emissions are either functional for your new types or you have to declare corresponding functions. The first approach can be achieved through using the same name for the respective fields.

EnergyModelsBase.process_emissionsFunction
process_emissions(data::EmissionsData)
process_emissions(data::EmissionsData{T}, p::ResourceEmit)
process_emissions(data::EmissionsData{T}, p:ResourceEmit, t)

Returns the ResourceEmits that have process emissions of the EmissionsData data.

When the ResourceEmit p is specified, it returns the process emissions as TimeProfile (FixedProfile, if the emissions are provided as Float64 and FixedProfile(0) if no values are provided.)

When the ResourceEmit p and the operational period t are specified, it returns the value (or 0, if there are no process emissions for the specifed ResourceEmit p).

source