Constraints¶
All constraints are grouped by topic. Each equation name matches the label in base.gms. For notation and variable definitions, see Objective Function and Reference.
[Dispatch mode only] — active when
fDispatchMode=1. [Optional] — activated by a flag inpSettings.csv.
Demand and Supply Balance¶
The demand balance (eDemSupply) equates demand to the composite supply variable:
vSupply decomposes generation, storage, flows, trade, and slack (eDefineSupply):
Capacity Evolution¶
Initial capacity for the first model year, where the installed capacity term applies only to existing generators (eg) commissioned before the horizon (eInitialCapacity):
For subsequent years, existing assets follow (eCapacityEvolutionExist):
New entrants have no retirement (eCapacityEvolutionNew):
Discrete build and retirement decisions are enforced through integer variables (eBuiltCap, eRetireCap):
Total builds for existing-fleet generators commissioned after the model start are capped (eInitialBuildLimit):
Storage and CSP thermal capacity follow analogous recursions (eCapStor*, eCapTherm*).
Generator Operating Limits¶
Dispatch and Reserve Envelope¶
Combined output and spinning reserve cannot exceed installed capacity (eJointResCap):
Seasonal Availability¶
Quarterly energy output is limited by the seasonal availability factor (eMaxCF). Note that pAvailability carries a year index to allow for degradation or scheduled outages:
Minimum Output [Optional — fApplyMinGenShareAllHours]¶
(eMinGen):
Renewable Generation with Curtailment¶
VRE output follows the hourly profile scaled by seasonal availability (eVREProfile). Curtailment is tracked explicitly:
Curtailment is penalised through vYearlyCurtailmentCost in the objective function.
Fuel Consumption¶
(eFuel):
An upper bound on annual fuel consumption by country and fuel applies via eFuelLimit when fApplyFuelConstraint=1.
Generation Phase-out [Optional — fApplyGenerationPhaseout]¶
eMaxGenerationByFuel caps annual generation by zone, technology group, and fuel (in GWh):
Ramp Rate Constraints¶
Standard mode¶
Inter-hour ramp limits apply within each representative day (eRampUpLimit, eRampDnLimit):
Analogous bounds apply to storage charging (eChargeRampUpLimit, eChargeRampDownLimit).
Dispatch mode [Dispatch mode only]¶
In dispatch mode, ramp limits operate over chronological slots \(AT\) using vPwrOutDispatch, linked to vPwrOut via eRampContinuity. Startup and shutdown events provide additional headroom when unit commitment is active (eDispatchRampUpLimit, eDispatchRampDownLimit):
Reserve Requirements¶
Generator reserve limit¶
Maximum spinning reserve provision per generator (eSpinningReserveLim):
For VRE generators the limit is further scaled by the hourly profile (eSpinningReserveLimVRE):
Spinning reserve requirement [Optional]¶
Country level (eSpinningReserveReqCountry, flag fApplyCountrySpinReserveConstraint):
System level (eSpinningReserveReqSystem, flag fApplySystemSpinReserveConstraint):
Planning reserve margin [Optional — fApplyPlanningReserveConstraint]¶
Country level (ePlanningReserveReqCountry). When fCountIntercoForReserves=1, available interconnection capacity contributes to the margin:
where the interconnection term \(IC_{c,y}\) (zero when fCountIntercoForReserves=0) is:
System level (ePlanningReserveReqSystem):
Transmission and Trade¶
Internal transfer capacity (eTransferCapacityLimit):
Expansion symmetry and cumulative build tracking: eCumulativeTransferExpansion, eSymmetricTransferBuild.
External exchange limits [Optional]: annual and hourly import/export share caps (eMaxAnnualImportShareEnergy, eMaxAnnualExportShareEnergy, eMaxHourlyImportShareEnergy, eMaxHourlyExportShareEnergy), point-to-point limits (eExternalImportLimit, eExternalExportLimit), and a minimum import floor (eMinImportRequirement) when pMinImport > 0.
Storage Operations¶
Capacity and power bounds¶
State-of-charge upper bound (eSOCUpperBound):
Power injection and energy-power consistency (eChargeCapacityLimit, eStorageCapMinConstraint):
When a fixed energy-to-power ratio is specified (eStorageFixedDuration):
Net charge balance (eNetChargeBalance):
State-of-charge dynamics¶
Three equations govern SOC evolution depending on time position and run mode.
First hour of a representative day (eStateOfChargeInitRep) — standard mode only, no carry-over from the previous day:
All subsequent hours (eStorageHourTransition):
Day boundary — [Dispatch mode only] (eStorageDayWrap) — links the first hour of each day to the last chronological slot \(AT-1\):
Cycle anchoring — [Dispatch mode only] (eStorageSOCInitDispatch, eStorageSOCFinalDispatch) — the first and last hours of the full chronological cycle are pinned to a prescribed share of capacity:
Reserve contribution¶
Storage can provide spinning reserve up to its current state of charge (eSOCSupportsReserve):
PV-coupled batteries are additionally capped by the paired PV profile (eChargeLimitWithPVProfile).
CSP Extensions¶
CSP plants use dedicated variables for the solar thermal field (vThermalOut, vCapTherm) alongside the standard storage variables.
Charging is limited to what the thermal field produces, scaled by its efficiency (eCSPStorageInjectionLimit):
Thermal output is bounded by field capacity and the solar resource profile (eCSPThermalOutputLimit):
The power balance links thermal output, storage charge/discharge, and turbine dispatch (eCSPPowerBalance):
Storage capacity and charging are also bounded by eCSPStorageCapacityLimit and eCSPStorageInjectionCap. SOC dynamics follow the same recursion as standard storage (eCSPStorageEnergyBalance, eCSPStorageInitialBalance). Capacity evolution for both subsystems uses eCapStor* and eCapTherm*.
Investment and Policy¶
Capital budget [Optional — fApplyCapitalConstraint] (eCapitalConstraint):
Minimum renewable share [Optional] (eMinGenRE): a fraction pMinRE of total annual energy must come from renewable sources.
Fuel availability cap [Optional — fApplyFuelConstraint] (eFuelLimit): annual consumption by country and fuel cannot exceed pMaxFuelLimit.
Minimum import [Optional] (eMinImportRequirement): enforces a lower bound on imports from a given zone when pMinImport > 0.
Discrete investment decisions for transmission (vBuildTransmissionLine) and generators/retirements (vBuiltCapVar, vRetireCapVar) are integer variables bounded by capacity consistency equations.
CO₂ Emissions¶
Zonal emissions are computed from dispatched generation, heat rates, and carbon content (eZonalEmissions):
System total (eTotalEmissions):
Country cap [Optional — fApplyCountryCo2Constraint] (eEmissionsCountry):
System cap [Optional — fApplySystemCo2Constraint] (eTotalEmissionsConstraint):
The backstop slack variables allow the cap to be violated at a penalty cost, which feeds into the objective function via vYearlyCO2BackstopCostCountry and vYearlyCO2BackstopCostSystem.
Unit Commitment [Dispatch mode only]¶
Unit commitment is active when fDispatchMode=1 and fApplyMinGenCommitment=1. Binary variables isOn, isStartup, and isShutdown track generator state at each chronological slot \(AT\).
Transition consistency (eCommitmentConsistency):
eCommitmentInitialization sets the state at the first slot; eCommitmentSingleTransition prevents simultaneous startup and shutdown.
Min/max generation tied to commitment state (eDispatchMinGenPoint, eDispatchMaxGenPoint):
Minimum up/down time [Optional — fApplyMUDT]: eMinUpInitial, eMinUpRolling, eMinDownInitial, eMinDownRolling prevent generators from cycling faster than their physical limits.
Startup costs [Optional — fApplyStartupCost]: eStartupCostConstraint accumulates per-slot startup costs into vYearlyStartupCost, which enters the objective via vYearlyVariableCost.