CapacityCostLink
CapacityCostLink links model the transport of energy between two nodes with capacity-dependent operational costs applied to a specified resource. Unlike standard Direct links, they enable cost modeling based on maximum capacity utilization over defined time periods. This is useful for applications such as transmission networks, pipelines, or interconnectors where usage fees scale with peak capacity demands.
In addition, they only allow the transport of a single, specified Resource.
Introduced type and its fields
CapacityCostLink is implemented as equivalent to an abstract type Link. Hence, it utilizes the same functions declared in EnergyModelsBase.
The current implementation is not very flexible with respect to the chosen time structure. Specifically, if you use OperationalScenarios, RepresentativePeriods, or differing operational structures within your TwoLevel, you must be careful when choosing the parameter cap_price_periods.
Standard fields
CapacityCostLink has the following standard fields, equivalent to a Direct link:
id:
The fieldidis only used for providing a name to the link.from::Node:
The node from which there is flow into the link.to::Node:
The node to which there is flow out of the link.formulation::Formulation:
The used formulation of links. If not specified, aLinearlink is assumed.
Additional fields
The following additional fields are included for CapacityCostLink links:
cap::TimeProfile:
The maximum transport capacity of the link for thecap_resource. If the link should contain investments through the application ofEnergyModelsInvestments, it is important to note that you can only useFixedProfileorStrategicProfilefor the capacity, but notRepresentativeProfileorOperationalProfile. In addition, all values have to be non-negative.cap_price::TimeProfile:
The price per unit of maximum capacity usage over the sub-periods. This value is averaged over sub-periods as defined bycap_price_periods. All values have to be non-negative.cap_price_periods::Int64:
The number of sub-periods within a year for which the capacity cost is calculated. This allows modeling of varying peak demands across seasons. The value must be positive.Number of sub-periods For investment periods with many operational periods, consider increasing the number of
cap_price_periods. TheCapacityCostLinkcapacity constraints couple operational periods and can significantly increase solve time. Splitting the horizon into multiple sub-periods reduces this coupling and often makes the problem much easier to solve. In some cases, this also means using more than one capacity price period even if capacity costs occur only annually in reality, depending on model size and complexity.cap_resource::Resource:
TheResourcefor which capacity-dependent costs are applied. ThisResourceis the only transportedResourceby aCapacityCostLink.data::Vector{<:ExtensionData}:
An entry for providing additional data to the model. In the current version, it is used for providing additional investment data whenEnergyModelsInvestmentsis used.
Mathematical description
In the following mathematical equations, we use the name for variables and functions used in the model. Variables are in general represented as
$\texttt{var\_example}[index_1, index_2]$
with square brackets, while functions are represented as
$func\_example(index_1, index_2)$
with paranthesis.
Variables
Standard variables
CapacityCostLink utilizes standard variables from the Link type, as described on the page Optimization variables:
Additional variables
Two additional variables track capacity utilization and associated costs over sub-periods:
- $\texttt{ccl\_cap\_use\_max}[l, t_{sub}]$: Maximum capacity usage in sub-period $t_{sub}$ for link $l$.
- $\texttt{ccl\_cap\_use\_cost}[l, t_{sub}]$: Operational cost in sub-period $t_{sub}$ for link $l$.
Constraints
Standard constraints
The applied standard constraint for capacity installed is:
\[\texttt{link\_cap\_inst}[l, t] = capacity(l, t)\]
and the no-loss constraint
\[\texttt{link\_out}[l, t, p] = \texttt{link\_in}[l, t, p] \quad \forall p \in inputs(l)\]
Additional constraints
All additional constraints are created within a new method for the function create_link.
The capacity utilization constraint tracks the maximum usage within each sub-period:
\[\texttt{link\_in}[l, t, cap\_resource(l)] \leq \texttt{ccl\_cap\_use\_max}[l, t_{sub}]\]
The capacity cost is calculated as:
\[\texttt{ccl\_cap\_use\_cost}[l, t_{sub}] = \texttt{ccl\_cap\_use\_max}[l, t_{sub}] \times \overline{cap\_price}(l, t_{sub})\]
where $\overline{cap\_price}$ is the average capacity price over the sub-period.
Finally, costs are aggregated to each strategic period:
\[\texttt{link\_opex\_var}[l, t_{inv}] = \sum_{t_{sub} \in t_{inv}} \texttt{ccl\_cap\_use\_cost}[l, t_{sub}]\]
In addition, the energy flow of the constrained resource should not exceed the maximum pipe capacity, which is included through the following constraint:
\[\texttt{flow\_in}[l, t, cap\_resource(l)] \leq \texttt{link\_cap\_inst}[l, t]\]