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.EnergyModel
— TypeAbstract type for differentation between types of models (investment, operational, ...).
EnergyModelsBase.OperationalModel
— TypeOperationalModel <: EnergyModel
Operational Energy Model without investments.
Fields
emission_limit::Dict{<:ResourceEmit, <:TimeProfile}
is a dictionary with individual emission limits asTimeProfile
for each emission resourceResourceEmit
.emission_price::Dict{<:ResourceEmit, <:TimeProfile}
are the emission costs for each emission resourcesResourceEmit
.co2_instance
is aResourceEmit
and corresponds to the type used for CO₂.
Functions for accessing fields of EnergyModel
types
The following functions are declared for accessing fields from an EnergyModel
type.
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_limit
— Functionemission_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 TimeProfile
s for each ResourceEmit
, as TimeProfile
for ResourceEmit
p
or, in strategic period t_inv
for ResourceEmit
p
.
EnergyModelsBase.emission_price
— Functionemission_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 TimeProfile
s for each ResourceEmit
, as TimeProfile
for ResourceEmit
p
or, in strategic period t_inv
for ResourceEmit
p
.
EnergyModelsBase.co2_instance
— Functionco2_instance(modeltype::EnergyModel)
Returns the CO₂ instance used in modelling.
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 Node
s. The approach of using the data
field of Node
s 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.Data
— TypeAbstract type used to define concrete struct containing the package specific elements to add to the composite type defined in this package.
EnergyModelsBase.EmptyData
— TypeEmpty composite type for Data
EmissionData
is one approach for utilizing the data
field of Node
s. 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 Node
s, 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.EmissionsData
— TypeEmissionsData{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 asTimeProfile
orFloat64
.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 requireemissions
as input.EmissionsProcess
: No capture, but process emissions are present. Does not requireco2_capture
as input, but will ignore it, if provided.EmissionsEnergy
: No capture and no process emissions. Does not requireco2_capture
oremissions
as input, but will ignore them, if provided.
EnergyModelsBase.CaptureData
— TypeCaptureData{T} <: EmissionsData{T}
Supertype for all EmissionsData
that include CO₂ capture.
EnergyModelsBase.EmissionsEnergy
— Typestruct 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.
EnergyModelsBase.EmissionsProcess
— Typestruct 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.
EnergyModelsBase.CaptureEnergyEmissions
— Typestruct 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.
EnergyModelsBase.CaptureProcessEmissions
— Typestruct 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.
EnergyModelsBase.CaptureProcessEnergyEmissions
— Typestruct 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.
Functions for accessing fields of EmissionsData
types
The following functions are declared for accessing fields from an EmissionsData
type.
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.co2_capture
— Functionco2_capture(data::CaptureData)
Returns the CO₂ capture rate of the data
.
EnergyModelsBase.process_emissions
— Functionprocess_emissions(data::EmissionsData)
process_emissions(data::EmissionsData{T}, p::ResourceEmit)
process_emissions(data::EmissionsData{T}, p:ResourceEmit, t)
Returns the ResourceEmit
s 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
).