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

OBJR

Objective value of the optimization program

EXTn,c,g,yR+

Extraction of non-renewable/exhaustible resources from reserves

STOCKn,c,l,yR+

Quantity in stock (storage) at start of period y

STOCK_CHGn,c,l,y,hR

Input or output quantity into intertemporal commodity stock (storage)

COST_NODALn,yR

System costs at the node level over time

RENn,t,c,g,y,hR+

Activity of renewable technologies per grade

CAP_NEWn,t,yR+

Newly installed capacity (yearly average over period duration)

CAPn,t,yV,yR+

Maintained capacity in year y of vintage yV

CAP_FIRMn,t,c,l,y,qR+

Capacity counting towards firm (dispatchable)

ACTn,t,yV,y,m,hR

Activity of a technology (by vintage, mode, subannual time)

ACT_RATINGn,t,yV,y,c,l,h,qR+

Auxiliary variable for activity attributed to a particular rating bin [1]

CAP_NEW_UPn,t,yR+

Relaxation of upper dynamic constraint on new capacity

CAP_NEW_LOn,t,yR+

Relaxation of lower dynamic constraint on new capacity

ACT_UPn,t,y,hR+

Relaxation of upper dynamic constraint on activity [2]

ACT_LOn,t,y,hR+

Relaxation of lower dynamic constraint on activity [2]

LANDn,s,y[0,1]

Relative share of land-use scenario (for land-use model emulator)

EMISSn,e,t^,yR

Auxiliary variable for aggregate emissions by technology type

RELr,n,yR

Auxiliary variable for left-hand side of relations (linear constraints)

COMMODITY_USEn,c,l,yR

Auxiliary variable for amount of commodity used at specific level

COMMODITY_BALANCEn,c,l,y,hR

Auxiliary variable for right-hand side of Auxiliary COMMODITY_BALANCE

STORAGEn,t,m,l,c,y,hR

State of charge or content of storage at each sub-annual time slice

STORAGE_CHARGEn,t,m,l,c,y,hR

Charging of storage in each sub-annual time slice (negative for discharging)

The index yV 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 STOCKn,c,l,y. In particular, the new capacity variable CAP_NEWn,t,y has to be multiplied by the number of years in a period |y|=duration_periody to determine the available capacity CAPn,t,yV,y in subsequent periods (assuming the newly build capacity is not immediately decommissioned):

CAPn,t,yV,y=CAP_NEWn,t,yduration_periody

CAP_NEWn,t,y is therefore the amount of newly installed capacity in one year and CAPn,t,yV,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

DEMANDn,c,l,y,hR

Demand level (in equilibrium with MACRO integration)

PRICE_COMMODITYn,c,l,y,hR

Commodity price (undiscounted marginals of Equation COMMODITY_BALANCE_GT and Equation COMMODITY_BALANCE_LT)

PRICE_EMISSIONn,e^,t^,yR

Emission price (undiscounted marginals of emission_equivalence)

COST_NODAL_NETn,yR

System costs at the node level net of energy trade revenues/cost

GDPn,yR

Gross domestic product (GDP) in market exchange rates for MACRO reporting

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

OBJ=n,yYMdf_periodyCOST_NODALn,y

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.

COST_NODALn,y=c,g resource_costn,c,g,yEXTn,c,g,y+t (inv_costn,t,yconstruction_time_factorn,t,yend_of_horizon_factorn,t,yCAP_NEWn,t,y+yVy fix_costn,t,yV,yCAPn,t,yV,y+yVym,h var_costn,t,yV,y,m,hACTn,t,yV,y,m,h+(abs_cost_new_capacity_soft_upn,t,y+level_cost_new_capacity_soft_upn,t,y inv_costn,t,y)CAP_NEW_UPn,t,y+(abs_cost_new_capacity_soft_lon,t,y+level_cost_new_capacity_soft_lon,t,y inv_costn,t,y)CAP_NEW_LOn,t,y+m,h (abs_cost_activity_soft_upn,t,y,m,h+level_cost_activity_soft_upn,t,y,m,h levelized_costn,t,y,m,h)ACT_UPn,t,y,h+m,h (abs_cost_activity_soft_lon,t,y,m,h+level_cost_activity_soft_lon,t,y,m,h levelized_costn,t,y,m,h)ACT_LOn,t,y,h)+e^,t^eE(e^)emission_scalinge^,e emission_taxn,e^,t^,yEMISSn,e,t^,y+sland_costn,s,yLANDn,s,y+rrelation_costr,n,yRELr,n,y

Here, nLN(n) are all nodes nL that are sub-nodes of node n. The subset of technologies tT(t^) are all tecs that belong to category t^, and similar notation is used for emissions eE.

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.

gEXTn,c,g,y=nL,t,m,h,hODyVy lLRESLinputnL,t,yV,y,m,n,c,l,h,hODACTnL,t,m,y,h

The set LRESL 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.

EXTn,c,g,ybound_extraction_upn,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.

EXTn,c,g,yresource_remainingn,c,g,y(resource_volumen,c,gy<yduration_periodyEXTn,c,g,y)

Equation RESOURCE_HORIZON

This constraint ensures that total resource extraction over the model horizon does not exceed the available resources.

yduration_periodyEXTn,c,g,yresource_volumen,c,g

Constraints on commodities and stocks

Auxiliary COMMODITY_BALANCE

For the commodity balance constraints below, we introduce an auxiliary variable called COMMODITY_BALANCE. This is implemented as a GAMS $macro function.

nL,t,m,hAyVyoutputnL,t,yV,y,m,n,c,l,hA,hduration_time_relh,hAACTnL,t,yV,y,m,hAnL,t,m,hAyVyinputnL,t,yV,y,m,n,c,l,hA,hduration_time_relh,hAACTnL,t,m,y,hA+ STOCK_CHGn,c,l,y,h+ s(land_outputn,s,y,c,l,hland_inputn,s,y,c,l,h)LANDn,s,y demand_fixedn,c,l,y,h=COMMODITY_BALANCEn,c,l,y,h l(LRES,LREN,LSTORL)

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.

COMMODITY_BALANCEn,c,l,y,h0

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 balance_equalityc,l. In combination with the constraint above, it ensures that supply is (exactly) equal to demand.

COMMODITY_BALANCEn,c,l,y,h0

Equation STOCKS_BALANCE

This constraint ensures the inter-temporal balance of commodity stocks. The parameter commodity_stocksn,c,l can be used to model exogenous additions to the stock

STOCKn,c,l,y+commodity_stockn,c,l,y=duration_periodyhSTOCK_CHGn,c,l,y,h+STOCKn,c,l,y+1

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 TINVT 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 capacity_factorn,t,y,t.

mACTn,t,yV,y,m,hduration_timehcapacity_factorn,t,yV,y,hCAPn,t,yV,y t  TINV

Equation CAPACITY_MAINTENANCE_HIST

The following three constraints implement technology capacity maintenance over time to allow early retirement. 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.

CAPn,t,yV,'first_period'remaining_capacityn,t,yV,'first_period'duration_periodyVhistorical_new_capacityn,t,yVif yV<'first_period' and |y||yV|<technical_lifetimen,t,yV tTINV

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).

CAPn,t,yV,yV=remaining_capacityn,t,yV,yVduration_periodyVCAP_NEWn,t,yV tTINV

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.

CAPn,t,yV,yremaining_capacityn,t,yV,yCAPn,t,yV,y1if y>yV and yV>'first_period' and |y||yV|<technical_lifetimen,t,yV tTINV

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.

m,hACTn,t,yV,y,m,hoperation_factorn,t,yV,ycapacity_factorn,t,yV,y,m,'year'CAPn,t,yV,y tTINV

This constraint is only active if operation_factorn,t,yV,y<1.

Equation MIN_UTILIZATION_CONSTRAINT

This constraint provides a lower bound on the total utilization of installed capacity over a year.

m,hACTn,t,yV,y,m,hmin_utilization_factorn,t,yV,yCAPn,t,yV,y tTINV

This constraint is only active if min_utilization_factorn,t,yV,y is defined.

Constraints representing renewable integration

Equation RENEWABLES_EQUIVALENCE

This constraint defines the auxiliary variables REN to be equal to the output of renewable technologies (summed over grades).

gRENn,t,c,g,y,hn,t,m,l,h,hODyVy lLRENLinputnL,t,yV,y,m,n,c,l,h,hODACTnL,t,m,y,h

The set LRENL 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.

t,h tTRtRENn,t,c,g,y,hllLRLrenewable_potentialn,c,g,l,y

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.

yV,hCAPn,t,yV,yoperation_factorn,t,yV,ycapacity_factorn,t,yV,y,hg,h,l1renewable_capacity_factorn,c,g,l,yRENn,t,c,g,y,h

This constraint is only active if renewable_capacity_factorn,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).

ta,yVyACTn,ta,yV,y,m,ht,yVyaddon_upn,t,y,m,h,ta^addon_conversionn,t,yV,y,m,h,ta^ACTn,t,yV,y,m,h taTA

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).

ta,yVyACTn,ta,yV,y,m,ht,yVyaddon_lon,t,y,m,h,ta^addon_conversionn,t,yV,y,m,h,ta^ACTn,t,yV,y,m,h taTA

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 COMMODITY_USEn,c,l,y, which is used to define the rating bins and the peak-load that needs to be offset with firm (dispatchable) capacity.

COMMODITY_USEn,c,l,y=nL,t,yV,m,hinputnL,t,yV,y,m,n,c,l,h,hduration_time_relh,hACTnL,t,yV,y,m,h

This constraint and the auxiliary variable is only active if peak_load_factorn,c,l,y,h or flexibility_factorn,t,yV,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.

ACT_RATINGn,t,yV,y,c,l,h,qrating_binn,t,y,c,l,h,qCOMMODITY_USEn,c,l,y

Equation ACTIVITY_SHARE_TOTAL

The sum of the auxiliary rating-specific activity variables need to equal the total input and/or output of the technology.

qACT_RATINGn,t,yV,y,c,l,h,q=nL,t,m,hAyVy(inputnL,t,yV,y,m,n,c,l,hA,h+outputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACTnL,t,yV,y,m,hA

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 reliability_factorn,t,y,c,l,h,'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 ACT_RATINGn,t,yV,y,c,l,h,q as a proxy, with the reliability_factorn,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 CAP_FIRMn,t,c,l,y, defined in terms of output.

CAP_FIRMn,t,c,l,y=yVyoutputnL,t,yV,y,m,n,c,l,hA,hduration_timehcapacity_factorn,t,yV,y,hCAPn,t,yY,y tTINV

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].

t,qtTINVyVyreliability_factorn,t,y,c,l,h,'firm'CAP_FIRMn,t,c,l,y+t,q,yVyreliability_factorn,t,y,c,l,h,qACT_RATINGn,t,yV,y,c,l,h,qpeak_load_factorn,c,l,y,hCOMMODITY_USEn,c,l,y

This constraint is only active if peak_load_factorn,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.

nL,t,m,hAyVyflexibility_factornL,t,yV,y,m,c,l,h,'unrated'(outputnL,t,yV,y,m,n,c,l,hA,h+inputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACTn,t,yV,y,m,h+nL,t,m,hAyVyflexibility_factornL,t,yV,y,m,c,l,h,1(outputnL,t,yV,y,m,n,c,l,hA,h+inputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACT_RATINGn,t,yV,y,c,l,h,q0

Bounds on capacity and activity

Equation NEW_CAPACITY_BOUND_UP

This constraint provides upper bounds on new capacity installation.

CAP_NEWn,t,ybound_new_capacity_upn,t,y t  TINV

Equation NEW_CAPACITY_BOUND_LO

This constraint provides lower bounds on new capacity installation.

CAP_NEWn,t,ybound_new_capacity_lon,t,y t  TINV

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.

yVyCAPn,t,y,yVbound_total_capacity_upn,t,y t  TINV

Equation TOTAL_CAPACITY_BOUND_LO

This constraint gives lower bounds on the total installed capacity of a technology.

yVyCAPn,t,y,yVbound_total_capacity_lon,t,y t  TINV

Equation ACTIVITY_BOUND_UP

This constraint provides upper bounds by mode of a technology activity, summed over all vintages.

yVyACTn,t,yV,y,m,hbound_activity_upn,t,m,y,h

Equation ACTIVITY_BOUND_ALL_MODES_UP

This constraint provides upper bounds of a technology activity across all modes and vintages.

yVy,mACTn,t,yV,y,m,hbound_activity_upn,t,y,all,h

Equation ACTIVITY_BOUND_LO

This constraint provides lower bounds by mode of a technology activity, summed over all vintages.

yVyACTn,t,yV,y,m,hbound_activity_lon,t,y,m,h

We assume that bound_activity_lon,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.

yVy,mACTn,t,yV,y,m,hbound_activity_lon,t,y,all,h

We assume that bound_activity_lon,t,y,all,h=0 unless explicitly stated otherwise.

Constraints on shares of technologies and commodities

This section allows to include upper and lower bounds on the shares of modes used by a technology or the shares of commodities produced or consumed by groups of technologies.

Share constraints on activity by mode

Equation SHARES_MODE_UP

This constraint provides upper bounds of the share of the activity of one mode of a technology. For example, it could limit the share of heat that can be produced in a combined heat and electricity power plant.

ACTnL,t,yV,y,m,hAshare_mode_upp,n,t,y,m,hmACTnL,t,yV,y,m,hA

Equation SHARES_MODE_LO

This constraint provides lower bounds of the share of the activity of one mode of a technology.

ACTnL,t,yV,y,m,hAshare_mode_lop,n,t,y,m,hmACTnL,t,yV,y,m,hA

Share constraints on commodities

These constraints allow to set upper and lower bound on the quantity of commodities produced or consumed by a group of technologies relative to the commodities produced or consumed by another group.

The implementation is generic and flexible, so that any combination of commodities, levels, technologies and nodes can be put in relation to any other combination.

The notation Pshare represents the mapping set map_shares_commodity_share denoting all technology types, nodes, commodities and levels to be included in the numerator, and Ptotal is the equivalent mapping set map_shares_commodity_total for the denominator.

Equation SHARE_CONSTRAINT_COMMODITY_UP

nL,t,m,hAyVy,(n,t^,m,c,l)Pshare(outputnL,t,yV,y,m,n,c,l,hA,h+inputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACTnL,t,yV,y,m,hAshare_commodity_upp,n,y,hnL,t,m,hAyVy,(n,t^,m,c,l)Ptotal(outputnL,t,yV,y,m,n,c,l,hA,h+inputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACTnL,t,yV,y,m,hA

This constraint is only active if share_commodity_upp,n,y,h is defined.

Equation SHARE_CONSTRAINT_COMMODITY_LO

nL,t,m,hAyVy,(n,t^,m,c,l)Pshare(outputnL,t,yV,y,m,n,c,l,hA,h+inputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACTnL,t,yV,y,m,hAshare_commodity_lop,n,y,hnL,t,m,hAyVy,(n,t^,m,c,l)Ptotal(outputnL,t,yV,y,m,n,c,l,hA,h+inputnL,t,yV,y,m,n,c,l,hA,h)duration_time_relh,hAACTnL,t,yV,y,m,hA

This constraint is only active if share_commodity_lop,n,y,h is defined.

Dynamic constraints on new capacity and activity

The constraints in this section specify dynamic upper and lower bounds on new capacity and activity. These can be used to model limits on market penetration and/or rates of expansion or phase-out of a technology.

The formulation directly includes the option for ‘soft’ relaxations of dynamic constraints (cf. Keppo and Strubegger, 2010 [5]).

See also the corresponding parameter definitions.

Equation NEW_CAPACITY_CONSTRAINT_UP

The level of new capacity additions cannot be greater than an initial value (compounded over the period duration), annual growth of the existing ‘capital stock’, and a “soft” relaxation of the upper bound.

CAP_NEWn,t,y( initial_new_capacity_upn,t,y(1+growth_new_capacity_upn,t,y)|y|1growth_new_capacity_upn,t,y+(CAP_NEWn,t,y1+historical_new_capacityn,t,y1)(1+growth_new_capacity_upn,t,y)|y|+CAP_NEW_UPn,t,y((1+soft_new_capacity_upn,t,y)|y|1))|y1||y| t  TINV

Here, |y| is the number of years in period y, i.e., duration_periody.

Equation NEW_CAPACITY_SOFT_CONSTRAINT_UP

This constraint ensures that the relaxation of the dynamic constraint on new capacity (investment) does not exceed the level of the investment in the previous period (cf. Keppo and Strubegger, 2010 [5]).

CAP_NEW_UPn,t,yy1CAP_NEWnL,t,y1if y'first_period'+y1historical_new_capacitynL,t,y1if y='first_period' t  TINV

Equation NEW_CAPACITY_CONSTRAINT_LO

This constraint gives dynamic lower bounds on new capacity.

CAP_NEWn,t,y(initial_new_capacity_lon,t,y(1+growth_new_capacity_lon,t,y)|y|growth_new_capacity_lon,t,y+(CAP_NEWn,t,y1+historical_new_capacityn,t,y1)(1+growth_new_capacity_lon,t,y)|y|CAP_NEW_LOn,t,y((1+soft_new_capacity_lon,t,y)|y|1))|y1||y| t  TINV

Equation NEW_CAPACITY_SOFT_CONSTRAINT_LO

This constraint ensures that the relaxation of the dynamic constraint on new capacity does not exceed level of the investment in the previous year.

CAP_NEW_LOn,t,yy1CAP_NEWnL,t,y1if y'first_period'+y1historical_new_capacitynL,t,y1if y='first_period' t  TINV

Equation ACTIVITY_CONSTRAINT_UP

This constraint gives dynamic upper bounds on the market penetration of a technology activity.

yVy,mACTn,t,yV,y,m,h initial_activity_upn,t,y,h(1+growth_activity_upn,t,y,h)|y|1growth_activity_upn,t,y,h+(yVy1,mACTn,t,yV,y1,m,h+mhistorical_activityn,t,y1,m,h)(1+growth_activity_upn,t,y,h)|y|+ACT_UPn,t,y,h((1+soft_activity_upn,t,y,h)|y|1)

Equation ACTIVITY_SOFT_CONSTRAINT_UP

This constraint ensures that the relaxation of the dynamic activity constraint does not exceed the level of the activity in the previous period.

ACT_UPn,t,y,hyVy,m,y1ACTnL,t,yV,y1,m,hif y'first_period'+m,y1historical_activitynL,t,y1,m,hif y='first_period'

Equation ACTIVITY_CONSTRAINT_LO

This constraint gives dynamic lower bounds on the market penetration of a technology activity.

yVy,mACTn,t,yV,y,m,hinitial_activity_lon,t,y,h(1+growth_activity_lon,t,y,h)|y|1growth_activity_lon,t,y,h+(yVy1,mACTn,t,yV,y1,m,h+mhistorical_activityn,t,y1,m,h)(1+growth_activity_lon,t,y,h)|y|ACT_LOn,t,y,h((1+soft_activity_lon,t,y,h)|y|1)

Equation ACTIVITY_SOFT_CONSTRAINT_LO

This constraint ensures that the relaxation of the dynamic activity constraint does not exceed the level of the activity in the previous period.

ACT_LOn,t,y,hyVy,m,y1ACTnL,t,yV,y1,m,hif y'first_period'+m,y1historical_activitynL,t,y1,m,hif y='first_period'

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 nL of n.

EMISSn,e,t^,y=nLN(n)(tT(t^),yVy,m,hemission_factornL,t,yV,y,m,eACTnL,t,yV,y,m,h+s land_emissionnL,s,y,eLANDnL,s,y if t^T^LAND)

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 bound_emissionn,e^,t^,y^ is scaled to represent average annual emissions over all years included in the year-set y^.

The formulation includes historical emissions and allows to model constraints ranging over both the model horizon and historical periods.

yY(y^),eE(e^)duration_periodyemission_scalinge^,e(EMISSn,e,t^,y+mhistorical_emissionn,e,t^,y)yY(y^)duration_periodybound_emissionn,e^,t^,y^

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.

sSLANDn,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

LANDn,s,yinitial_land_scen_upn,s,y(1+growth_land_scen_upn,s,y)|y|1growth_land_scen_upn,s,y+(LANDn,s,y1+historical_landn,s,y1)(1+growth_land_scen_upn,s,y)|y|

Equation DYNAMIC_LAND_SCEN_CONSTRAINT_LO

LANDn,s,yinitial_land_scen_lon,s,y(1+growth_land_scen_lon,s,y)|y|1growth_land_scen_lon,s,y+(LANDn,s,y1+historical_landn,s,y1)(1+growth_land_scen_lon,s,y)|y|

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

sSland_usen,s,y,uLANDn,s,yinitial_land_upn,y,u(1+growth_land_upn,y,u)|y|1growth_land_upn,y,u+(sS(land_usen,s,y1,u+dynamic_land_upn,s,y1,u)(LANDn,s,y1+historical_landn,s,y1))(1+growth_land_upn,y,u)|y|

Equation DYNAMIC_LAND_TYPE_CONSTRAINT_LO

sSland_usen,s,y,uLANDn,s,yinitial_land_lon,y,u(1+growth_land_lon,y,u)|y|1growth_land_lon,y,u+(sS(land_usen,s,y1,u+dynamic_land_lon,s,y1,u)(LANDn,s,y1+historical_landn,s,y1))(1+growth_land_lon,y,u)|y|

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

RELr,n,y=t( relation_new_capacityr,n,y,tCAP_NEWn,t,y+relation_total_capacityr,n,y,tyVy CAPn,t,yV,y+nL,y,m,h relation_activityr,n,y,nL,t,y,m(yVyACTnL,t,yV,y,m,h+historical_activitynL,t,y,m,h))

The parameter historical_new_capacityr,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

RELr,n,yrelation_upperr,n,y

Equation RELATION_CONSTRAINT_LO

RELr,n,yrelation_lowerr,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.

../../_images/storage.png

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 Sstorage 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:

  • tC is a charging technology and tD is the corresponding discharger.

  • h1 is the time slice prior to h.

  • lT is lvl_temporal, i.e., the temporal level at which storage is operating

  • mS is mode of operation for storage container technology

    STORAGE_CHARGEn,t,ms,l,c,y,h=nL,m,h1yVy,(n,tC,t,l,y)SstorageoutputnL,tC,yV,y,m,n,c,l,h1,hACTnL,tC,yV,y,m,h1nL,m,c,h1yVy,(n,tD,t,l,y)SstorageinputnL,tD,yV,y,m,n,c,l,h1,hACTnL,tD,yV,y,m,h1 tTSTOR, lLSTOR

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 storage_initialntlcyh, the content from the previous time slice is not carried over to this time slice.

STORAGEntmlcyh= STORAGE_CHARGEntmlcyh+STORAGEntmlcy(h1)(1storage_self_dischargentmly(h1)) tTSTOR,lLSTOR,storage_initialntmlcyh=0

Equation STORAGE_BALANCE_INIT

Where storage_initialntlyh 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 storage_initialntlyh are percentages showing a fraction of installed capacity of storage device (container) that can be filled initially.

STORAGEntmlcy(h1)storage_initialntmlcyhduration_timehcapacity_factorn,t,yV,y,hCAPn,t,yV,y t  TINV, storage_initialntmlcyh0

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 tC,tD appearing in Equation STORAGE_CHANGE.

STORAGEntmlcyAh= {nLyVhO|K}duration_time_relhhOACTnLtyVyAmhO n,t,l,c,m,yA,h|tTSTORK: textinputnLtyVyAmnOclhhO0