EnergymodelsInvestments extensions

The extension introduces new types and functions. These are create within the core structure, as it is not possible to export new types/functions from extensions. In this case, we use constructors within the extension for the abstract types declared within the core structure.

The following page provides you with an overview of the individual constructors. The described fields are only available if you load EnergyModelsInvestments as well.

AbstractInvestmentModel

Including the extension for EnergyModelsInvestments results in the declaration of the types AbstractInvestmentModel and InvestmentModel which can be used for creating models with investments It takes as additional input the discount_rate. The discount_rate is an important element of investment analysis needed to represent the present value of future cash flows. It is provided to the model as a value between 0 and 1 (e.g. a discount rate of 5 % is 0.05).

EnergyModelsBase.AbstractInvestmentModelType
AbstractInvestmentModel <: EnergyModel

An abstract investment model type.

This abstract model type should be used when creating additional EnergyModel types that should utilize investments.

Note

Although it is declared within EnergyModelsBase, its concrete is only accessible if EnergyModelsInvestments is loaded

An example for additional types is given by the inclusion of, e.g., SDDP.

source
EnergyModelsBase.InvestmentModelType
InvestmentModel <: AbstractInvestmentModel

A concrete basic investment model type based on the standard OperationalModel. The concrete basic investment model is similar to an OperationalModel, but allows for investments and additional discounting of future years.

Note

Although it is declared within EnergyModelsBase, its concrete is only accessible if EnergyModelsInvestments is loaded

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₂.
  • r::Float64 is the discount rate in the investment optimization.
source

Functions for accessing fields of AbstractInvestmentModel types

The current implementation extracts the discount rate through a function.

Warning

If you want to introduce new AbstractInvestmentModel types, you have to in additional consider the function discount_rate.

Investment data

InvestmentData types

InvestmentData subtypes are used to provide technologies introduced in EnergyModelsX (nodes and transmission modes) a subtype of Data that can be used for dispatching. Two different types are directly introduced, SingleInvData and StorageInvData.

SingleInvData is providing a composite type with a single field. It is used for investments in technologies with a single capacity, that is all nodes except for storage nodes as well as transmission modes.

StorageInvData is required as Storage nodes behave differently compared to the other nodes. In Storage nodes, it is possible to invest both in the charge capacity for storing energy, the storage capacity, that is the level of a Storage node, as well as the discharge capacity, that is how fast energy can be withdrawn. Correspondingly, it is necessary to have individual parameters for the potential investments in each capacity, that is through the fields :charge, :level, and :discharge.

EnergyModelsBase.SingleInvDataType
SingleInvData <: InvestmentData

Extra investment data for type investments. The extra investment data has only a single field in which AbstractInvData has to be added.

The advantage of separating AbstractInvData from the InvestmentData node is to allow easier separation of EnergyModelsInvestments and EnergyModelsBase and provides the user with the potential of introducing new capacities for types.

Fields

  • cap::AbstractInvData is the investment data for the capacity.

When multiple inputs are provided, a constructor directly creates the corresponding AbstractInvData.

Fields

source
EnergyModelsBase.StorageInvDataType
StorageInvData <: InvestmentData

Extra investment data for storage investments. The extra investment data for storage investments can, but does not require investment data for the charge capacity of the storage (charge), increasing the storage capacity (level), or the discharge capacity of the storage (discharge).

It utilizes a constructor with keyword arguments for the individual parameters. Hence, the names of the parameters have to be specified.

Fields

  • charge::Union{AbstractInvData, Nothing} is the investment data for the charge capacity.
  • level::Union{AbstractInvData, Nothing} is the investment data for the level capacity.
  • discharge::Union{AbstractInvData, Nothing} is the investment data for the discharge capacity.
source

Legacy constructors

We provide a legacy constructor, InvData and InvDataStorage, that use the same input as in version 0.5.x. If you want to adjust your model to the latest changes, please refer to the section Update your model to the latest version of EnergyModelsInvestments.

EnergyModelsBase.InvDataFunction
InvData(;
    capex_cap::TimeProfile,
    cap_max_inst::TimeProfile,
    cap_max_add::TimeProfile,
    cap_min_add::TimeProfile,
    inv_mode::Investment = ContinuousInvestment(),
    cap_start::Union{Real, Nothing} = nothing,
    cap_increment::TimeProfile = FixedProfile(0),
    life_mode::LifetimeMode = UnlimitedLife(),
    lifetime::TimeProfile = FixedProfile(0),
)

Legacy constructor for a InvData.

The new storage descriptions allows now for a reduction in functions which is used to make EnergModelsInvestments less dependent on EnergyModelsBase.

The core changes to the existing structure is the move of the required parameters to the type Investment (e.g., the minimum and maximum added capacity is only required for investment modes that require these parameters) as well as moving the lifetime to the type LifetimeMode, when required.

See the documentation for further information regarding how you can translate your existing model to the new model.

Note

Although it is declared within EnergyModelsBase, its concrete is only accessible if EnergyModelsInvestments is loaded

source
EnergyModelsBase.InvDataStorageFunction
InvDataStorage(;
    #Investment data related to storage power
    capex_rate::TimeProfile,
    rate_max_inst::TimeProfile,
    rate_max_add::TimeProfile,
    rate_min_add::TimeProfile,
    capex_stor::TimeProfile,
    stor_max_inst::TimeProfile,
    stor_max_add::TimeProfile,
    stor_min_add::TimeProfile,
    inv_mode::Investment = ContinuousInvestment(),
    rate_start::Union{Real, Nothing} = nothing,
    stor_start::Union{Real, Nothing} = nothing,
    rate_increment::TimeProfile = FixedProfile(0),
    stor_increment::TimeProfile = FixedProfile(0),
    life_mode::LifetimeMode = UnlimitedLife(),
    lifetime::TimeProfile = FixedProfile(0),
)

Storage descriptions were changed in EnergyModelsBase v0.7 resulting in the requirement for rewriting the investment options for Storage nodes.

See the documentation for further information regarding how you can translate your existing model to the new model.

Note

Although it is declared within EnergyModelsBase, its concrete is only accessible if EnergyModelsInvestments is loaded

source