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 types

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
abstract type 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 type is only accessible if EnergyModelsInvestments is loaded

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

source
EnergyModelsBase.InvestmentModelType
struct 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.

InvestmentData types

InvestmentData subtypes are used to provide technologies introduced in EnergyModelsX (nodes and transmission modes) a subtype of ExtensionData 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
struct 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
struct 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