Model Formulation#
This document presents the core mathematical relations implemented in epm/base.gms. The notation mirrors the GAMS model to keep the documentation and the code synchronized.
Notation#
Symbol |
Description |
|---|---|
|
Planning years ( |
|
Representative seasons or quarters. |
|
Representative days within each season. |
|
Intra-day time slices (typically hours). |
|
Internal zones; |
|
Countries (used for policy and reporting aggregation). |
|
Generating assets. Subsets |
|
Fuels; |
|
Generator-to-zone mapping. |
|
Internal transmission pairs; symmetric in |
|
Weight of each time slice (hours represented). |
Unless otherwise noted, all summations are over the valid combinations defined by the mapping sets above. Variables beginning with v are decision or reporting variables; parameters beginning with p, f, or s are inputs or switches.
Objective Function and Cost Components#
The system-wide net present value minimization is written as
The yearly country cost balance expands to
Annual cost components are defined as follows:
vYearlyFOMCost: fixed O&M costs for generators, storage, and CSP thermal fields.vYearlyVariableCost = vYearlyFuelCost + vYearlyVOMCost.vYearlySpinningReserveCost: reserve cost bids multiplied by reserve provision and time weights.vYearlyUSECost: value of lost load applied to unserved energy.vYearlySurplus: penalty on over-generation.vYearlyCurtailmentCost: penalty on curtailed VRE output.vYearlyExternalTradeCost = vYearlyImportExternalCost - vYearlyExportExternalCost.vYearlyCarbonCost: carbon price times the emissions implied by dispatched generation.vAnnualizedTransmissionCapex: annualized cost of new transmission builds associated with each zone.vYearlyUnmetReserveCostCountry = vYearlyUnmetPlanningReserveCostCountry + vYearlyUnmetSpinningReserveCostCountry.
Each of these relations is coded in base.gms as equations eYearly*.
Demand and Supply Balance#
The demand balance (eDemSupply) equates demand to the composite supply variable:
vSupply is defined in eDefineSupply:
See Demand and Supply Balance for a detailed discussion.
Capacity Evolution#
Capacity trajectories for each generator are tracked through:
for the first modelled year y₀, when the unit exists and starts before the study horizon.
for existing assets (eCapacityEvolutionExist), and
for new entrants without retirement (eCapacityEvolutionNew). Discrete build/retirement decisions are enforced through
with additional bounds on cumulative builds and commissioning years (eInitialBuildLimit, eBuiltCap, eRetireCap). Storage and CSP thermal capacity follow analogous recursions (eCapStor*, eCapTherm*).
Generator Operating Limits#
Dispatch and Reserve Envelope#
The joint dispatch and reserve constraint (eJointResCap) caps the combined output and spinning reserve at the installed capacity with optional overloading:
Availability and Minimum Output#
Seasonal availability (eMaxCF) limits the energy produced within each quarter:
Optional minimum loading requirements (eMinGen) enforce:
whenever the flag fApplyMinGenerationConstraint is active.
Renewable Generation with Curtailment#
Variable renewable energy (VRE) generators follow exogenous profiles (eVREProfile):
Curtailment is tracked explicitly and priced through vYearlyCurtailmentCost.
Fuel Consumption#
Fuel use is accounted for via eFuel:
Optional limits (eFuelLimit) apply upper bounds by country and fuel.
Ramp Rate Constraints#
When the ramp flag is enabled, inter-hour changes must satisfy:
(eRampUpLimit, eRampDnLimit), with analogous bounds for storage charging (eChargeRampUpLimit, eChargeRampDownLimit).
Reserve Requirements#
Generator-Level Reserve Limits#
Maximum reserve provision is enforced through:
(eSpinningReserveLim), with an additional VRE-specific scaling (eSpinningReserveLimVRE) that multiplies by the hourly profile.
Country and System Requirements#
Spinning reserve requirements are applied at the country and system level:
Planning reserve margins relate capacity credits to peak demand:
Interconnection capacity can contribute to these margins when the relevant flags are enabled.
Transmission and Trade Constraints#
Internal transfers are bounded by existing and expandable capacities:
Symmetry and cumulative build constraints (eCumulativeTransferExpansion, eSymmetricTransferBuild) keep both directions consistent.
External exchange limits include:
Annual import/export share caps (
eMaxAnnualImportShareEnergy,eMaxAnnualExportShareEnergy).Hourly import/export share caps (
eMaxHourlyImportShareEnergy,eMaxHourlyExportShareEnergy).Point-to-point limits (
eExternalImportLimit,eExternalExportLimit).
Trade costs accumulate through vYearlyImportExternalCost and vYearlyExportExternalCost, each linked to pTradePrice.
Storage Operations#
Storage devices (st) follow these relations:
State-of-charge bound (
eSOCUpperBound): $\( vStorage_{st,q,d,t,y} \le vCapStor_{st,y}. \)$Power and energy limits (
eChargeCapacityLimit,eStorageCapMinConstraint): $\( vStorInj_{st,q,d,t,y} \le vCap_{st,y}, \qquad vCapStor_{st,y} \ge vCap_{st,y}. \)$Net charge definition (
eNetChargeBalance): $\( vStorNet_{st,q,d,t,y} = \sum_f vPwrOut_{st,f,q,d,t,y} - vStorInj_{st,q,d,t,y}. \)$Inter-hour SOC dynamics (
eStateOfChargeUpdate,eStateOfChargeInit): $\( vStorage_{st,q,d,t,y} = pStorData_{st,\text{Efficiency}} \cdot vStorInj_{st,q,d,t,y} - \sum_f vPwrOut_{st,f,q,d,t,y} + vStorage_{st,q,d,t-1,y}, \)$ with an initialization equation for the first hour of each day.Reserve contribution (
eSOCSupportsReserve): $\( vSpinningReserve_{st,q,d,t,y} \le vStorage_{st,q,d,t,y}. \)$
PV-coupled batteries (stp) are additionally capped by the paired PV capacity profile (eChargeLimitWithPVProfile).
CSP Extensions#
CSP units (cs) use the same storage state variables with technology-specific limits:
Storage capacity (
eCSPStorageCapacityLimit) and charging bounds (eCSPStorageInjectionCap).Thermal balance (
eCSPStorageInjectionLimit,eCSPThermalOutputLimit) relating the solar field, storage, and turbine output.Energy recursion (
eCSPStorageEnergyBalance,eCSPStorageInitialBalance).Capacity evolution for storage and thermal subsystems (
eCapStor*,eCapacityThermLimit,eCapThermBalance*,eBuildStorNew,eBuildThermNew).
Investment and Policy Constraints#
The model includes optional constraints on:
Total capital expenditure (
ssMaxCapitalInvestmentInvestmentviafApplyCapitalConstraint).Renewable energy share (
eMinGenRE).Fuel limits (
eFuelLimit).Minimum import requirements (
eMinImportRequirement).
These are activated through the corresponding Boolean flags in the configuration files.
Integer Decisions#
Discrete transmission builds (vBuildTransmissionLine) and generator builds/retirements (vBuiltCapVar, vRetireCapVar) are defined as integer variables. Their bounding equations ensure consistency between the integer choice and the continuous capacity variables.
Each equation name referenced above matches the label in base.gms, enabling cross-navigation between documentation, configuration, and the implementation.