Methods - EnergyModelsBase

Index

Extension methods

EnergyModelsBase.variables_nodeFunction
EMB.variables_node(m, 𝒩::Vector{<:CO2Storage}, 𝒯, modeltype::EnergyModel)

Create the optimization variable :stor_level_Δ_sp for every CO2Storage node. This variable accounts the increase in stor_level during a strategic period.

This method is called from EnergyModelsBase.jl.

source
EnergyModelsBase.create_nodeFunction
create_node(m, n::CO2Storage, 𝒯, 𝒫, modeltype::EnergyModel)

Set all constraints for a CO2Storage node.

It differs from the function for a standard RefStorage node through modifying the flow to the node and not calling the functions constraints_flow_in and constraints_flow_out. The former is replaced with constraints directly within the function.

Called constraint functions

source
create_node(m, n::CCSRetroFit, 𝒯, 𝒫, modeltype::EnergyModel)

Set all constraints for a CCSRetroFit.

It differs from the function for a standard NetworkNode node through modifying the flow to the node for the CO₂ proxy resource. The function constraints_flow_in is hence not called.

Called constraint functions

source

Constraint methods

EnergyModelsBase.constraints_flow_outFunction
EMB.constraints_flow_out(m, n::CO2Source, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the outlet flow from CO2Source. The standard constraints_flow_out function does not allow CO₂ as an outlet flow as the CO₂ outlet flow is specified in the constraints_data function to implement CO₂ capture.

source
EMB.constraints_flow_out(
    m,
    n::NetworkNodeWithRetrofit,
    𝒯::TimeStructure,
    modeltype::EnergyModel
)

Function for creating the constraint on the outlet flow from NetworkNodeWithRetrofit. The standard constraints_flow_out function does allow for the CO₂ proxy as an outlet flow. In the case of retrofitting CO2 capture, this flow constraint is handlded

source
EnergyModelsBase.constraints_level_auxFunction
EMB.constraints_level_aux(m, n::Storage, 𝒯, 𝒫, modeltype::EnergyModel)

Function for creating the Δ constraint for the level of a reference storage node with a ResourceCarrier resource.

source
EnergyModelsBase.constraints_capacityFunction
EMB.constraints_capacity(m, n::CO2Storage, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the maximum level of a CO2Storage node. As a CO2Storage node is accumulating, the upper bound is provided as well by the sum of the changes in all strategic periods.

source
EnergyModelsBase.constraints_dataFunction
EMB.constraints_data(
    m,
    n::NetworkNodeWithRetrofit,
    𝒯,
    𝒫,
    modeltype::EnergyModel,
    data::EmissionsData
)

Constraints functions for calculating both the emissions and amount of CO₂ captured in the process when CO₂ capture is included as retrofit. It works similar to the approach of EnergyModelsBase.

The functions are updated for a NetworkNodeWithRetrofit-node as the output is the CO₂ proxy and not CO₂.

source
EMB.constraints_data(m, n::CCSRetroFit, 𝒯, 𝒫, modeltype::EnergyModel, data::EmissionsData)

Constraints functions for calculating both the emissions and amount of CO₂ captured in the CO₂ capture unit.

There exist several configurations for incorporation of CO₂ capture:

  1. data::CaptureProcessEnergyEmissions:

    Capture of both the flue gas emissions, process emissions, and energy usage related emissions.

  2. data::CaptureEnergyEmissions:

    Capture of both the flue gas emissions and energy usage related emissions.

  3. data::CaptureProcessEmissions:

    Capture of both the flue gas emissions and process emissions.

  4. data::CaptureFlueGas:

    Capture only both the flue gas emissions.

The functions are updated for a CCSRetroFit-node as CO₂ emissions require a different calculation due to the inclusion of the CO₂ proxy resource for the flue gas.

source

Utility methods

EnergyModelsBase.previous_levelFunction
EMB.previous_level(
    m,
    n::CO2Storage,
    prev_pers::PreviousPeriods,
    cyclic_pers::CyclicPeriods,
    modeltype::EnergyModel,
)

Adding methods for the function EnergyModelsBase.previous_level for a CO2Storage node. the additional methods are only relevant for the first operational period of a strategic period while the framework utilizes the functions from EneryModelsBase for all other periods.

prev_pers::PreviousPeriods{Nothing,Nothing,Nothing}

The previous level in the first operational period in the first representative period in the first strategic period is set to 0.

The reason for that is that the storage is considered to be empty in the beginning of the analysis.

source
prev_pers::PreviousPeriods{<:TS.AbstractStrategicPeriod,Nothing,Nothing}

The previous level in the first operational period in the first representative period in all strategic periods except for the first is set to the accumulated value in the previous strategic periods.

source
EnergyModelsBase.inputsFunction
EMB.inputs(n::CCSRetroFit)
EMB.inputs(n::CCSRetroFit, p::Resource)

When the node is a CCSRetroFit, it returns the co2_proxy resource in addition to the keys of the input dictionary.

If the resource p is specified, it returns the value of input resource p or 0 if p is the co2_proxy resource.

source
EnergyModelsBase.outputsFunction
EMB.outputs(n::CO2Storage)
EMB.outputs(n::CO2Storage, p::Resource)

When the node is a CO2Storage, it returns an empty array.

If the resource p is specified, it returns a value of 0.

source
EMB.outputs(n::NetworkNodeWithRetrofit)
EMB.outputs(n::NetworkNodeWithRetrofit, p::Resource)

When the node is a NetworkNodeWithRetrofit, it returns the co2_proxy resource in addition to the keys of the output dictionary.

If the resource p is specified, it returns the value of output resource p or 0 if p is the co2_proxy resource.

source

Check methods

EnergyModelsBase.check_nodeFunction
EMB.check_node(n::CO2Source, 𝒯, modeltype::EnergyModel, check_timeprofiles::Bool)

This method checks that a CO2Source node is valid.

It reuses the standard checks of a Source node through calling the function EMB.check_node_default, but adds an additional check on the data.

Checks

  • The field cap is required to be non-negative.
  • The values of the dictionary output are required to be non-negative.
  • The value of the field fixed_opex is required to be non-negative and accessible through a StrategicPeriod as outlined in the function check_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles).
  • The field data does not include CaptureData.
source