EnergyModelsInvestments.EnergyModelsInvestments
— ModuleMain module for EnergyModelsInvestments
.
This module implements functionalities allowing to run investment analysis.
It is in its current version extending EnergyModelsBase
and cannot be used as a stand-alone module.
The extension EMIGeoExt
includes furthermore the investment options for transmission modes as described in EnergyModelsGeography
.
EnergyModelsInvestments.AbstractInvData
— TypeAbstractInvData
Supertype for investment data for nodal investments.
EnergyModelsInvestments.AbstractInvestmentModel
— TypeAn abstract investment model type.
This abstract model type should be used when creating additional EnergyModel
types that should utilize investments. An example for additional types is given by the inclusion of, e.g., SDDP
.
EnergyModelsInvestments.BinaryInvestment
— TypeBinaryInvestment <: Investment
Binary investment in a given capacity with binary variables. The chosen capacity within a strategic period is given by the field cap
.
Binary investments introduce one binary variable for each strategic period.
Fields
cap::TimeProfile
is the capacity used for the fixed investments.
EnergyModelsInvestments.BinaryInvestment
— MethodWhen the field cap
is not included, it is assumed that its value is FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.ContinuousInvestment
— TypeContinuousInvestment <: Investment
Continuous investment between a lower and upper bound.
Fields
min_add::TimeProfile
is the minimum added capacity in a strategic period. In the case ofContinuousInvestment
, this implies that the model must invest at least in this capacity in each strategic period.max_add::TimeProfile
is the maximum added capacity in a strategic period.
EnergyModelsInvestments.ContinuousInvestment
— MethodWhen the fields min_add
and max_add
are not included, it is assumed that their values are FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.DiscreteInvestment
— TypeDiscreteInvestment <: Investment
Discrete investment with integer variables using an increment. The increment for the discrete investment can be different for the individual strategic periods.
Discrete investments introduce one integer variable for each strategic period.
Fields
increment::TimeProfile
is the used increment.
EnergyModelsInvestments.DiscreteInvestment
— MethodWhen the field increment
is not included, it is assumed that its value is FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.FixedInvestment
— TypeFixedInvestment <: Investment
Fixed investment in a given capacity. The model is forced to invest in the capacity provided by the field cap
.
Fields
cap::TimeProfile
is capacity used for the fixed investments.
EnergyModelsInvestments.FixedInvestment
— MethodWhen the field cap
is not included, it is assumed that its value is FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.Investment
— TypeInvestment
Investment type traits for nodes. The investment type corresponds to the chosen investment mode and includes the required input.
EnergyModelsInvestments.InvestmentData
— TypeAbstract type for the extra data for investing in technologies.
EnergyModelsInvestments.InvestmentModel
— TypeA concrete basic investment model type based on the standard OperationalModel
as declared in EnergyModelsBase
. The concrete basic investment model is similar to an OperationalModel
, but allows for investments and additional discounting of future years.
Fields
emission_limit::Dict{<:ResourceEmit, <:TimeProfile}
are the emission caps for the different emissions types considered.emission_price::Dict{<:ResourceEmit, <:TimeProfile}
are the prices for the different emissions types considered.co2_instance
is aResourceEmit
and corresponds to the type used for CO₂.r::Float64
is the discount rate in the investment optimization.
EnergyModelsInvestments.LifetimeMode
— TypeLifetimeMode
Supertype for the lifetime mode.
EnergyModelsInvestments.NoStartInvData
— TypeNoStartInvData <: AbstractInvData
Investment data in which the initial capacity is not specified in the InvestmentData
. Instead, the initial capacity is inferred from the capacity of the technology.
Fields
capex::TimeProfile
is the capital costs for investing in a capacity. The value is relative to the added capacity.max_inst::TimeProfile
is the maximum installed capacity in a strategic period.inv_mode::Investment
is the chosen investment mode for the technology. The following investment modes are currently available:BinaryInvestment
,DiscreteInvestment
,ContinuousInvestment
,SemiContinuousInvestment
orFixedInvestment
.life_mode::LifetimeMode
is type of handling the lifetime. Several different alternatives can be used:UnlimitedLife
,StudyLife
,PeriodLife
orRollingLife
.
EnergyModelsInvestments.PeriodLife
— TypePeriodLife <: LifetimeMode
The investment is considered to last only for the strategic period. The excess lifetime is considered in the rest value. If the lifetime is lower than the length of the period, reinvestment is considered as well.
Fields
lifetime::TimeProfile
is the chosen lifetime of the technology.
EnergyModelsInvestments.PeriodLife
— MethodWhen the field lifetime
is not included, it is assumed that its value is FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.RollingLife
— TypeRollingLife <: LifetimeMode
The investment is rolling to the next strategic periods and it is retired at the end of its lifetime or the end of the previous strategic period if its lifetime ends between two periods.
Fields
lifetime::TimeProfile
is the chosen lifetime of the technology.
EnergyModelsInvestments.RollingLife
— MethodWhen the field lifetime
is not included, it is assumed that its value is FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.SemiContiInvestment
— TypeSemiContiInvestment <: Investment
Supertype for semi-continuous investments, that is the added capacity is either zero or between a minimum and a maximum value.
Semi-continuous investments introduce one binary variable for each strategic period.
EnergyModelsInvestments.SemiContinuousInvestment
— TypeSemiContinuousInvestment <: Investment
Semi-continuous investments, that is the added capacity is either zero or between a minimum and a maximum value. In this subtype, the cost is crossing the origin, that is the CAPEX is still linear dependent on the
Semi-continuous investments introduce one binary variable for each strategic period.
Fields
min_add::TimeProfile
is the minimum added capacity in a strategic period. In the case ofSemiContinuousInvestment
, this implies that the model must invest at least in this capacity in each strategic period. in this capacity in each strategic period where the model decides to invest. The model can also choose not too invest at all.max_add::TimeProfile
is the maximum added capacity in a strategic period.
EnergyModelsInvestments.SemiContinuousInvestment
— MethodWhen the fields min_add
and max_add
are not included, it is assumed that their values are FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.SemiContinuousOffsetInvestment
— TypeSemiContinuousOffsetInvestment <: Investment
Semi-continuous investments, that is the added capacity is either zero or between a minimum and a maximum value. In this subtype, the cost is not crossing the origin. Instead, there is an offset (y- intercept) in the variable capex_cap
, that is its value is larger or smaller than 0 at an invested capacity of 0 given by the field capex_offset
. This allows to the user to use different slopes, and hence, account for economy of scales.
Semi-continuous investments introduce one binary variable for each strategic period.
Fields
max_add::TimeProfile
is the maximum added capacity in a strategic period.min_add::TimeProfile
is the minimum added capacity in a strategic period. In the case ofSemiContinuousOffsetInvestment
, this implies that the model must invest at least in this capacity in each strategic period. in this capacity in each strategic period where the model decides to invest. The model can also choose not too invest at all.capex_offset::TimeProfile
is offset for the CAPEX in a strategic period.
EnergyModelsInvestments.SemiContinuousOffsetInvestment
— MethodWhen the fields min_add
, max_add
, and capex_offset
are not included, it is assumed that their values are FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.SingleInvData
— TypeSingleInvData <: 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
capex::TimeProfile
is the capital costs for investing in a capacity. The value is relative to the added capacity.max_inst::TimeProfile
is the maximum installed capacity in a strategic period.initial::Real
is the initial capacity. This results in the creation of aSingleInvData
type for the investment data.inv_mode::Investment
is the chosen investment mode for the technology. The following investment modes are currently available:BinaryInvestment
,DiscreteInvestment
,ContinuousInvestment
,SemiContinuousInvestment
orFixedInvestment
.life_mode::LifetimeMode
is type of handling the lifetime. Several different alternatives can be used:UnlimitedLife
,StudyLife
,PeriodLife
orRollingLife
. Iflife_mode
is not specified, the model assumes anUnlimitedLife
.
EnergyModelsInvestments.StartInvData
— TypeStartInvData <: AbstractInvData
Investment data in which the initial capacity is specified in the InvestmentData
. The structure is similiar to NoStartInvData
with the addition of the field initial::Real
, see below.
Fields in addition to NoStartInvData
initial::Real
is the initial capacity.
EnergyModelsInvestments.StorageInvData
— TypeStorageInvData <: 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 doscharge capacity of the storage (discharge
).
It uses the macro @kwdef
to use keyword arguments and default values. 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.
EnergyModelsInvestments.StudyLife
— TypeStudyLife <: LifetimeMode
The investment lasts for the whole study period with adequate reinvestments at the end of the lifetime and considering the rest value.
Fields
lifetime::TimeProfile
is the chosen lifetime of the technology.
EnergyModelsInvestments.StudyLife
— MethodWhen the field lifetime
is not included, it is assumed that its value is FixedProfile(0)
. This behavior is only for allowing the legacy constructor to work, while it will be removed in the near future.
EnergyModelsInvestments.UnlimitedLife
— TypeUnlimitedLife <: LifetimeMode
The investment's life is not limited. The investment costs do not consider any reinvestment or rest value.
EnergyModelsBase.check_node_data
— MethodEMB.check_node_data(
n::EMB.Node,
data::InvestmentData,
𝒯,
modeltype::AbstractInvestmentModel,
check_timeprofiles::Bool
)
Performs various checks on investment data for standard nodes.
Checks
- Each node can only have a single
InvestmentData
. - All checks incorporated in the function
check_inv_data
.
EnergyModelsBase.check_node_data
— MethodEMB.check_node_data(
n::Storage,
data::InvestmentData,
𝒯,
modeltype::AbstractInvestmentModel,
check_timeprofiles::Bool,
)
Performs various checks on investment data for standard nodes. It is similar to the standard check nodes functions, but adds checks on
Checks
- Each node can only have a single
InvestmentData
. - The
InvestmentData
must beStorageInvData
. - For each individual investment field all checks incorporated in the function
check_inv_data
.
EnergyModelsBase.constraints_capacity_installed
— MethodEMB.constraints_capacity_installed(
m,
n::EMB.Node,
𝒯::TimeStructure,
modeltype::AbstractInvestmentModel,
)
When the modeltype is an investment model, the function introduces the related constraints for the capacity expansion. The investment mode and lifetime mode are used for adding constraints.
The default function only accepts nodes with SingleInvData
. If you have several capacities for investments, you have to dispatch specifically on the node type. This is implemented for Storage
nodes.
EnergyModelsBase.constraints_capacity_installed
— MethodEMB.constraints_capacity_installed(
m,
n::Storages,
𝒯::TimeStructure,
modeltype::AbstractInvestmentModel,
)
When the modeltype is an investment model and the node is a Storage
node, the function introduces the related constraints for the capacity expansions for the fields :charge
, :level
, and :discharge
. This requires the utilization of the StorageInvData
investment type, in which the investment mode and lifetime mode are used for adding constraints for each capacity.
EnergyModelsBase.objective
— MethodEMB.objective(m, 𝒩, 𝒯, 𝒫, modeltype::AbstractInvestmentModel)
Create objective function overloading the default from EMB for AbstractInvestmentModel
.
Maximize Net Present Value from investments (CAPEX) and operations (OPEX and emission costs)
TODO:
Consider adding contributions from
- revenue (as positive variable, adding positive)
- maintenance based on usage (as positive variable, adding negative)
These variables would need to be introduced through the package SparsVariables
.
Both are not necessary, as it is possible to include them through the OPEX values, but it would be beneficial for a better separation and simpler calculations from the results.
EnergyModelsBase.variables_capex
— MethodEMB.variables_capex(m, 𝒩, 𝒯, 𝒫, modeltype::AbstractInvestmentModel)
Create variables for the capital costs for the invesments in storage and technology nodes.
Additional variables for investment in capacity:
:cap_capex
- CAPEX costs for a technology:cap_current
- installed capacity for storage in each strategic period:cap_add
- added capacity:cap_rem
- removed capacity:cap_invest_b
- binary variable whether investments in capacity are happening:cap_remove_b
- binary variable whether investments in capacity are removed
Additional variables for investment in storage:
:stor_level_capex
- CAPEX costs for increases in the capacity of a storage:stor_level_current
- installed capacity for storage in each strategic period:stor_level_add
- added capacity:stor_level_rem
- removed capacity:stor_level_invest_b
- binary variable whether investments in capacity are happening:stor_level_remove_b
- binary variable whether investments in capacity are removed:stor_charge_capex
- CAPEX costs for increases in the rate of a storage:stor_charge_current
- installed rate for storage in each strategic period:stor_charge_add
- added rate:stor_charge_rem
- removed rate:stor_charge_invest_b
- binary variable whether investments in rate are happening:stor_charge_remove_b
- binary variable whether investments in rate are removed
EnergyModelsInvestments.InvData
— MethodInvData(;
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 mdodes 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.
EnergyModelsInvestments.InvDataStorage
— MethodInvDataStorage(;
#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.
EnergyModelsInvestments.TransInvData
— MethodInvData(; capextrans::TimeProfile, transmaxinst::TimeProfile, transmaxadd::TimeProfile, transminadd::TimeProfile, invmode::Investment = ContinuousInvestment(), transstart::Union{Real, Nothing} = nothing, transincrement::TimeProfile = FixedProfile(0), capextransoffset::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 mdodes 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.
EnergyModelsInvestments.add_investment_constraints
— Methodadd_investment_constraints(
m,
element,
inv_data::AbstractInvData,
cap,
prefix,
𝒯ᴵⁿᵛ::TS.StratPeriods,
disc_rate::Float64,
)
Core function for introducing constraints on the investments. The constraints include introducing bounds on the available capacities as well as the calculation of the CAPEX.
The function calls two additional subroutines, set_capacity_installation
and set_capacity_cost
which are used for introducing bounds on the investment variables and calculating the CAPEX contribution of each investments. The utilization of subroutines allows the introduction of dispatch for the individual investment and lifetime options.
Arguments
m
: the JuMP model instance.element
: the element for which investment constraints should be added. Any potential element can be used. InEnergyModelsBase
, the individual element is either aNode
or aTransmissionMode
.inv_data::AbstractInvData
: the investment data for the node and capacitycap
.prefix
: the prefix used for variables for this element. This argument is used for extracting the individual investment variables.cap
: the field that is used if several capacities are provided.𝒯ᴵⁿᵛ::TS.StratPeriods
: the strategic periods structure.disc_rate
: the discount rate used in the lifetime calculation for reinvestment and end of life calculations.
EnergyModelsInvestments.capex
— Methodcapex(n::AbstractInvData, t_inv)
Returns the CAPEX of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.capex
— Methodcapex(inv_data::AbstractInvData)
Returns the CAPEX of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.capex_offset
— Methodcapex_offset(inv_data::AbstractInvData, t_inv)
Returns the offset of the CAPEX of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.capex_offset
— Methodcapex_offset(inv_data::AbstractInvData)
Returns the offset of the CAPEX of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.capex_offset
— Methodcapex_offset(inv_mode::SemiContinuousOffsetInvestment, t_inv)
Returns the offset of the CAPEX of the investment mode inv_mode
in investment period t_inv
.
EnergyModelsInvestments.capex_offset
— Methodcapex_offset(inv_mode::SemiContinuousOffsetInvestment)
Returns the offset of the CAPEX of the investment mode inv_mode
as TimeProfile
.
EnergyModelsInvestments.check_inv_data
— Methodcheck_inv_data(
inv_data::AbstractInvData,
capacity_profile::TimeProfile,
𝒯,
message::String,
check_timeprofiles::Bool,
)
Performs various checks on investment data introduced within EnergyModelsInvestments
Checks
- For each field with
TimeProfile
:- If the
TimeProfile
is aStrategicProfile
, it will check that the profile is in accordance with theTimeStructure
TimeProfile
s inInvestmentData
cannot includeOperationalProfile
,RepresentativeProfile
, orScenarioProfile
as this is not allowed through indexing on theTimeProfile
.
- If the
- The field
:min_add
has to be less than:max_add
if the investment mode is given byContinuousInvestment
orSemiContiInvestment
. - Existing capacity cannot be larger than
:max_inst
capacity in the beginning. IfNoStartInvData
is used, it also checks that the theTimeProfile
capacity_profile
is not includingOperationalProfile
,RepresentativeProfile
, orScenarioProfile
to avoid indexing problems.
EnergyModelsInvestments.discount_rate
— Methoddiscount_rate(modeltype::AbstractInvestmentModel)
Returns the discount rate of EnergyModel
modeltype
EnergyModelsInvestments.get_var_add
— Methodget_var_add(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_add
— Methodget_var_add(m, prefix::Symbol)
Extracts the investment capacity variable with a given prefix
from the model.
EnergyModelsInvestments.get_var_capex
— Methodget_var_capex(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_capex
— Methodget_var_capex(m, prefix::Symbol)
Extracts the CAPEX variable with a given prefix
from the model.
EnergyModelsInvestments.get_var_current
— Methodget_var_current(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_current
— Methodget_var_current(m, prefix::Symbol)
Extracts the current capacity variable with a given prefix
from the model.
EnergyModelsInvestments.get_var_inst
— Methodget_var_inst(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_inst
— Methodget_var_inst(m, prefix::Symbol)
Extracts the installed capacity variable with a given prefix
from the model.
EnergyModelsInvestments.get_var_invest_b
— Methodget_var_invest_b(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_invest_b
— Methodget_var_invest_b(m, prefix::Symbol)
Extracts the binary investment variable with a given prefix
from the model.
EnergyModelsInvestments.get_var_rem
— Methodget_var_rem(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_rem
— Methodget_var_rem(m, prefix::Symbol)
Extracts the retired capacity variable with a given prefix
from the model.
EnergyModelsInvestments.get_var_remove_b
— Methodget_var_remove_b(m, prefix::Symbol, element)
When the type element
is used as conditional input, it extracts only the variable for the specified node.
EnergyModelsInvestments.get_var_remove_b
— Methodget_var_remove_b(m, prefix::Symbol)
Extracts the binary retirement variable with a given prefix
from the model.
EnergyModelsInvestments.has_investment
— Methodhas_investment(element)
For a given type element
, checks that it contains the required investment data.
EnergyModelsInvestments.has_investment
— Methodhas_investment(n::Storage, field::Symbol)
When the element type is a Storage
node, checks that it contains investments for the field field
, that is :charge
, :level
, or :discharge
.
EnergyModelsInvestments.increment
— Methodincrement(inv_data::AbstractInvData, t_inv)
Returns the capacity increment of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.increment
— Methodincrement(inv_data::AbstractInvData)
Returns the capacity increment of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.increment
— Methodincrement(inv_mode::Investment, t_inv)
Returns the capacity increment of the investment mode inv_mode
in investment period t_inv
.
EnergyModelsInvestments.increment
— Methodincrement(inv_mode::Investment)
Returns the capacity increment of the investment mode inv_mode
as TimeProfile
.
EnergyModelsInvestments.invest_capacity
— Methodinvest_capacity(inv_data::AbstractInvData, t_inv)
Returns the capacity profile for investments of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.invest_capacity
— Methodinvest_capacity(inv_data::AbstractInvData)
Returns the capacity investments of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.invest_capacity
— Methodinvest_capacity(inv_mode::Investment, t_inv)
Returns the capacity profile for investments of the investment mode inv_mode
in investment period t_inv
.
EnergyModelsInvestments.invest_capacity
— Methodinvest_capacity(inv_mode::Investment)
Returns the capacity investments of the investment mode inv_mode
as TimeProfile
.
EnergyModelsInvestments.investment_data
— Methodinvestment_data(element, field::Symbol)
Return the investment data of the type element
of the capacity field
.
EnergyModelsInvestments.investment_data
— Methodinvestment_data(element)
Return the investment data of the type element
.
EnergyModelsInvestments.investment_data
— Methodinvestmentdata(invdata::SingleInvData)
Return the investment data of the investment data SingleInvData
.
EnergyModelsInvestments.investment_mode
— Methodinvestment_mode(inv_data::AbstractInvData)
Return the investment mode of the investment data inv_data
. By default, all investments are continuous.
EnergyModelsInvestments.investment_mode
— Methodinvestment_mode(element, cap::Symbol)
Return the investment mode of the type element
and the capacity cap
.
This function utilizes the function investment_mode(investment_mode(inv_data::AbstractInvData))
for the AbstractInvData
of the capacity cap
EnergyModelsInvestments.investment_mode
— Methodinvestment_mode(element)
Return the investment mode of the type element
. By default, all investments are continuous.
EnergyModelsInvestments.lifetime
— Methodlifetime(inv_data::AbstractInvData, t_inv)
Return the lifetime of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.lifetime
— Methodlifetime(inv_data::AbstractInvData)
Return the lifetime of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.lifetime
— Methodlifetime(lifetime_mode::LifetimeMode, t_inv)
Return the lifetime of the lifetime mode lifetime_mode
in investment period t_inv
.
EnergyModelsInvestments.lifetime
— Methodlifetime(lifetime_mode::LifetimeMode)
Return the lifetime of the lifetime mode lifetime_mode
as TimeProfile
.
EnergyModelsInvestments.lifetime_mode
— Methodlifetime_mode(inv_data::AbstractInvData)
Return the lifetime mode of the investment data inv_data
. By default, all investments are unlimited.
EnergyModelsInvestments.max_add
— Methodmax_add(inv_data::AbstractInvData, t_inv)
Returns the maximum allowed added capacity of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.max_add
— Methodmax_add(inv_data::AbstractInvData)
Returns the maximum allowed added capacity of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.max_add
— Methodmax_add(inv_mode::Investment, t_inv)
Returns the maximum allowed added capacity of the investment mode inv_mode
investment period t_inv
.
EnergyModelsInvestments.max_add
— Methodmax_add(inv_mode::Investment)
Returns the maximum allowed added capacity of the investment mode inv_mode
as TimeProfile
.
EnergyModelsInvestments.max_installed
— Methodmax_installed(inv_data::AbstractInvData, t_inv)
Returns the maximum allowed installed capacity of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.max_installed
— Methodmax_installed(inv_data::AbstractInvData)
Returns the maximum allowed installed capacity the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.min_add
— Methodmin_add(inv_data::AbstractInvData, t_inv)
Returns the minimum allowed added capacity of the investment data inv_data
in investment period t_inv
.
EnergyModelsInvestments.min_add
— Methodmin_add(inv_data::AbstractInvData)
Returns the minimum allowed added capacity of the investment data inv_data
as TimeProfile
.
EnergyModelsInvestments.min_add
— Methodmin_add(inv_mode::Investment, t_inv)
Returns the minimum allowed added capacity of the investment mode inv_mode
in investment period t_inv
.
EnergyModelsInvestments.min_add
— Methodmin_add(inv_mode::Investment)
Returns the minimum allowed added capacity of the investment mode inv_mode
as TimeProfile
.
EnergyModelsInvestments.nodes_investment
— Methodnodes_investment(𝒩::Vector{<:EMB.Node})
For a given Vector{<:Node}
, return all Node
s with investments.
EnergyModelsInvestments.set_capacity_cost
— Methodset_capacity_cost(m, element, inv_data, prefix, 𝒯ᴵⁿᵛ, disc_rate)
Set the capex_cost based on the technology investment cost, and strategic period length to include the needs for reinvestments and the rest value. It implements different versions of the lifetime implementation:
- UnlimitedLife: The investment life is not limited. The investment costs do not consider any reinvestment or rest value.
- StudyLife: The investment last for the whole study period with adequate reinvestments at end of lifetime and rest value.
- PeriodLife: The investment is considered to last only for the strategic period. the excess lifetime is considered in the rest value.
- RollingLife: The investment is rolling to the next strategic periods and it is retired at the end of its lifetime or the end of the previous sp if its lifetime ends between two sp.
EnergyModelsInvestments.set_capacity_installation
— Methodset_capacity_installation(m, element, prefix, 𝒯ᴵⁿᵛ, inv_mode)
Add constraints related to installation depending on investment mode of type element
.
EnergyModelsInvestments.set_capex_discounter
— Methodset_capex_discounter(years, lifetime, disc_rate)
Calculate the discounted values used in the lifetime calculations, when the LifetimeMode
is given by PeriodLife
and StudyLife
.
Arguments
years:
: the remaining years for calculating the discounted value. The years are depending on the consideredLifetimeMode
, usingremaining(t_inv, 𝒯)
forStudyLife
andduration(t_inv)
forPeriodLife
.lifetime
: the lifetime of the element.disc_rate
: the discount rate.
EnergyModelsInvestments.set_capex_value
— Methodset_capex_value(m, element, inv_data, prefix, 𝒯ᴵⁿᵛ)
Calculate the cost value for the different investment modes of the investment data inv_data
for element element
.
Arguments
m
: the JuMP model instance.element
: the element type for which the absolute CAPEX should be calculated.r
: the discount rate.inv_data
: the investment data given as subtype ofAbstractInvData
.prefix
: the prefix used for variables for this element.𝒯ᴵⁿᵛ
: the strategic periods structure.
EnergyModelsInvestments.set_capex_value
— Methodset_capex_value(m, element, inv_data, prefix, 𝒯ᴵⁿᵛ, ::Investment)
When no specialized method is defined for the investment mode, it calculates the capital cost based on the multiplication of the field capex
in inv_data
with the added capacity.
EnergyModelsInvestments.set_capex_value
— Methodset_capex_value(m, element, inv_data, prefix, 𝒯ᴵⁿᵛ, inv_mode::SemiContinuousOffsetInvestment)
When the investment mode is given by SemiContinuousOffsetInvestment
then there is an additional offset for the CAPEX.
EnergyModelsInvestments.start_cap
— Methodstart_cap(element, t_inv, inv_data::AbstractInvData, cap)
Returns the starting capacity of the type element
in the first investment period. If NoStartInvData
is used for the starting capacity, it deduces the value from the provided initial capacity.