Note
This page is generated from inline documentation in MESSAGE/model_core.gms
.
MESSAGE core formulation
The MESSAGEix systems-optimization model minimizes total costs while satisfying given demand levels for commodities/services and considering a broad range of technical/engineering constraints and societal restrictions (e.g. bounds on greenhouse gas emissions, pollutants, system reliability). Demand levels are static (i.e. non-elastic), but the demand response can be integrated by linking MESSAGEix to the single sector general-economy MACRO model included in this framework.
For the complete list of sets, mappings and parameters, refer to the auto-documentation page Sets and mappings and Parameter definition. The mathematical notation that is used to represent sets and mappings in the equations below can also be found in the tables in Sets and mappings.
Variable definitions
Decision variables
Variable |
Explanatory text |
---|---|
\(\text{OBJ} \in \mathbb{R}\) |
Objective value of the optimization program |
\(\text{EXT}_{n,c,g,y} \in \mathbb{R}_+\) |
Extraction of non-renewable/exhaustible resources from reserves |
\(\text{STOCK}_{n,c,l,y} \in \mathbb{R}_+\) |
Quantity in stock (storage) at start of period \(y\) |
\(\text{STOCK_CHG}_{n,c,l,y,h} \in \mathbb{R}\) |
Input or output quantity into intertemporal commodity stock (storage) |
\(\text{COST_NODAL}_{n,y} \in \mathbb{R}\) |
System costs at the node level over time |
\(\text{REN}_{n,t,c,g,y,h} \in \mathbb{R}_+\) |
Activity of renewable technologies per grade |
\(\text{CAP_NEW}_{n,t,y} \in \mathbb{R}_+\) |
Newly installed capacity (yearly average over period duration) |
\(\text{CAP}_{n,t,y^V,y} \in \mathbb{R}_+\) |
Maintained capacity in year \(y\) of vintage \(y^V\) |
\(\text{CAP_FIRM}_{n,t,c,l,y,q} \in \mathbb{R}_+\) |
Capacity counting towards firm (dispatchable) |
\(\text{ACT}_{n,t,y^V,y,m,h} \in \mathbb{R}\) |
Activity of a technology (by vintage, mode, subannual time) |
\(\text{ACT_RATING}_{n,t,y^V,y,c,l,h,q} \in \mathbb{R}_+\) |
Auxiliary variable for activity attributed to a particular rating bin [1] |
\(\text{CAP_NEW_UP}_{n,t,y} \in \mathbb{R}_+\) |
Relaxation of upper dynamic constraint on new capacity |
\(\text{CAP_NEW_LO}_{n,t,y} \in \mathbb{R}_+\) |
Relaxation of lower dynamic constraint on new capacity |
\(\text{ACT_UP}_{n,t,y,h} \in \mathbb{R}_+\) |
Relaxation of upper dynamic constraint on activity [2] |
\(\text{ACT_LO}_{n,t,y,h} \in \mathbb{R}_+\) |
Relaxation of lower dynamic constraint on activity [2] |
\(\text{LAND}_{n,s,y} \in [0,1]\) |
Relative share of land-use scenario (for land-use model emulator) |
\(\text{EMISS}_{n,e,\widehat{t},y} \in \mathbb{R}\) |
Auxiliary variable for aggregate emissions by technology type |
\(\text{REL}_{r,n,y} \in \mathbb{R}\) |
Auxiliary variable for left-hand side of relations (linear constraints) |
\(\text{COMMODITY_USE}_{n,c,l,y} \in \mathbb{R}\) |
Auxiliary variable for amount of commodity used at specific level |
\(\text{COMMODITY_BALANCE}_{n,c,l,y,h} \in \mathbb{R}\) |
Auxiliary variable for right-hand side of Auxiliary COMMODITY_BALANCE |
\(\text{STORAGE}_{n,t,m,l,c,y,h} \in \mathbb{R}\) |
State of charge or content of storage at each sub-annual time slice |
\(\text{STORAGE_CHARGE}_{n,t,m,l,c,y,h} \in \mathbb{R}\) |
Charging of storage in each sub-annual time slice (negative for discharging) |
The index \(y^V\) is the year of construction (vintage) wherever it is necessary to clearly distinguish between year of construction and the year of operation.
All decision variables are by year, not by (multi-year) period, except \(\text{STOCK}_{n,c,l,y}\). In particular, the new capacity variable \(\text{CAP_NEW}_{n,t,y}\) has to be multiplied by the number of years in a period \(|y| = \text{duration_period}_{y}\) to determine the available capacity \(\text{CAP}_{n,t,y^V,y}\) in subsequent periods (assuming the newly build capacity is not immediately decommissioned):
\(\text{CAP}_{n,t,y^V,y} = \text{CAP_NEW}_{n,t,y} \cdot \text{duration_period}_{y}\)
\(\text{CAP_NEW}_{n,t,y}\) is therefore the amount of newly installed capacity in one year and \(\text{CAP}_{n,t,y^V,y}\) the amount, which is installed at the end of a (usually multi-year) period. This formulation gives more flexibility when it comes to using periods of different duration (more intuitive comparison across different periods).
The current model framework allows both input or output normalized formulation. This will affect the parametrization, see Section Efficiency - output- vs. input defined technologies for more details.
Auxiliary variables
Variable |
Explanatory text |
---|---|
\(\text{DEMAND}_{n,c,l,y,h} \in \mathbb{R}\) |
Demand level (in equilibrium with MACRO integration) |
\(\text{PRICE_COMMODITY}_{n,c,l,y,h} \in \mathbb{R}\) |
Commodity price (undiscounted marginals of Equation COMMODITY_BALANCE_GT and Equation COMMODITY_BALANCE_LT) |
\(\text{PRICE_EMISSION}_{n,\widehat{e},\widehat{t},y} \in \mathbb{R}\) |
Emission price (undiscounted marginals of Equation EMISSION_CONSTRAINT) |
\(\text{COST_NODAL_NET}_{n,y} \in \mathbb{R}\) |
System costs at the node level net of energy trade revenues/cost |
\(\text{GDP}_{n,y} \in \mathbb{R}\) |
Gross domestic product (GDP) in market exchange rates for MACRO reporting |
Warning
Please be aware that transitioning from one period length to another for consecutive periods may result in false values of \(\text{PRICE_EMISSION}\). Please see this issue for further information. We are currently working on a fix.
Objective function
The objective function of the MESSAGEix core model
Equation OBJECTIVE
The objective function (of the core model) minimizes total discounted systems costs including costs for emissions, relaxations of dynamic constraints
Regional system cost accounting function
Accounting of regional system costs over time
Equation COST_ACCOUNTING_NODAL
Accounting of regional systems costs over time as well as costs for emissions (taxes), land use (from the model land-use model emulator), relaxations of dynamic constraints, and linear relations.
Here, \(n^L \in N(n)\) are all nodes \(n^L\) that are sub-nodes of node \(n\). The subset of technologies \(t \in T(\widehat{t})\) are all tecs that belong to category \(\widehat{t}\), and similar notation is used for emissions \(e \in E\).
Resource and commodity section
Constraints on resource extraction
Equation EXTRACTION_EQUIVALENCE
This constraint translates the quantity of resources extracted (summed over all grades) to the input used by all technologies (drawing from that node). It is introduced to simplify subsequent notation in input/output relations and nodal balance constraints.
\[\begin{split}\sum_{g} \text{EXT}_{n,c,g,y} = \sum_{\substack{n^L,t,m,h,h^{\text{OD}} \\ y^V \leq y \\ \ l \in L^{\text{RES}} \subseteq L }} \text{input}_{n^L,t,y^V,y,m,n,c,l,h,h^{\text{OD}}} \cdot \text{ACT}_{n^L,t,m,y,h}\end{split}\]
The set \(L^{\text{RES}} \subseteq L\) denotes all levels for which the detailed representation of resources applies.
Equation EXTRACTION_BOUND_UP
This constraint specifies an upper bound on resource extraction by grade.
\[\text{EXT}_{n,c,g,y} \leq \text{bound_extraction_up}_{n,c,g,y}\]
Equation RESOURCE_CONSTRAINT
This constraint restricts that resource extraction in a year guarantees the “remaining resources” constraint, i.e., only a given fraction of remaining resources can be extracted per year.
\[\begin{split}\text{EXT}_{n,c,g,y} \leq \text{resource_remaining}_{n,c,g,y} \cdot \Big( & \text{resource_volume}_{n,c,g} \\ & - \sum_{y' < y} \text{duration_period}_{y'} \cdot \text{EXT}_{n,c,g,y'} \Big)\end{split}\]
Equation RESOURCE_HORIZON
This constraint ensures that total resource extraction over the model horizon does not exceed the available resources.
\[\sum_{y} \text{duration_period}_{y} \cdot \text{EXT}_{n,c,g,y} \leq \text{resource_volume}_{n,c,g}\]
Constraints on commodities and stocks
Auxiliary COMMODITY_BALANCE
For the commodity balance constraints below, we introduce an auxiliary variable called \(\text{COMMODITY_BALANCE}\). This is implemented
as a GAMS $macro
function.
\[\begin{split}\sum_{\substack{n^L,t,m,h^A \\ y^V \leq y}} \text{output}_{n^L,t,y^V,y,m,n,c,l,h^A,h} \cdot \text{duration_time_rel}_{h,h^A} \cdot \text{ACT}_{n^L,t,y^V,y,m,h^A} & \\ - \sum_{\substack{n^L,t,m,h^A \\ y^V \leq y}} \text{input}_{n^L,t,y^V,y,m,n,c,l,h^A,h} \cdot \text{duration_time_rel}_{h,h^A} \cdot \text{ACT}_{n^L,t,m,y,h^A} & \\ + \ \text{STOCK_CHG}_{n,c,l,y,h} + \ \sum_s \Big( \text{land_output}_{n,s,y,c,l,h} - \text{land_input}_{n,s,y,c,l,h} \Big) \cdot & \text{LAND}_{n,s,y} \\[4pt] - \ \text{demand_fixed}_{n,c,l,y,h} = \text{COMMODITY_BALANCE}_{n,c,l,y,h} \quad \forall \ l \notin (L^{\text{RES}}, & L^{\text{REN}}, L^{\text{STOR}} \subseteq L)\end{split}\]
The commodity balance constraint at the resource level is included in the Equation RESOURCE_CONSTRAINT, while at the renewable level, it is included in the Equation RENEWABLES_EQUIVALENCE, and at the storage level, it is included in the Equation STORAGE_BALANCE.
Equation COMMODITY_BALANCE_GT
This constraint ensures that supply is greater or equal than demand for every commodity-level combination.
\[\text{COMMODITY_BALANCE}_{n,c,l,y,h} \geq 0\]
Equation COMMODITY_BALANCE_LT
This constraint ensures that the supply is smaller than or equal to the demand for all commodity-level combinations given in the \(\text{balance_equality}_{c,l}\). In combination with the constraint above, it ensures that supply is (exactly) equal to demand.
\[\text{COMMODITY_BALANCE}_{n,c,l,y,h} \leq 0\]
Equation STOCKS_BALANCE
This constraint ensures the inter-temporal balance of commodity stocks. The parameter \(\text{commodity_stocks}_{n,c,l}\) can be used to model exogenous additions to the stock
\[\begin{split}\text{STOCK}_{n,c,l,y} + \text{commodity_stock}_{n,c,l,y} = \text{duration_period}_{y} \cdot & \sum_{h} \text{STOCK_CHG}_{n,c,l,y,h} \\ & + \text{STOCK}_{n,c,l,y+1}\end{split}\]
Technology section
Technical and engineering constraints
The first set of constraints concern technologies that have explicit investment decisions and where installed/maintained capacity is relevant for operational decisions. The set where \(T^{\text{INV}} \subseteq T\) is the set of all these technologies.
Equation CAPACITY_CONSTRAINT
This constraint ensures that the actual activity of a technology at a node cannot exceed available (maintained) capacity summed over all vintages, including the technology capacity factor \(\text{capacity_factor}_{n,t,y,t}\).
\[\sum_{m} \text{ACT}_{n,t,y^V,y,m,h} \leq \text{duration_time}_{h} \cdot \text{capacity_factor}_{n,t,y^V,y,h} \cdot \text{CAP}_{n,t,y^V,y} \quad \forall \ t \ \in \ T^{\text{INV}}\]
Equation CAPACITY_MAINTENANCE_HIST
The following three constraints implement technology capacity maintenance over time to allow early retirment. The optimization problem determines the optimal timing of retirement, when fixed operation-and-maintenance costs exceed the benefit in the objective function.
The first constraint ensures that historical capacity (built prior to the model horizon) is available as installed capacity in the first model period.
\[\begin{split}\text{CAP}_{n,t,y^V,\text{'first_period'}} & \leq \text{remaining_capacity}_{n,t,y^V,\text{'first_period'}} \cdot \text{duration_period}_{y^V} \cdot \text{historical_new_capacity}_{n,t,y^V} \\ & \text{if } y^V < \text{'first_period'} \text{ and } |y| - |y^V| < \text{technical_lifetime}_{n,t,y^V} \quad \forall \ t \in T^{\text{INV}}\end{split}\]
Equation CAPACITY_MAINTENANCE_NEW
The second constraint ensures that capacity is fully maintained throughout the model period in which it was constructed (no early retirement in the period of construction).
\[\text{CAP}_{n,t,y^V,y^V} = \text{remaining_capacity}_{n,t,y^V,y^V} \cdot \text{duration_period}_{y^V} \cdot \text{CAP_NEW}_{n,t,y^V} \quad \forall \ t \in T^{\text{INV}}\]
The current formulation does not account for construction time in the constraints, but only adds a mark-up to the investment costs in the objective function.
Equation CAPACITY_MAINTENANCE
The third constraint implements the dynamics of capacity maintenance throughout the model horizon. Installed capacity can be maintained over time until decommissioning, which is irreversible.
\[\begin{split}\text{CAP}_{n,t,y^V,y} & \leq \text{remaining_capacity}_{n,t,y^V,y} \cdot \text{CAP}_{n,t,y^V,y-1} \\ \quad & \text{if } y > y^V \text{ and } y^V > \text{'first_period'} \text{ and } |y| - |y^V| < \text{technical_lifetime}_{n,t,y^V} \quad \forall \ t \in T^{\text{INV}}\end{split}\]
Equation OPERATION_CONSTRAINT
This constraint provides an upper bound on the total operation of installed capacity over a year. It can be used to represent reuqired scheduled unavailability of installed capacity.
\[\sum_{m,h} \text{ACT}_{n,t,y^V,y,m,h} \leq \text{operation_factor}_{n,t,y^V,y} \cdot \text{capacity_factor}_{n,t,y^V,y,m,\text{'year'}} \cdot \text{CAP}_{n,t,y^V,y} \quad \forall \ t \in T^{\text{INV}}\]
This constraint is only active if \(\text{operation_factor}_{n,t,y^V,y} < 1\).
Equation MIN_UTILIZATION_CONSTRAINT
This constraint provides a lower bound on the total utilization of installed capacity over a year.
\[\sum_{m,h} \text{ACT}_{n,t,y^V,y,m,h} \geq \text{min_utilization_factor}_{n,t,y^V,y} \cdot \text{CAP}_{n,t,y^V,y} \quad \forall \ t \in T^{\text{INV}}\]
This constraint is only active if \(\text{min_utilization_factor}_{n,t,y^V,y}\) is defined.
Constraints representing renewable integration
Equation RENEWABLES_EQUIVALENCE
This constraint defines the auxiliary variables \(\text{REN}\) to be equal to the output of renewable technologies (summed over grades).
\[\begin{split}\sum_{g} \text{REN}_{n,t,c,g,y,h} \leq \sum_{\substack{n,t,m,l,h,h^{\text{OD}} \\ y^V \leq y \\ \ l \in L^{\text{REN}} \subseteq L }} \text{input}_{n^L,t,y^V,y,m,n,c,l,h,h^{\text{OD}}} \cdot \text{ACT}_{n^L,t,m,y,h}\end{split}\]
The set \(L^{\text{REN}} \subseteq L\) denotes all levels for which the detailed representation of renewables applies.
Equation RENEWABLES_POTENTIAL_CONSTRAINT
This constraint sets the potential potential by grade as the upper bound for the auxiliary variable \(REN\).
\[\begin{split}\sum_{\substack{t,h \\ \ t \in T^{R} \subseteq t }} \text{REN}_{n,t,c,g,y,h} \leq \sum_{\substack{l \\ l \in L^{R} \subseteq L }} \text{renewable_potential}_{n,c,g,l,y}\end{split}\]
Equation RENEWABLES_CAPACITY_REQUIREMENT
This constraint connects the capacity factor of a renewable grade to the installed capacity of a technology. It sets the lower limit for the capacity of a renewable technology to the summed activity over all grades (REN) devided by the capactiy factor of this grade. It represents the fact that different renewable grades require different installed capacities to provide their full potential.
\[\begin{split}\sum_{y^V, h} & \text{CAP}_{n,t,y^V,y} \cdot \text{operation_factor}_{n,t,y^V,y} \cdot \text{capacity_factor}_{n,t,y^V,y,h} \\ & \quad \geq \sum_{g,h,l} \frac{1}{\text{renewable_capacity_factor}_{n,c,g,l,y}} \cdot \text{REN}_{n,t,c,g,y,h}\end{split}\]
This constraint is only active if \(\text{renewable_capacity_factor}_{n,c,g,l,y}\) is defined.
Constraints for addon technologies
Equation ADDON_ACTIVITY_UP
This constraint provides an upper bound on the activity of an addon technology that can only be operated jointly with a parent technology (e.g., abatement option, SO2 scrubber, power plant cooling technology).
\[\begin{split}\sum_{\substack{t^a, y^V \leq y}} \text{ACT}_{n,t^a,y^V,y,m,h} \leq \sum_{\substack{t, y^V \leq y}} & \text{addon_up}_{n,t,y,m,h,\widehat{t^a}} \cdot \text{addon_conversion}_{n,t,y^V,y,m,h,\widehat{t^a}} \\ & \cdot \text{ACT}_{n,t,y^V,y,m,h} \quad \forall \ t^a \in T^{A}\end{split}\]
Equation ADDON_ACTIVITY_LO
This constraint provides a lower bound on the activity of an addon technology that has to be operated jointly with a parent technology (e.g., power plant cooling technology). The parameter addon_lo allows to define a minimum level of operation of addon technologies relative to the activity of the parent technology. If addon_lo = 1, this means that it is mandatory to operate the addon technology at the same level as the parent technology (i.e., full mitigation).
\[\begin{split}\sum_{\substack{t^a, y^V \leq y}} \text{ACT}_{n,t^a,y^V,y,m,h} \geq \sum_{\substack{t, y^V \leq y}} & \text{addon_lo}_{n,t,y,m,h,\widehat{t^a}} \cdot \text{addon_conversion}_{n,t,y^V,y,m,h,\widehat{t^a}} \\ & \cdot \text{ACT}_{n,t,y^V,y,m,h} \quad \forall \ t^a \in T^{A}\end{split}\]
System reliability and flexibility requirements
This section followi allows to include system-wide reliability and flexility considerations. The current formulation is based on Sullivan et al., 2013 [11].
Aggregate use of a commodity
The system reliability and flexibility constraints are implemented using an auxiliary variable representing the total use (i.e., input of each commodity per level).
Equation COMMODITY_USE_LEVEL
This constraint defines the auxiliary variable \(\text{COMMODITY_USE}_{n,c,l,y}\), which is used to define the rating bins and the peak-load that needs to be offset with firm (dispatchable) capacity.
\[\begin{split}\text{COMMODITY_USE}_{n,c,l,y} = & \sum_{n^L,t,y^V,m,h} \text{input}_{n^L,t,y^V,y,m,n,c,l,h,h} \\ & \quad \cdot \text{duration_time_rel}_{h,h} \cdot \text{ACT}_{n^L,t,y^V,y,m,h}\end{split}\]
This constraint and the auxiliary variable is only active if \(\text{peak_load_factor}_{n,c,l,y,h}\) or \(\text{flexibility_factor}_{n,t,y^V,y,m,c,l,h,r}\) is defined.
Auxilary variables for technology activity by “rating bins”
The capacity and activity of certain (usually non-dispatchable) technologies can be assumed to only partially contribute to the system reliability and flexibility requirements.
Equation ACTIVITY_RATING_BIN
The auxiliary variable for rating-specific activity of each technology cannot exceed the share of the rating bin in relation to the total commodity use.
Reliability of installed capacity
The “firm capacity” that a technology can contribute to system reliability depends on its dispatch characteristics. For dispatchable technologies, the total installed capacity counts toward the firm capacity constraint. This is active if the parameter is defined over \(\text{reliability_factor}_{n,t,y,c,l,h,\text{'firm'}}\). For non-dispatchable technologies, or those that do not have explicit investment decisions, the contribution to system reliability is calculated by using the auxiliary variable \(\text{ACT_RATING}_{n,t,y^V,y,c,l,h,q}\) as a proxy, with the \(\text{reliability_factor}_{n,t,y,c,l,h,q}\) defined per rating bin \(q\).
Equation FIRM_CAPACITY_PROVISION
Technologies where the reliability factor is defined with the rating firm have an auxiliary variable \(\text{CAP_FIRM}_{n,t,c,l,y}\), defined in terms of output.
\[\begin{split}\text{CAP_FIRM}_{n,t,c,l,y} = \sum_{y^V \leq y} & \text{output}_{n^L,t,y^V,y,m,n,c,l,h^A,h} \cdot \text{duration_time}_h \\ & \quad \cdot \text{capacity_factor}_{n,t,y^V,y,h} \cdot \text{CAP}_{n,t,y^Y,y} \quad \forall \ t \in T^{\text{INV}}\end{split}\]
Equation SYSTEM_RELIABILITY_CONSTRAINT
This constraint ensures that there is sufficient firm (dispatchable) capacity in each period. The formulation is based on Sullivan et al., 2013 [11].
\[\begin{split}\sum_{t, q \substack{t \in T^{\text{INV}} \\ y^V \leq y} } & \text{reliability_factor}_{n,t,y,c,l,h,\text{'firm'}} \cdot \text{CAP_FIRM}_{n,t,c,l,y} \\ + \sum_{t,q,y^V \leq y} & \text{reliability_factor}_{n,t,y,c,l,h,q} \cdot \text{ACT_RATING}_{n,t,y^V,y,c,l,h,q} \\ & \quad \geq \text{peak_load_factor}_{n,c,l,y,h} \cdot \text{COMMODITY_USE}_{n,c,l,y}\end{split}\]
This constraint is only active if \(\text{peak_load_factor}_{n,c,l,y,h}\) is defined.
Equation SYSTEM_FLEXIBILITY_CONSTRAINT
This constraint ensures that, in each sub-annual time slice, there is a sufficient contribution from flexible technologies to ensure smooth system operation.
\[\begin{split}\sum_{\substack{n^L,t,m,h^A \\ y^V \leq y}} & \text{flexibility_factor}_{n^L,t,y^V,y,m,c,l,h,\text{'unrated'}} \\ & \quad \cdot ( \text{output}_{n^L,t,y^V,y,m,n,c,l,h^A,h} + \text{input}_{n^L,t,y^V,y,m,n,c,l,h^A,h} ) \\ & \quad \cdot \text{duration_time_rel}_{h,h^A} \cdot \text{ACT}_{n,t,y^V,y,m,h} \\ + \sum_{\substack{n^L,t,m,h^A \\ y^V \leq y}} & \text{flexibility_factor}_{n^L,t,y^V,y,m,c,l,h,1} \\ & \quad \cdot ( \text{output}_{n^L,t,y^V,y,m,n,c,l,h^A,h} + \text{input}_{n^L,t,y^V,y,m,n,c,l,h^A,h} ) \\ & \quad \cdot \text{duration_time_rel}_{h,h^A} \cdot \text{ACT_RATING}_{n,t,y^V,y,c,l,h,q} \geq 0\end{split}\]
Bounds on capacity and activity
Equation NEW_CAPACITY_BOUND_UP
This constraint provides upper bounds on new capacity installation.
\[\text{CAP_NEW}_{n,t,y} \leq \text{bound_new_capacity_up}_{n,t,y} \quad \forall \ t \ \in \ T^{\text{INV}}\]
Equation NEW_CAPACITY_BOUND_LO
This constraint provides lower bounds on new capacity installation.
\[\text{CAP_NEW}_{n,t,y} \geq \text{bound_new_capacity_lo}_{n,t,y} \quad \forall \ t \ \in \ T^{\text{INV}}\]
Equation TOTAL_CAPACITY_BOUND_UP
This constraint gives upper bounds on the total installed capacity of a technology in a specific year of operation summed over all vintages.
\[\sum_{y^V \leq y} \text{CAP}_{n,t,y,y^V} \leq \text{bound_total_capacity_up}_{n,t,y} \quad \forall \ t \ \in \ T^{\text{INV}}\]
Equation TOTAL_CAPACITY_BOUND_LO
This constraint gives lower bounds on the total installed capacity of a technology.
\[\sum_{y^V \leq y} \text{CAP}_{n,t,y,y^V} \geq \text{bound_total_capacity_lo}_{n,t,y} \quad \forall \ t \ \in \ T^{\text{INV}}\]
Equation ACTIVITY_BOUND_UP
This constraint provides upper bounds by mode of a technology activity, summed over all vintages.
\[\sum_{y^V \leq y} \text{ACT}_{n,t,y^V,y,m,h} \leq \text{bound_activity_up}_{n,t,m,y,h}\]
Equation ACTIVITY_BOUND_ALL_MODES_UP
This constraint provides upper bounds of a technology activity across all modes and vintages.
\[\sum_{y^V \leq y, m} \text{ACT}_{n,t,y^V,y,m,h} \leq \text{bound_activity_up}_{n,t,y,'all',h}\]
Equation ACTIVITY_BOUND_LO
This constraint provides lower bounds by mode of a technology activity, summed over all vintages.
\[\sum_{y^V \leq y} \text{ACT}_{n,t,y^V,y,m,h} \geq \text{bound_activity_lo}_{n,t,y,m,h}\]
We assume that \(\text{bound_activity_lo}_{n,t,y,m,h} = 0\) unless explicitly stated otherwise.
Equation ACTIVITY_BOUND_ALL_MODES_LO
This constraint provides lower bounds of a technology activity across all modes and vintages.
\[\sum_{y^V \leq y, m} \text{ACT}_{n,t,y^V,y,m,h} \geq \text{bound_activity_lo}_{n,t,y,'all',h}\]
We assume that \(\text{bound_activity_lo}_{n,t,y,'all',h} = 0\) unless explicitly stated otherwise.
Emission section
Auxiliary variable for aggregate emissions
Equation EMISSION_EQUIVALENCE
This constraint simplifies the notation of emissions aggregated over different technology types and the land-use model emulator. The formulation includes emissions from all sub-nodes \(n^L\) of \(n\).
\[\begin{split}\text{EMISS}_{n,e,\widehat{t},y} = \sum_{n^L \in N(n)} \Bigg( \sum_{t \in T(\widehat{t}),y^V \leq y,m,h } \text{emission_factor}_{n^L,t,y^V,y,m,e} \cdot \text{ACT}_{n^L,t,y^V,y,m,h} \\ + \sum_{s} \ \text{land_emission}_{n^L,s,y,e} \cdot \text{LAND}_{n^L,s,y} \text{ if } \widehat{t} \in \widehat{T}^{LAND} \Bigg)\end{split}\]
Bound on emissions
Equation EMISSION_CONSTRAINT
This constraint enforces upper bounds on emissions (by emission type). For all bounds that include multiple periods, the parameter \(\text{bound_emission}_{n,\widehat{e},\widehat{t},\widehat{y}}\) is scaled to represent average annual emissions over all years included in the year-set \(\widehat{y}\).
The formulation includes historical emissions and allows to model constraints ranging over both the model horizon and historical periods.
\[\begin{split}\frac{ \sum_{y' \in Y(\widehat{y}), e \in E(\widehat{e})} \begin{array}{l} \text{duration_period}_{y'} \cdot \text{emission_scaling}_{\widehat{e},e} \cdot \\ \Big( \text{EMISS}_{n,e,\widehat{t},y'} + \sum_{m} \text{historical_emission}_{n,e,\widehat{t},y'} \Big) \end{array} } { \sum_{y' \in Y(\widehat{y})} \text{duration_period}_{y'} } \leq \text{bound_emission}_{n,\widehat{e},\widehat{t},\widehat{y}}\end{split}\]
Land-use model emulator section
Bounds on total land use
Equation LAND_CONSTRAINT
This constraint enforces a meaningful result of the land-use model emulator, in particular a bound on the total land used in MESSAGEix. The linear combination of land scenarios must be equal to 1.
\[\sum_{s \in S} \text{LAND}_{n,s,y} = 1\]
Dynamic constraints on land use
These constraints enforces upper and lower bounds on the change rate per land scenario.
Equation DYNAMIC_LAND_SCEN_CONSTRAINT_UP
\[\begin{split}\text{LAND}_{n,s,y} \leq & \text{initial_land_scen_up}_{n,s,y} \cdot \frac{ \Big( 1 + \text{growth_land_scen_up}_{n,s,y} \Big)^{|y|} - 1 } { \text{growth_land_scen_up}_{n,s,y} } \\ & + \big( \text{LAND}_{n,s,y-1} + \text{historical_land}_{n,s,y-1} \big) \cdot \Big( 1 + \text{growth_land_scen_up}_{n,s,y} \Big)^{|y|}\end{split}\]
Equation DYNAMIC_LAND_SCEN_CONSTRAINT_LO
\[\begin{split}\text{LAND}_{n,s,y} \geq & - \text{initial_land_scen_lo}_{n,s,y} \cdot \frac{ \Big( 1 + \text{growth_land_scen_lo}_{n,s,y} \Big)^{|y|} - 1 } { \text{growth_land_scen_lo}_{n,s,y} } \\ & + \big( \text{LAND}_{n,s,y-1} + \text{historical_land}_{n,s,y-1} \big) \cdot \Big( 1 + \text{growth_land_scen_lo}_{n,s,y} \Big)^{|y|}\end{split}\]
These constraints enforces upper and lower bounds on the change rate per land type determined as a linear combination of land use scenarios.
Equation DYNAMIC_LAND_TYPE_CONSTRAINT_UP
\[\begin{split}\sum_{s \in S} \text{land_use}_{n,s,y,u} &\cdot \text{LAND}_{n,s,y} \leq \text{initial_land_up}_{n,y,u} \cdot \frac{ \Big( 1 + \text{growth_land_up}_{n,y,u} \Big)^{|y|} - 1 } { \text{growth_land_up}_{n,y,u} } \\ & + \Big( \sum_{s \in S} \big( \text{land_use}_{n,s,y-1,u} + \text{dynamic_land_up}_{n,s,y-1,u} \big) \\ & \quad \quad \cdot \big( \text{LAND}_{n,s,y-1} + \text{historical_land}_{n,s,y-1} \big) \Big) \\ & \quad \cdot \Big( 1 + \text{growth_land_up}_{n,y,u} \Big)^{|y|}\end{split}\]
Equation DYNAMIC_LAND_TYPE_CONSTRAINT_LO
\[\begin{split}\sum_{s \in S} \text{land_use}_{n,s,y,u} &\cdot \text{LAND}_{n,s,y} \geq - \text{initial_land_lo}_{n,y,u} \cdot \frac{ \Big( 1 + \text{growth_land_lo}_{n,y,u} \Big)^{|y|} - 1 } { \text{growth_land_lo}_{n,y,u} } \\ & + \Big( \sum_{s \in S} \big( \text{land_use}_{n,s,y-1,u} + \text{dynamic_land_lo}_{n,s,y-1,u} \big) \\ & \quad \quad \cdot \big( \text{LAND}_{n,s,y-1} + \text{historical_land}_{n,s,y-1} \big) \Big) \\ & \quad \cdot \Big( 1 + \text{growth_land_lo}_{n,y,u} \Big)^{|y|}\end{split}\]
Section of generic relations (linear constraints)
This feature is intended for development and testing only - all new features should be implemented as specific new mathematical formulations and associated sets & parameters!
Auxiliary variable for left-hand side
Equation RELATION_EQUIVALENCE
\[\begin{split}\text{REL}_{r,n,y} = \sum_{t} \Bigg( & \ \text{relation_new_capacity}_{r,n,y,t} \cdot \text{CAP_NEW}_{n,t,y} \\[4 pt] & + \text{relation_total_capacity}_{r,n,y,t} \cdot \sum_{y^V \leq y} \ \text{CAP}_{n,t,y^V,y} \\ & + \sum_{n^L,y',m,h} \ \text{relation_activity}_{r,n,y,n^L,t,y',m} \\ & \quad \quad \cdot \Big( \sum_{y^V \leq y'} \text{ACT}_{n^L,t,y^V,y',m,h} + \text{historical_activity}_{n^L,t,y',m,h} \Big) \Bigg)\end{split}\]
The parameter \(\text{historical_new_capacity}_{r,n,y}\) is not included here, because relations can only be active in periods included in the model horizon and there is no “writing” of capacity relation factors across periods.
Upper and lower bounds on user-defined relations
Equation RELATION_CONSTRAINT_UP
\[\text{REL}_{r,n,y} \leq \text{relation_upper}_{r,n,y}\]
Equation RELATION_CONSTRAINT_LO
\[\text{REL}_{r,n,y} \geq \text{relation_lower}_{r,n,y}\]
Storage section
MESSAGEix offers a set of equations to represent a wide range of storage solutions flexibly. Storage solutions are modeled as “technologies” that can be used to store a “commodity” (e.g., water, heat, electricity, etc.) and shift it over sub-annual time slices within one model period. The storage solution presented here has three distinct parts: (i) Charger: a technology for charging a commodity to the storage container, for example, a pump in a pumped hydropower storage (PHS) plant. (ii) Discharger: a technology to convert the stored commodity to the output commodity, e.g., a turbine in PHS. (iii) Storage container: a device for storing a commodity over time, such as a water reservoir in PHS. If desired, the user can combine charger and discharger parts into one technology, using two different “modes” of operation for that technology like turbo-machinery in PHS. This way the capacity related information, like investment cost, lifetime, capacity factor, etc., will be defined only for one technology (i.e., charger-discharger), as opposed to modeling these two parts separately.
Storage equations
The content of storage device depends on three factors: charge or discharge in one time slice (represented by Equation STORAGE_CHANGE), linked to the state of charge in the previous time slice and storage losses between these two consecutive time slices (represented by Equation STORAGE_BALANCE). Moreover, the storage device can be optionally filled with an initial value as percentage of its capacity (see more details under Equation STORAGE_BALANCE_INIT). Another option is to link a commodity for maintaining the operation of storage device over time (see Equation STORAGE_INPUT).
Equation STORAGE_CHANGE
This equation shows the change in the content of the storage container in each sub-annual time slice. This change is based on the activity of charger and discharger technologies connected to that storage container. The notation \(S^{\text{storage}}\) represents the mapping set map_tec_storage denoting charger-discharger technologies connected to a specific storage container in a specific node and storage level. Where:
\(t^{C}\) is a charging technology and \(t^{D}\) is the corresponding discharger.
\(h-1\) is the time slice prior to \(h\).
\(l^{T}\) is lvl_temporal, i.e., the temporal level at which storage is operating
\(m^{S}\) is mode of operation for storage container technology
\[\begin{split}\text{STORAGE_CHARGE}_{n,t,m^s,l,c,y,h} = \sum_{\substack{n^L,m,h-1 \\ y^V \leq y, (n,t^C,t,l,y) \sim S^{\text{storage}}}} \text{output}_{n^L,t^C,y^V,y,m,n,c,l,h-1,h} \cdot & \text{ACT}_{n^L,t^C,y^V,y,m,h-1} \\ - \sum_{\substack{n^L,m,c,h-1 \\ y^V \leq y, (n,t^D,t,l,y) \sim S^{\text{storage}}}} \text{input}_{n^L,t^D,y^V,y,m,n,c,l,h-1,h} \cdot \text{ACT}_{n^L,t^D,y^V,y,m,h-1} \quad \forall \ t \in T^{\text{STOR}}, & \forall \ l \in L^{\text{STOR}}\end{split}\]
Equation STORAGE_BALANCE
This equation ensures the commodity balance of storage technologies, where the commodity is shifted between sub-annual time slices within a model period. If the state of charge of storage is set exogenously in one time slice through \(\storageinitial_{ntlcyh}\), the content from the previous time slice is not carried over to this time slice.
Equation STORAGE_BALANCE_INIT
Where \(\storageinitial_{ntlyh}\) has a non-zero value, this equation ensures that the amount of commodity stored at the end of a sub-annual time slice is equal or greater than the initialized content of storage in the following time slice. The values in parameter \(\storageinitial_{ntlyh}\) are percentages showing a fraction of installed capacity of storage device (container) that can be filled initially.
Equation STORAGE_INPUT
This equation links \(\STORAGE\) to an input commodity to maintain the activity (\(\ACT\)) of each active storage container technology \(t\). This input commodity is distinct from the stored commodity. For example, in a pumped hydro storage solution, a user can link heating for keeping the stored water warm. In this case, the input commodity is not a function of charge or discharge, but the amount of stored media in the container over time. Therefore, the input commodity specified here is distinct from the one stored and discharged by (dis)charge technologies \(t^C,t^D\) appearing in Equation STORAGE_CHANGE.