Methods - EnergyModelsBase

Index

Extension methods

EnergyModelsBase.objective_operationalFunction
EMB.objective_operational(m, 𝒱::Vector{<:FutureValue}, 𝒯ᴵⁿᵛ::TS.AbstractStratPers, modeltype::EnergyModel)

Create JuMP expressions indexed over the investment periods 𝒯ᴵⁿᵛ for different elements. The expressions correspond to the operational expenses of the different elements. The expressions are not discounted and do not take the duration of the investment periods into account.

By default, objective expressions are included for:

  • 𝒳 = 𝒱::Vector{<:FutureValue}. In the case of a vector of FutureValue, the method returns the sum of the future value types as extracted through the function get_future_value_expression.
source
EnergyModelsBase.emissions_operationalFunction
EMB.emissions_operational(m, 𝒱::Vector{<:FutureValue}, 𝒫ᵉᵐ, 𝒯, modeltype::EnergyModel)

Create JuMP expressions indexed over the operational periods 𝒯 for different elements. The expressions correspond to the total emissions of a given type.

By default, emissions expressions are included for:

  • 𝒳 = 𝒱::Vector{<:FutureValue}. In the case of a vector of FutureValue, the method returns a value of 0 for all operational periods and emission resources.
source
EnergyModelsBase.constraints_coupleFunction
EMB.constraints_couple(m, 𝒱::Vector{<:FutureValue}, 𝒫, 𝒯, modeltype::EnergyModel)
EMB.constraints_couple(m, 𝒱::Vector{<:FutureValue}, 𝒩::Vector{<:EMB.Node}, 𝒫, 𝒯, modeltype::EnergyModel)
EMB.constraints_couple(m, 𝒩::Vector{<:EMB.Node}, 𝒱::Vector{<:FutureValue}, 𝒫, 𝒯, modeltype::EnergyModel)

Creates the couple constraints for FutureValue elements.

The current implementation creates couplings for the sub-types StorageValueCuts and TypeFutureValue by calling the function create_future_value_couple.

Required input

through adding [get_future_value] to the couplings of the case type.

  • If you only use TypeFutureValue, it is sufficient to add coupling constraints

through adding [get_future_value, get_nodes] to the couplings of the case type.

  • If you utilize both types, you must add both type of couplings.
source
EnergyModelsBase.previous_levelFunction
EMB.previous_level(
    m,
    n::Storage{RecedingAccumulating},
    prev_pers::PreviousPeriods{<:NothingPeriod, Nothing, Nothing},
    cyclic_pers::CyclicPeriods,
    modeltype::EnergyModel,
)

When the previous operational and representative period are Nothing and the storage node has the parameter type RecedingAccumulating, the function returns the initial level value (defined externally at the data field through an AbstractInitData object).

source

Variable methods

EnergyModelsBase.variables_capacityFunction
EMB.variables_capacity(m, 𝒱::Vector{<:FutureValue}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)

Declaration of functions to add capacity variables for FutureValue elements.

FutureValue

No variables are added.

source
EnergyModelsBase.variables_flowFunction
EMB.variables_flow(m, 𝒱::Vector{<:FutureValue}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)

Declaration of functions to add flow variables for FutureValue elements.

FutureValue

No variables are added

source
EnergyModelsBase.variables_opexFunction
EMB.variables_opex(m, 𝒱::Vector{<:FutureValue}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)

Declaration of functions to add OPEX variables for FutureValue elements.

  • future_value[𝒱] variables for all FutureValue in the model reflecting the value of the storages at the end of the optimization period.
source
EnergyModelsBase.variables_capexFunction
EMB.variables_capex(m, 𝒱::Vector{<:FutureValue}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)

Declaration of functions to add CAPEX variables for FutureValue elements.

FutureValue

No variables are added

source
EnergyModelsBase.variables_elementFunction
EMB.variables_element(m, 𝒱::Vector{<:FutureValue}, 𝒯, modeltype::EnergyModel)

Default fallback method for a vector of elements if no other method is defined for a given vector type.

source
EnergyModelsBase.variables_emissionFunction
EMB.variables_emission(m, 𝒱::Vector{<:FutureValue}, 𝒳ᵛᵉᶜ, 𝒫, 𝒯, modeltype::EnergyModel)

Declaration of functions to add emission variables for FutureValue elements.

FutureValue

No variables are added

source

Functions for accessing different information

The following functions are introduced for UpdateCase types. They extract the updated value.

EnergyModelsBase.get_productsFunction
EMB.get_products(𝒰::UpdateCase)

Method for the EnergyModelsBase function to extract the new Resources of the individual ProductSub types.

This element vector can be directly utilized for the field elements of a Case.

source
EnergyModelsBase.get_elements_vecFunction
EMB.get_elements_vec(𝒰::UpdateCase)

Method for the EnergyModelsBase function to extract the new vector of element vectors 𝒳ᵛᵉᶜ of UpdateCase 𝒰.

This element vector can be directly utilized for the field elements of a Case.

source
EnergyModelsBase.get_nodesFunction
EMB.get_nodes(𝒰::UpdateCase)

Method for the EnergyModelsBase function to extract the new Nodes of the individual NodeSub types of UpdateCase 𝒰.

This element vector can be directly utilized for the field elements of a Case.

source
EnergyModelsBase.get_linksFunction
EMB.get_links(𝒰::UpdateCase)

Method for the EnergyModelsBase function to extract the new Links of the individual LinkSub types of UpdateCase 𝒰.

This element vector can be directly utilized for the field elements of a Case.

source