Skip to contents

The rows of the LP: the objective, the core equations in full, and every equation of the model by the brick that generates it

PDF, A4, 2 pages · energyRt 0.91.5.9019 (dev) · 2026-12-05
The objective
eqObjective the discounted total cost, minimised
\[\begin{aligned} &\textbf{vObjective}_{} = \\ &\qquad\qquad \sum_{\texttt{r}, \texttt{y}} \textbf{vTotalCost}_{\texttt{r},\texttt{y}} \cdot \textsf{pPeriodLen}_{\texttt{y}} \cdot \textsf{pDiscountFactor}_{\texttt{r},\texttt{y}} \\ &\qquad\qquad \cdot \textsf{pObjWeight}_{\texttt{r},\texttt{y}} \\ \end{aligned}\]
vTotalCost the cost of a region in a milestone year, undiscounted: eqCost adds every cost variable into it
pPeriodLen the years the milestone stands for
pDiscountFactor the discount factor of the year
pObjWeight the weight of the region, 1 by default

Every other equation is a constraint. "Equation" is used here for any row of the model, equality or inequality, as in the eq… names; elsewhere such rows are called constraints. The terms of eqCost are written out on the Variables sheet.

Reading an equation
eqTechAfUp Technology availability factor upper bound for h, r, y, t in meqTechAfUp
\[\begin{aligned} &\textbf{vTechAct}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} \le \\ &\qquad\qquad \textsf{pTechAfUp}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} \cdot \textsf{pTechCap2act}_{\texttt{h}} \cdot \textbf{vTechCap}_{\texttt{h},\texttt{r},\texttt{y}} \\ &\qquad\qquad \cdot \textsf{pTimesliceShare}_{\texttt{t}} \cdot \prod_{\left[\text{weather}\mid \left\{\textnormal{weather,tech}\right\} \in \psi_{1}\right]} \textsf{pTechWeatherAfUp}_{\texttt{w},\texttt{h}} \\ &\qquad\qquad \cdot \sum_{regionp \in \psi_{2}} \sum_{timeslicepp \in \psi_{3}} \textsf{pWeather}_{\texttt{w},\texttt{rp},\texttt{y},\texttt{tpp}} \\ \end{aligned}\]
where \(\psi_{1} := \texttt{mTechWeatherAfUp}_{\texttt{weather},\texttt{tech}}\)
\(\psi_{2} := \texttt{mWeatherRegionAt}_{\texttt{weather},\texttt{region},\texttt{regionp}}\)
\(\psi_{3} := \texttt{mTimesliceParentChildE}_{\texttt{timeslicepp},\texttt{timeslice}}\)
eqTechAfUp the name: eq + the brick + its role; …Lo, …Up, …Fx are bounds
for h, r, y, t one row of the LP per technology, region, year and timeslice
in meqTechAfUp only for the combinations the map lists: without a map row there is no equation
bold a variable (a column of the LP); sans is a parameter, mono a map
ψ a condition on a term or a sum, written separately; the equations below are shown without conditions

Indices: h technology, s storage, c commodity, r region, y year, t timeslice, w weather; a p marks a second index of the same set (yp, tp).

Bricks and rows

The equations are fixed; the data determine which rows exist. A brick adds members to the sets and rows to the maps, and each equation is written only where its map has a row.

technology eqTech… conversion, availability, capacity, costs
storage eqStorage… level, charge and discharge, three capacities
trade eqTrade…, eq…Ir… flows, line capacity, costs
supply, demand eqSup…, eqDemInp availability, reserve, demand met
import, export eq…Row… limits and costs with the rest of the world
commodity eqBal…, eq…Tot the balance and its totals
model eqCost, eqObjective costs summed and discounted

A wind farm without af.lo has no eqTechAfLo row; a model without storage has no eqStorage… equations. Custom constraints (newConstraint()) add equations of their own, per scenario.

Technology
eqTechActSng activity to output: the efficiency for h, c, r, y, t in meqTechActSng
\[\begin{aligned} &\textbf{vTechAct}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} = \\ &\qquad\qquad \textbf{vTechOut}_{\texttt{h},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \div \textsf{pTechCact2cout}_{\texttt{h},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqTechAfUp activity within the available capacity for h, r, y, t in meqTechAfUp
\[\begin{aligned} &\textbf{vTechAct}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} \le \\ &\qquad\qquad \textsf{pTechAfUp}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} \cdot \textsf{pTechCap2act}_{\texttt{h}} \cdot \textbf{vTechCap}_{\texttt{h},\texttt{r},\texttt{y}} \\ &\qquad\qquad \cdot \textsf{pTimesliceShare}_{\texttt{t}} \cdot \prod_{\text{weather}} \textsf{pTechWeatherAfUp}_{\texttt{w},\texttt{h}} \\ &\qquad\qquad \cdot \sum_{\texttt{regionp}} \sum_{\texttt{timeslicepp}} \textsf{pWeather}_{\texttt{w},\texttt{rp},\texttt{y},\texttt{tpp}} \\ \end{aligned}\]
eqTechCap capacity = stock + new capacity still in operation for h, r, y in mTechSpan
\[\begin{aligned} &\textbf{vTechCap}_{\texttt{h},\texttt{r},\texttt{y}} = \\ &\qquad\qquad \textbf{vTechStockCap}_{\texttt{h},\texttt{r},\texttt{y}} + \sum_{\texttt{yearp}} \textsf{pPeriodLen}_{\texttt{yp}} \cdot \textbf{vTechNewCap}_{\texttt{h},\texttt{r},\texttt{yp}} \\ &\qquad\qquad - \sum_{\texttt{yeare}} \textbf{vTechRetiredNewCap}_{\texttt{h},\texttt{r},\texttt{yp},\texttt{ye}} \cdot \textsf{pPeriodLen}_{\texttt{ye}} \\ \end{aligned}\]
eqTechNewCapUp new capacity and its bound: both per year for h, r, y in mTechNewCapUp
\[\begin{aligned} &\textbf{vTechNewCap}_{\texttt{h},\texttt{r},\texttt{y}} \le \textsf{pTechNewCapUp}_{\texttt{h},\texttt{r},\texttt{y}} \\ \end{aligned}\]
eqTechFixom Technology fixed costs for h, r, y in mTechFixom
\[\begin{aligned} &\textbf{vTechFixom}_{\texttt{h},\texttt{r},\texttt{y}} = \textsf{pTechFixom}_{\texttt{h},\texttt{r},\texttt{y}} \cdot \textbf{vTechCap}_{\texttt{h},\texttt{r},\texttt{y}} \\ \end{aligned}\]
eqTechRampUp Technology ramp up for h, r, y, t, tp in mTechRampUp
\[\begin{aligned} &\textbf{vTechAct}_{\texttt{h},\texttt{r},\texttt{y},\texttt{tp}} \cdot \textsf{pTimesliceShare}_{\texttt{t}} \div \textsf{pTimesliceShare}_{\texttt{tp}} \\ &\qquad\qquad - \textbf{vTechAct}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad \le \textsf{pTimesliceShare}_{\texttt{t}} \cdot \textsf{pTimesliceShare}_{\texttt{t}} \\ &\qquad\qquad \cdot \textsf{pTechCap2act}_{\texttt{h}} \div \textsf{pTechRampUp}_{\texttt{h},\texttt{r},\texttt{y},\texttt{t}} \cdot \textbf{vTechCap}_{\texttt{h},\texttt{r},\texttt{y}} \\ \end{aligned}\]
Storage
eqStorageLevel the level, from one timeslice to the next for s, c, r, y, tp, t in meqStorageLevel
\[\begin{aligned} &\textbf{vStorageLevel}_{\texttt{s},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} = \\ &\qquad\qquad \textsf{pStorageStartLevel}_{\texttt{s},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad + \bigl[ \textsf{pStorageNCap2Stg}_{\texttt{s},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \cdot \textbf{vStorageStgNewCap}_{\texttt{s},\texttt{r},\texttt{y}} \bigr] \\ &\qquad\qquad + \sum_{\texttt{commp}} \textsf{pStorageInpEff}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{tp}} \cdot \textbf{vStorageInp}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{tp}} \\ &\qquad\qquad + \sum_{\texttt{commp}, \texttt{regionp}} \textsf{pStorageInpEff}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{tp}} \cdot \textbf{vStorageInp}_{\texttt{s},\texttt{cp},\texttt{rp},\texttt{y},\texttt{tp}} \\ &\qquad\qquad + \bigl[ \textsf{pStorageStgEff}_{\texttt{s},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} ^ {\textsf{pTimesliceShare}_{\texttt{t}}} \bigr] \cdot \textbf{vStorageLevel}_{\texttt{s},\texttt{c},\texttt{r},\texttt{y},\texttt{tp}} \\ &\qquad\qquad - \sum_{\texttt{commp}} \textbf{vStorageOut}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{tp}} \div \textsf{pStorageOutEff}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{tp}} \\ \end{aligned}\]
eqStorageOutLevel Storage output limited by the level for s, c, r, y, t in mvStorageLevel
\[\begin{aligned} &\sum_{\texttt{commp}} \textbf{vStorageOut}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{t}} \div \textsf{pStorageOutEff}_{\texttt{s},\texttt{cp},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad \le \textbf{vStorageLevel}_{\texttt{s},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqStorageDurationUp energy capacity against power capacity for s, r, y in mStorageDurationUp
\[\begin{aligned} &\textbf{vStorageStgCap}_{\texttt{s},\texttt{r},\texttt{y}} \le \textsf{pStorageDurationUp}_{\texttt{s},\texttt{r},\texttt{y}} \cdot \textbf{vStorageOutCap}_{\texttt{s},\texttt{r},\texttt{y}} \\ \end{aligned}\]
eqStorageOutCap discharge capacity; charging and energy capacity alike for s, r, y in mStorageOutCap
\[\begin{aligned} &\textbf{vStorageOutCap}_{\texttt{s},\texttt{r},\texttt{y}} = \\ &\qquad\qquad \textbf{vStorageOutStockCap}_{\texttt{s},\texttt{r},\texttt{y}} \\ &\qquad\qquad + \sum_{\texttt{yearp}} \textsf{pPeriodLen}_{\texttt{yp}} \cdot \textbf{vStorageOutNewCap}_{\texttt{s},\texttt{r},\texttt{yp}} \\ &\qquad\qquad - \sum_{\texttt{yeare}} \textbf{vStorageOutRetiredNewCap}_{\texttt{s},\texttt{r},\texttt{yp},\texttt{ye}} \cdot \textsf{pPeriodLen}_{\texttt{ye}} \\ \end{aligned}\]
Equations in R
library(multimod)
mm <- multimod_from_energyRt(scen)
eq <- mm$equations$eqTechCap
cat(as_latex(eq, model = mm))
write_latex(mm, "model.tex")
scen is an interpolated scenario. as_latex() typesets one equation; write_latex() writes the whole model, with sets, parameters, variables and conditions.
Supply, demand, trade
eqSupAvaUp Supply availability upper bound for u, c, r, y, t in mSupAvaUp
\[\begin{aligned} &\textbf{vSupOut}_{\texttt{u},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \le \\ &\qquad\qquad \textsf{pSupAvaUp}_{\texttt{u},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \cdot \prod_{\text{weather}} \textsf{pSupWeatherUp}_{\texttt{w},\texttt{u}} \\ &\qquad\qquad \cdot \sum_{\texttt{regionp}} \sum_{\texttt{timeslicepp}} \textsf{pWeather}_{\texttt{w},\texttt{rp},\texttt{y},\texttt{tpp}} \\ \end{aligned}\]
eqDemInp demand is met for c, r, y, t in mvDemInp
\[\begin{aligned} &\textbf{vDemInp}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} = \sum_{\text{dem}} \textsf{pDemand}_{\texttt{d},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqTradeIrAfUp flow within the line capacity for z, c, rs, rd, y, t in meqTradeIrAfUp
\[\begin{aligned} &\textbf{vTradeIr}_{\texttt{z},\texttt{c},\texttt{rs},\texttt{rd},\texttt{y},\texttt{t}} \le \\ &\qquad\qquad \textsf{pTradeIrAfUp}_{\texttt{z},\texttt{rs},\texttt{rd},\texttt{y},\texttt{t}} \cdot \textsf{pTradeCap2Act}_{\texttt{z}} \cdot \textbf{vTradeCap}_{\texttt{z},\texttt{y}} \\ &\qquad\qquad \cdot \textsf{pTimesliceShare}_{\texttt{t}} \cdot \prod_{\text{weather}} \textsf{pTradeWeatherAfUp}_{\texttt{w},\texttt{z},\texttt{rs},\texttt{rd}} \\ &\qquad\qquad \cdot \sum_{\texttt{regionp}} \sum_{\texttt{timeslicepp}} \textsf{pWeather}_{\texttt{w},\texttt{rp},\texttt{y},\texttt{tpp}} \\ \end{aligned}\]
eqSupReserve Cumulative supply (use of reserve) for u, c, r in mvSupReserve
\[\begin{aligned} &\textbf{vSupReserve}_{\texttt{u},\texttt{c},\texttt{r}} = \\ &\qquad\qquad \sum_{\texttt{y}, \texttt{t}} \textsf{pPeriodLen}_{\texttt{y}} \cdot \textsf{pTimesliceWeight}_{\texttt{y},\texttt{t}} \cdot \textbf{vSupOut}_{\texttt{u},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqSupCost Supply costs for u, r, y in mvSupCost
\[\begin{aligned} &\textbf{vSupCost}_{\texttt{u},\texttt{r},\texttt{y}} = \\ &\qquad\qquad \sum_{\texttt{c}, \texttt{t}} \textsf{pSupCost}_{\texttt{u},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \cdot \textsf{pTimesliceWeight}_{\texttt{y},\texttt{t}} \\ &\qquad\qquad \cdot \textbf{vSupOut}_{\texttt{u},\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqTradeCapFlow Trade capacity to activity for z, c, y, t in meqTradeCapFlow
\[\begin{aligned} &\textsf{pTimesliceShare}_{\texttt{t}} \cdot \textsf{pTradeCap2Act}_{\texttt{z}} \cdot \textbf{vTradeCap}_{\texttt{z},\texttt{y}} \\ &\qquad\qquad \ge \sum_{\texttt{src}, \texttt{dst}} \textbf{vTradeIr}_{\texttt{z},\texttt{c},\texttt{rs},\texttt{rd},\texttt{y},\texttt{t}} \\ \end{aligned}\]
Balance and emissions
eqBal Commodity balance for c, r, y, t in mvBalance
\[\begin{aligned} &\textbf{vBalance}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} = \textbf{vOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} - \textbf{vInpTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqOutTot everything that supplies a commodity; eqInpTot everything that takes it for c, r, y, t in mvOutTot
\[\begin{aligned} &\textbf{vOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} = \\ &\qquad\qquad \textbf{vDummyImport}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} + \textbf{vSupOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad + \textbf{vEmsFuelTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} + \textbf{vAggOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad + \textbf{vTechOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} + \textbf{vStorageOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad + \textbf{vImportTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} + \textbf{vTradeIrAOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} \\ &\qquad\qquad + \sum_{\texttt{timeslicep}} \textsf{pTimesliceAgg}_{\texttt{y},\texttt{t},\texttt{tp}} \cdot \textbf{vOutTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{tp}} \\ &\qquad\qquad + \sum_{\texttt{regionp}} \textbf{vOutTot}_{\texttt{c},\texttt{rp},\texttt{y},\texttt{t}} \\ \end{aligned}\]
eqBalFx no excess, no deficit (…Lo: excess allowed, …Up: deficit allowed) for c, r, y, t in meqBalFx
\[\begin{aligned} &\textbf{vBalance}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} = 0 \\ \end{aligned}\]
eqEmsFuelTot emissions from fuels used for c, r, y, t in mEmsFuelTot
\[\begin{aligned} &\textbf{vEmsFuelTot}_{\texttt{c},\texttt{r},\texttt{y},\texttt{t}} = \\ &\qquad\qquad \sum_{\texttt{commp}} \textsf{pEmissionFactor}_{\texttt{c},\texttt{cp}} \cdot \sum_{\text{tech}} \textsf{pTechEmisComm}_{\texttt{h},\texttt{cp}} \\ &\qquad\qquad \cdot \sum_{\texttt{timeslicep}} \textsf{pTimesliceAgg}_{\texttt{y},\texttt{t},\texttt{tp}} \cdot \textbf{vTechInp}_{\texttt{h},\texttt{cp},\texttt{r},\texttt{y},\texttt{tp}} \\ \end{aligned}\]
All equations: objective and costs
eqDummyImportCost Dummy import costs (weighted)
eqDummyExportCost Dummy export costs (weighted)
eqTaxCost Levy taxes (weighted)
eqSubsCost Levy subsidy (weighted)
eqCost Total costs (weighted)
eqObjective Objective equation NPV of total costs
eqTotalUserCosts total user-defined costs
Technology
eqTechSng2Sng Input to output
eqTechGrp2Sng Group input to output
eqTechSng2Grp Input to group output
eqTechGrp2Grp Group input to group output
eqTechShareInpLo/Fx/Up Bound on input share
eqTechShareOutLo/Fx/Up Bound on output share
eqTechAInp Auxiliary commodity input
eqTechAOut Auxiliary commodity output
eqTechAfLo/Up/Fx Availability factor bounds
eqTechAfsLo/Fx/Up Availability factor for sum of timeslices bounds
eqTechRampUp Ramp up
eqTechRampDown Ramp down
eqTechActSng Activity to commodity output
eqTechActGrp Activity to group output
eqTechAfcOutLo/Fx/Up Commodity availability factor bounds
eqTechAfcInpLo/Fx/Up Commodity availability factor bounds
eqTechCap Capacity
eqTechCapLo/Fx/Up Capacity bounds
eqTechNewCapLo/Fx/Up Bound on new capacity
eqTechStockCap Recursive balance of the legacy fleet
eqTechStockPhaseOut Legacy capacity leaving on the exogenous schedule
eqTechRetiredNewCap Retirement of new capacity
eqTechRetLo/Fx/Up Bound on economic retirement of capacity
eqTechEac Equivalent Annual Cost (EAC)
eqTechInv Overnight investment costs
eqTechFixom Fixed costs
eqTechVarom Variable costs
eqTechRetCost Costs of retired capacity of technology
eqTechPhaseOut Capacity reaching the end of its operational life
eqTechInpTot Total input
eqTechOutTot Total output
Storage
eqStoragePhaseOut Capacity reaching the end of its operational life
eqStorageStockPhaseOut Exogenous storage capacity leaving on the schedule
eqStorageOutStockCap Recursive balance of the exogenous (legacy) fleet
eqStorageOutRetiredNewCap Retirement of new storage Out capacity
eqStorageOutRetUp/Lo/Fx Bound on retirement of storage Out capacity
eqStorageInpStockCap Recursive balance of the exogenous (legacy) fleet
eqStorageInpRetiredNewCap Retirement of new storage Inp capacity
eqStorageInpRetUp/Lo/Fx Bound on retirement of storage Inp capacity
eqStorageStgStockCap Recursive balance of the exogenous (legacy) fleet
eqStorageStgRetiredNewCap Retirement of new storage Stg capacity
eqStorageStgRetUp/Lo/Fx Bound on retirement of storage Stg capacity
eqStorageRetCost Costs of retired storage capacity
eqStorageLevel Level
eqStorageAfLo/Fx/Up Availability factor
eqStorageTarget Level target (soft floor)
eqStorageOutLevel Output limited by the level
eqStorageAInp Aux-commodity input
eqStorageAOut Aux-commodity output
eqStorageInpUp/Lo/Fx Input constraints
eqStorageOutUp/Lo/Fx Output constraints
eqStorageOutCap Capacity
eqStorageInpCap Charging capacity accounting
eqStorageInpCapLo/Fx/Up Charging capacity bounds
eqStorageInpNewCapLo/Fx/Up New charging capacity bounds
eqStorageInp2outLo/Fx/Up Charge-to-discharge ratio bounds
eqStorageInp2stgLo/Fx/Up Charging C-rate bounds
eqStorageStgCap Energy capacity accounting
eqStorageStgCapLo/Fx/Up Energy capacity bounds
eqStorageStgNewCapLo/Fx/Up New energy capacity bounds
eqStorageDurationLo/Fx/Up Energy-to-power ratio bounds
eqStorageOutCapLo/Fx/Up Capacity bounds
eqStorageOutNewCapLo/Fx/Up New capacity bounds
eqStorageInv Overnight investment costs
eqStorageEac Equivalent annual cost
eqStorageFixom Fixed costs
eqStorageVarom Variable costs
eqStorageShortCost Level shortfall costs
eqStorageInpTot Total input
eqStorageOutTot Total output
Trade, import, export
eqTradeStockCap Recursive balance of the exogenous (legacy) fleet
eqTradePhaseOut Trade capacity reaching the end of its operational life
eqTradeStockPhaseOut Exogenous trade capacity leaving on the schedule
eqTradeRetiredNewCap Retirement of new trade capacity
eqTradeRetUp/Lo/Fx Bound on retirement of trade capacity
eqTradeRetCost Costs of retired trade capacity
eqImportTot Import equation (Ir & ROW)
eqExportTot Export equation (Ir & ROW)
eqTradeFlowUp/Lo/Fx Trade bounds
eqTradeIrAfUp/Lo/Fx Trade bound relative to capacity
eqTradeIrAfsUp/Lo/Fx Trade bound over a timeframe relative to capacity
eqExportRowUp/Lo/Fx Export to the ROW constraints
eqExportRowCum Cumulative export to the ROW
eqExportRowResUp Cumulative export to the ROW upper constraint
eqExportRowCost Export to the ROW costs equation
eqImportRowUp/Lo/Fx Import from the ROW constraints
eqImportRowCum Cumulative import from the ROW
eqImportRowResUp Cumulative import from the ROW upper constraint
eqImportRowCost Import from the ROW costs equation
eqTradeCap Trade capacity
eqTradeCapLo/Fx/Up Trade capacity bounds
eqTradeNewCapLo/Fx/Up Trade new capacity bounds
eqTradeCapFlow Trade capacity to activity
eqTradeInv Trade overnight investment costs
eqTradeEac Trade equivalent annual costs
eqTradeFixom Trade fixed costs
eqImportIrCost Interregional trade import costs
eqExportIrCost Interregional trade export costs
eqTradeIrAInp Trade auxiliary commodity input
eqTradeIrAOut Trade auxiliary commodity output
eqTradeIrAInpTot Trade auxiliary commodity input
eqTradeIrAOutTot Trade auxiliary commodity output
Supply and demand
eqSupAvaUp/Lo/Fx Supply availability bounds
eqSupReserve Cumulative supply (use of reserve)
eqSupReserveUp/Lo/Fx Cumulative supply constraints
eqSupCost Supply costs
eqDemInp Demand equation
Balance and totals
eqAggOutTot Aggregating-commodity output (weighted)
eqEmsFuelTot Total emissions from commodity consumption (weighted)
eqBalUp/Lo/Fx Balance sign: deficit allowed (Up), excess allowed (Lo), neither (Fx)
eqBal Commodity balance
eqOutTot Total commodity output
eqInpTot Total commodity input
eqSupOutTot Supply total output
Pitfalls
  • The typeset equations omit their conditions; maps = "where" or write_latex() shows them.
  • An equation with no row in its map is absent from the LP: the cause is in the data.
  • A folded scenario has fewer indices on some parameters; the equations are the same.
  • Custom constraints and costs are per scenario: see Custom constraints.