Mathematical Formulation¶
Here we present the mathematical formulation of the optimization problem solved by the openTEPES model. See also some TEP-related publications:
F. Labora, A. Ramos “Tight and Compact Formulations for Nuclear Power Plant Flexible Operation” TechRxiv. February, 2026. 10.36227/techrxiv.177004916.61674766/v1
E.F. Álvarez, J.C. López, L. Olmos, A. Ramos “An Optimal Expansion Planning of Power Systems Considering Cycle-Based AC Optimal Power Flow” Sustainable Energy, Grids and Networks, May 2024. 10.1016/j.segan.2024.101413
E.F. Álvarez, L. Olmos, A. Ramos, K. Antoniadou-Plytaria, D. Steen, and L.A. Tuan “Values and Impacts of Incorporating Local Flexibility Services in Transmission Expansion Planning” Electric Power Systems Research 212, July 2022. 10.1016/j.epsr.2022.108480
A. Ramos, E. Quispe, S. Lumbreras “OpenTEPES: Open-source Transmission and Generation Expansion Planning” SoftwareX 18: June 2022. 10.1016/j.softx.2022.101070
S. Lumbreras, H. Abdi, A. Ramos, and M. Moradi “Introduction: The Key Role of the Transmission Network” in the book S. Lumbreras, H. Abdi, A. Ramos (eds.) “Transmission Expansion Planning: The Network Challenges of the Energy Transition” Springer, 2020 ISBN 9783030494278 10.1007/978-3-030-49428-5_1
S. Lumbreras, F. Banez-Chicharro, A. Ramos “Optimal Transmission Expansion Planning in Real-Sized Power Systems with High Renewable Penetration” Electric Power Systems Research 49, 76-88, Aug 2017 10.1016/j.epsr.2017.04.020
S. Lumbreras, A. Ramos “The new challenges to transmission expansion planning. Survey of recent practice and literature review” Electric Power Systems Research 134: 19-29, May 2016 10.1016/j.epsr.2015.10.013
Q. Ploussard, L. Olmos and A. Ramos “A search space reduction method for transmission expansion planning using an iterative refinement of the DC Load Flow model” IEEE Transactions on Power Systems 35 (1): 152-162, Jan 2020 10.1109/TPWRS.2019.2930719
Q. Ploussard, L. Olmos and A. Ramos “An efficient network reduction method for transmission expansion planning using multicut problem and Kron” reduction IEEE Transactions on Power Systems 33 (6): 6120-6130, Nov 2018 10.1109/TPWRS.2018.2842301
Q. Ploussard, L. Olmos and A. Ramos “An operational state aggregation technique for transmission expansion planning based on line benefits” IEEE Transactions on Power Systems 32 (4): 2744-2755, Oct 2017 10.1109/TPWRS.2016.2614368
Indices¶
\(p\) |
Period (e.g., year) |
\(\omega\) |
Scenario |
\(n\) |
Load level (e.g., hour) |
\(g\) |
Generator (thermal or hydro unit or energy storage system) |
\(t\) |
Thermal unit |
\(e\) |
Energy Storage System (ESS) |
\(h\) |
Hydropower or pumped-storage hydro plant (associated with a reservoir modeled in water units) |
\(e',e''\) |
Reservoir (natural water inflows in m3/s and volume in hm3) |
\(h \in up(e')\) |
Hydro or pumped-storage hydropower plant \(h\) upstream of reservoir \(e'\) |
\(h \in dw(e')\) |
Hydro or pumped-storage hydropower plant \(h\) downstream of reservoir \(e'\) |
\(e'' \in up(e')\) |
Reservoir \(e''\) upstream of reservoir \(e'\) |
\(i, j\) |
Node |
\(z\) |
Zone. Each node belongs to a zone \(i \in z\) |
\(a\) |
Area. Each zone belongs to an area \(z \in a\) |
\(r\) |
Region. Each area belongs to a region \(a \in r\) |
\(c\) |
Circuit |
\(ijc\) |
Line (initial node, final node, circuit) |
\(cy\) |
Electricity network cycle |
\(CY\) |
Electricity network cycle basis |
\(CLC\) |
AC candidate electricity transmission lines in a certain cycle |
\(EG, CG\) |
Set of existing and candidate generators |
\(EB, CB\) |
Set of existing and candidate fuel heaters |
\(EE, CE\) |
Set of existing and candidate ESS |
\(ER, CR\) |
Set of existing and candidate reservoirs |
\(EL, CL\) |
Set of existing and non-switchable, and candidate and switchable electric transmission lines |
\(EP, CP\) |
Set of existing and candidate pipelines |
Parameters¶
They are written in uppercase letters.
General |
||
\(T\) |
Base period (year) |
year |
\(\nu\) |
Time step. Duration of the load levels (e.g., 1h, 2 h, 3 h) |
|
\(\delta\) |
Annual discount rate |
p.u. |
\(WG^p\) |
Period (year) weight |
p.u. |
\(DF^p\) |
Discount factor for each period (year) |
p.u. |
Electricity demand |
||
\(D^p_{\omega ni}\) |
Electricity demand in each node |
GW |
\(PD_{pa}\) |
Peak demand in each area |
GW |
\(DUR^p_{\omega n}\) |
Duration of each load level |
h |
\(CENS\) |
Cost of energy not served. Value of Lost Load (VoLL) |
€/MWh |
Hydrogen demand |
||
\(DH^p_{\omega ni}\) |
Hydrogen demand in each node |
tH2 |
\(CHNS\) |
Cost of hydrogen not served. The cost of H2 surplus is 0.5 CHNS |
€/tH2 |
Heat demand |
||
\(DHt^p_{\omega ni}\) |
Heat demand in each node |
GW |
\(CHtNS\) |
Cost of heat not served |
€/MWh |
Scenarios |
||
\(P^p_{\omega}\) |
Probability of each scenario in each period |
p.u. |
Operating reserves |
||
\(URA, DRA\) |
Upward and downward reserve activation coefficients |
p.u. |
\(\underline{DtUR}, \overline{DtUR}\) |
Minimum and maximum ratios downward to upward operating reserves |
p.u. |
\(UR^p_{\omega na}, DR^p_{\omega na}\) |
Upward and downward operating reserves for each area |
GW |
Ramp reserves |
||
\(URR^p_{\omega na}, DRR^p_{\omega na}\) |
Upward and downward ramp reserves for each area |
GW/h |
Adequacy electricity system reserve margin |
||
\(RME_{pa}\) |
Minimum adequacy electricity system reserve margin for each period and area |
p.u. |
Adequacy heat system reserve margin |
||
\(RMH_{pa}\) |
Minimum adequacy heat system reserve margin for each period and area |
p.u. |
Maximum CO2 emission |
||
\(EL_{pa}\) |
Maximum CO2 emission for each period, scenario, and area |
MtCO2 |
Minimum RES energy |
||
\(RL_{pa}\) |
Minimum RES energy for each period, scenario, and area |
GWh |
System inertia |
||
\(SI^p_{\omega na}\) |
System inertia for each area |
s |
Generation system |
||
\(CFG_g\) |
Annualized fixed cost of a candidate generator |
M€/yr |
\(CFR_g\) |
Annualized fixed cost of a candidate generator to be retired |
M€/yr |
\(A_g\) |
Availability of each generator for adequacy reserve margin |
p.u. |
\(\underline{GP}_g, \overline{GP}_g\) |
Rated minimum load and maximum output of a generator |
GW |
\(\underline{GP}^p_{\omega ng}, \overline{GP}^p_{\omega ng}\) |
Minimum load and maximum output of a generator |
GW |
\(\underline{GC}^p_{\omega ne}, \overline{GC}^p_{\omega ne}\) |
Minimum and maximum consumption of an ESS |
GW |
\(\underline{GH}_g, \overline{GH}_g\) |
Rated minimum and maximum heat of a CHP or a fuel heater |
GW |
\(CF^p_{\omega ng}, CV^p_{\omega ng}\) |
Fixed (no load) and variable cost of a generator. Variable cost includes fuel and O&M |
€/h, €/MWh |
\(CR_g\) |
Operating reserve cost of a generator |
€/MW |
\(CE^p_{\omega ng}\) |
Emission cost of a generator |
€/MWh |
\(ER_g\) |
Emission rate of a generator |
tCO2/MWh |
\(CV_e\) |
Variable cost of an ESS or pumped-storage hydropower plant when charging |
€/MWh |
\(RU_g, RD_g\) |
Ramp up/down of a non-renewable unit or maximum discharge/charge rate for ESS discharge/charge |
MW/h |
\(TU_t, TD_t\) |
Minimum uptime and downtime of a thermal unit |
h |
\(TS_t\) |
Minimum stable time of a thermal unit |
h |
\(ST_e\) |
Maximum shift time of an ESS unit (in particular, for demand side management or data center flexibility) |
h |
\(CSU_g, CSD_g\) |
Startup and shutdown cost of a committed unit |
M€ |
\(\tau_e\) |
Storage cycle of the ESS (e.g., 1, 24, 168, 8736 h -for daily, weekly, monthly, yearly-) |
h |
\(\rho_e\) |
Outflow cycle of the ESS (e.g., 1, 24, 168, 8736 h -for hourly, daily, weekly, monthly, yearly-) |
h |
\(\sigma_g\) |
Energy cycle of the unit (e.g., 24, 168, 672, 8736 h -for daily, weekly, monthly, yearly-) |
h |
\(GI_g\) |
Generator inertia |
s |
\(EF_e\) |
Round-trip efficiency of the pump/turbine cycle of a pumped-storage hydro plant or charge/discharge of a battery |
p.u. |
\(PF_h\) |
Production function from water inflows to electricity |
kWh/m3 |
\(PF'_e\) |
Production function from electricity to hydrogen of an electrolyzer |
kWh/kgH2 |
\(PF''_e\) |
Production function from electricity to heat of a heat pump or an electrical heater |
kWh/kWh |
\(PF'''_e\) |
Production function from H2 to heat of a boiler using H2 |
kgH2/kWh |
\(PH''_g\) |
Power to heat ratio for a CHP \(\frac{\overline{GP}_g - \underline{GP}_g}{\overline{GH}_g - \underline{GH}_g}\) |
kWh/kWh |
\(\underline{I}^p_{\omega ne}, \overline{I}^p_{\omega ne}\) |
Minimum and maximum storage of an ESS (e.g., hydropower plant, closed-/open-loop pumped-storage hydro) |
GWh |
\(I^p_{\omega e}\) |
Initial storage of an ESS (e.g., hydropower plant, closed-/open-loop pumped-storage hydro) |
GWh |
\(\underline{E}^p_{\omega ne}, \overline{E}^p_{\omega ne}\) |
Minimum and maximum power produced by a unit in an interval defined |
GW |
\(EI^p_{\omega ne}\) |
Energy inflows of an ESS (e.g., hydropower plant) |
GW |
\(EO^p_{\omega ne}\) |
Energy outflows of an ESS (e.g., hydrogen, electric vehicle, hydropower plant, demand response) |
GW |
Hydropower system |
||
\(CFE_{e'}\) |
Annualized fixed cost of a candidate reservoir |
M€/yr |
\(\underline{I'}^p_{\omega ne'}, \overline{I'}^p_{\omega ne'}\) |
Minimum and maximum volume of a reservoir |
hm3 |
\(HI^p_{\omega ne'}\) |
Natural water inflows of a reservoir |
m3/s |
\(HO^p_{\omega ne'}\) |
Hydro outflows of a reservoir (e.g., irrigation) |
m3/s |
Electricity transmission system |
||
\(CFT_{ijc}\) |
Annualized fixed cost of a candidate electricity transmission line |
M€/yr |
\(\overline{F}^p_{\omega nijc}\) |
Net transfer capacity (total transfer capacity multiplied by the security coefficient) of a transmission line |
GW |
\(\overline{F}'_{ijc}\) |
Maximum power flow used in the Kirchhoff’s 2nd law constraint (e.g., disjunctive constraint for the candidate AC lines) |
GW |
\(L_{ijc}\) |
Loss factor of an electric transmission line |
p.u. |
\(X_{ijc}\) |
Reactance of an electric transmission line |
p.u. |
\(SON_{ijc}, SOF_{ijc}\) |
Minimum switch-on and switch-off state of a line |
h |
\(S_B\) |
Base power |
GW |
\(\overline{\theta}'_{cy,i'j'c'}\) |
Maximum angle used in the cycle Kirchhoff’s 2nd law constraint (i.e., disjunctive constraint for a cycle with some AC candidate lines) |
rad |
The net transfer capacity of an electric transmission line can be different in each direction. However, here it is presented as equal for simplicity.
Hydrogen transmission system |
||
\(CFH_{ijc}\) |
Annualized fixed cost of a candidate hydrogen transmission pipeline |
M€/yr |
\(\overline{FH}_{ijc}\) |
Net transfer capacity (total transfer capacity multiplied by the security coefficient) of a pipeline |
tH2 |
The net transfer capacity of a hydrogen transmission pipeline can be different in each direction. However, here it is presented as equal for simplicity.
Heat transmission system |
||
\(CFP_{ijc}\) |
Annualized fixed cost of a candidate heat pipe |
M€/yr |
\(\overline{FP}_{ijc}\) |
Net transfer capacity (total transfer capacity multiplied by the security coefficient) of a heat pipe |
GW |
The net transfer capacity of a heat pipe can be different in each direction. However, here it is presented as equal for simplicity.
Variables¶
They are written in lowercase letters.
Electricity demand |
||
\(ens^p_{\omega ni}\) |
Energy not served |
GW |
Hydrogen demand |
||
\(hns^p_{\omega ni}\) |
Hydrogen not served |
tH2 |
\(hex^p_{\omega ni}\) |
Hydrogen surplus |
tH2 |
Heat demand |
||
\(htns^p_{\omega ni}\) |
Heat not served |
GW |
Generation system |
||
\(icg^p_g\) |
Candidate generator or ESS installed or not |
{0,1} |
\(rcg^p_g\) |
Candidate generator or ESS retired or not |
{0,1} |
\(gp^p_{\omega ng}, gc^p_{\omega ng}\) |
Generator output (discharge if an ESS) and consumption (charge if an ESS) |
GW |
\(go^p_{\omega ne}\) |
Generator outflows of an ESS |
GW |
\(p^p_{\omega ng}\) |
Generator output of the second block (i.e., above the minimum load) |
GW |
\(c^p_{\omega ne}\) |
Generator charge |
GW |
\(gh^p_{\omega ng}\) |
Heat output of a fuel heater |
GW |
\(ur^p_{\omega ng}, dr^p_{\omega ng}\) |
Upward and downward operating reserves of a non-renewable generating unit. A unit can provide simultaneously upward and downward reserves |
GW |
\(ur'^p_{\omega ne}, dr'^p_{\omega ne}\) |
Upward and downward operating reserves of an ESS as a consumption unit. A consumption unit can provide simultaneously upward and downward reserves |
GW |
\(ura^p_{\omega ng}, dra^p_{\omega ng}\) |
Upward and downward operating reserve activation of a non-renewable generating unit. A unit can provide simultaneously upward and downward reserves |
GW |
\(ura'^p_{\omega ne}, dra'^p_{\omega ne}\) |
Upward and downward operating reserve activation of an ESS as a consumption unit. A consumption unit can provide simultaneously upward and downward reserves |
GW |
\(urr^p_{\omega ng}, drr^p_{\omega ng}\) |
Upward and downward ramp reserves of a non-renewable generating unit. A unit can provide simultaneously upward and downward ramp reserves |
GW/h |
\(ei^p_{\omega ne}\) |
Variable energy inflows of a candidate ESS (e.g., hydropower plant) |
GW |
\(i^p_{\omega ne}\) |
ESS stored energy (inventory, reservoir energy, state of charge) |
GWh |
\(s^p_{\omega ne}\) |
ESS spilled energy |
GWh |
\(uc^p_{\omega ng}, su^p_{\omega ng}, sd^p_{\omega ng}\) |
Commitment, startup, and shutdown of a generation unit per load level |
{0,1} |
\(rss^p_{\omega nt}, rsu^p_{\omega nt}, rsd^p_{\omega nt}\) |
Stable, ramp up, and ramp down states of a generation unit with minimum stable time per load level |
{0,1} |
\(uc'^p_{\omega g}, uc'^p_{\omega ng}\) |
Maximum commitment of a generation unit for all the load levels or for each load level. If any generator in a exclusion group is an installation/retirement candidate, it is assumed exclusivity per period \(uc'^p_{\omega g}\). When all mutually exclusive generators exist, it is assumed that the exclusivity is per load level \(uc'^p_{\omega ng}\). |
{0,1} |
Hydropower system |
||
\(icr^p_{e'}\) |
Candidate reservoir installed or not |
{0,1} |
\(hi^p_{\omega ne'}\) |
Variable water inflows of a candidate reservoir (e.g., hydropower plant) |
m3/s |
\(ho^p_{\omega ne'}\) |
Hydro outflows of a reservoir |
m3/s |
\(i'^p_{\omega ne'}\) |
Reservoir volume |
hm3 |
\(s'^p_{\omega ne'}\) |
Reservoir spilled water |
hm3 |
\(ucc^p_{\omega ng}\) |
Consumption commitment of a reversible hydro unit per load level |
{0,1} |
\(ucc'^p_{\omega ng}\) |
Maximum consumption commitment of a reversible hydro unit per load level |
{0,1} |
Electricity transmission system |
||
\(ict^p_{ijc}\) |
Candidate transmission installed or not |
{0,1} |
\(swt^p_{\omega nijc}, son^p_{\omega nijc}, sof^p_{\omega nijc}\) |
Switching state, switch-on, and switch-off of an transmission electric line |
{0,1} |
\(f^p_{\omega nijc}\) |
Power flow through an electric transmission line |
GW |
\(l^p_{\omega nijc}\) |
Half ohmic losses of an electric transmission line |
GW |
\(\theta^p_{\omega ni}\) |
Voltage angle of a node |
rad |
Hydrogen transmission system |
||
\(ich^p_{ijc}\) |
Candidate hydrogen pipeline installed or not |
{0,1} |
\(fh^p_{\omega nijc}\) |
Hydrogen flow through a hydrogen pipeline |
tH2 |
Heat transmission system |
||
\(icp^p_{ijc}\) |
Candidate heat pipe installed or not |
{0,1} |
\(fp^p_{\omega nijc}\) |
Heat flow through a heat pipe |
GW |
Equations¶
In this section, we replicate the mathematical formulation written in the code, which is specially oriented to numerical stability and efficiency, to make it easier for people to understand. The names in parentheses correspond to the names of the constraints in the code.
Objective function: minimization of total (investment and operation) cost for the multi-period scope of the model
Electricity, heat, and hydrogen generation, (energy and reservoir) storage, and (electricity, hydrogen, and heat) network investment cost plus retirement cost [M€] «eTotalFCost» «eTotalICost»
Electricity, heat, and hydrogen expected generation operation cost [M€] «eTotalGCost»
Expected consumption operation cost [M€] «eTotalCCost»
Expected generation emission cost [M€] «eTotalECost» «eTotalECostArea»
Expected network operation cost [M€]. This cost penalizes with and \(\epsilon\) the superfluous network losses done with spillage/curtailment «eTotalNCost»
Electricity, hydrogen, and heat expected reliability cost [M€] «eTotalRElecCost, eTotalRH2Cost, eTotalRHeatCost»
The penalty for hydrogen surplus is 0.5 CHNS, which is a common assumption to consider that the cost of hydrogen surplus is much lower than the cost of hydrogen not served, and it is internally done by the model.
All the periodical (annual) costs of a period \(p\) are updated considering that the period (e.g., 2030) is replicated for a number of years defined by its weight \(WG^p\) (e.g., 5 times) and discounted to the base year \(T\) (e.g., 2020) with this discount factor \(DF^p = \frac{(1+\delta)^{WG^p}-1}{\delta(1+\delta)^{WG^p-1+p-T}}\).
Constraints
Generation and network investment and retirement
Investment and retirement decisions in consecutive years «eConsecutiveGenInvest» «eConsecutiveGenRetire» «eConsecutiveRsrInvest» «eConsecutiveNetInvest» «eConsecutiveNetH2Invest» «eConsecutiveNetHeatInvest»
Generation operation
Commitment decision bounded by the investment decision for candidate committed units (all except the VRE units) [p.u.] «eInstallGenComm»
Commitment decision bounded by the investment or retirement decision for candidate ESS [p.u.] «eInstallESSComm» «eUninstallGenComm»
Output and consumption bounded by investment or retirement decision for candidate ESS [p.u.] «eInstallGenCap» «eUninstallGenCap» «eInstallConESS»
Heat production with fuel heater bounded by investment decision for candidate fuel heater [p.u.] «eInstallFHUCap»
Adequacy electricity system reserve margin [p.u.] «eAdequacyReserveMarginElec»
Adequacy heat system reserve margin [p.u.] «eAdequacyReserveMarginHeat»
Maximum CO2 emission per period, scenario, and area [MtC02] «eMaxSystemEmission»
Minimum RES energy per period, scenario, and area [GW] «eMinSystemRESEnergy» «eTotalRESEnergyArea»
Balance of electricity generation and demand at each node with ohmic losses [GW] «eBalanceElec»
The sum of the inertia of the committed units must satisfy the system inertia for each area [s] «eSystemInertia»
Upward and downward operating reserves provided for each area by non-renewable generators (including ESS when generating) and ESS, when charging [GW] «eOperReserveUp» «eOperReserveDw»
Upward and downward operating reserve activation provided for each area by non-renewable generators (including ESS when generating) and ESS, when charging [GW] «eOperReserveUpEnergy» «eOperReserveDwEnergy»
Upward and downward operating reserve activation lower than the upward and downward operating reserves provided for each non-renewable generators (including ESS when generating) and ESS, when charging [GW] «eReserveUpEnergy» «eReserveDwEnergy» «eESSReserveUpEnergy» «eESSReserveDwEnergy»
Upward and downward ramp reserves provided for the system by non-renewable generators (including ESS when generating) [GW/h] «eSystemRampUp» «eSystemRampDw»
It is assumed that the ramp reserves provided by the generators can be shared among areas of the system.
Ratio between downward and upward operating reserves for each area provided by non-renewable generators (including ESS when generating) and ESS, when charging [GW] «eReserveMinRatioDwUp» «eReserveMaxRatioDwUp» «eRsrvMinRatioDwUpESS» «eRsrvMaxRatioDwUpESS».
The corresponding constraints are not formulated if \(\underline{DtUR}=0\) and \(\overline{DtUR}=1\).
VRES units (i.e., those with linear variable cost equal to 0 and no storage capacity) do not contribute to the operating reserves.
Operating reserves from ESS can only be provided if enough energy is available for producing [GW] «eReserveUpIfEnergy»
or if there is enough storage capacity left for storing [GW] «eESSReserveDwIfEnergy»
Maximum and minimum relative inventory of ESS candidates (only for load levels multiple of 1, 24, 168, 8736 h depending on the ESS storage type, represented as \(n|\tau_e\)) constrained by the ESS commitment decision times the maximum capacity [p.u.] «eMaxInventory2Comm» «eMinInventory2Comm»
Energy inflows of ESS candidates (only for load levels multiple of 1, 24, 168, 8736 h, depending on the ESS storage type, represented as \(n|\tau_e\)) constrained by the ESS commitment decision times the energy inflows data [p.u.] «eInflows2Comm»
ESS energy inventory (only for load levels multiple of 1, 24, 168 h depending on the ESS storage type, represented as \(n|\tau_e\)) [GWh] «eESSInventory»
The initial inventory of the ESS candidates divided by its initial storage \(I^p_{\omega e}\) is equal to the final reservoir divided by its initial storage [p.u.] «eIniFinInventory».
The initial inventory of the ESS candidates divided by their initial storage \(I^p_{\omega e}\) is fixed to the commitment decision [p.u.] «eIniInventory».
Maximum shift time of stored energy [GWh]. It is thought to be applied to demand side management or data center flexibility «eMaxShiftTime»
ESS outflows (only for load levels multiple of 1, 24, 168, 672, and 8736 h, depending on the ESS outflow cycle, represented as \(n|\rho_e\)) must be satisfied [GWh] «eEnergyOutflows»
Maximum and minimum energy production (only for load levels multiple of 24, 168, 672, 8736 h depending on the unit energy type, represented as \(n|\sigma_g\)) must be satisfied [GWh] «eMaximumEnergy» «eMinimumEnergy»
Maximum and minimum output of the second block of a committed unit (all except the VRES units) [p.u.] «eMaxOutput2ndBlock» «eMinOutput2ndBlock»
D.A. Tejada-Arango, S. Lumbreras, P. Sánchez-Martín, and A. Ramos “Which Unit-Commitment Formulation is Best? A Systematic Comparison” IEEE Transactions on Power Systems 35 (4): 2926-2936, Jul 2020 10.1109/TPWRS.2019.2962024
C. Gentile, G. Morales-España, and A. Ramos “A tight MIP formulation of the unit commitment problem with start-up and shut-down constraints” EURO Journal on Computational Optimization 5 (1), 177-201, Mar 2017. 10.1007/s13675-016-0066-y
G. Morales-España, A. Ramos, and J. Garcia-Gonzalez “An MIP Formulation for Joint Market-Clearing of Energy and Reserves Based on Ramp Scheduling” IEEE Transactions on Power Systems 29 (1): 476-488, Jan 2014. 10.1109/TPWRS.2013.2259601
G. Morales-España, J.M. Latorre, and A. Ramos “Tight and Compact MILP Formulation for the Thermal Unit Commitment Problem” IEEE Transactions on Power Systems 28 (4): 4897-4908, Nov 2013. 10.1109/TPWRS.2013.2251373
Maximum and minimum charge of a non-hydropower ESS [p.u.] «eMaxCharge» «eMinCharge»
Maximum charge of a hydro unit [p.u.] «eMaxCharge»
Incompatibility between charge and discharge, including the activation energy in the worst direction, of a non-hydropower ESS [p.u.] «eChargeDischarge»
If there are operating reserve activation files, the constraint is:
Incompatibility between charge and discharge of a hydro unit [p.u.] «eChargeDischarge»
Total output of a committed unit (all except the VRES units) [GW] «eTotalOutput»
If there are operating reserve activation files, the constraint is:
Total charge of a non-hydropower ESS [GW] «eESSTotalCharge»
If there are operating reserve activation files, the constraint is:
Total charge of a hydro unit [GW] «eESSTotalCharge»
If there are operating reserve activation files, the constraint is:
Incompatibility between charge and outflows use of an ESS [p.u.] «eChargeOutflows»
Logical relation between commitment, startup, and shutdown status of a committed unit (all except the VRES units) [p.u.] «eUCStrShut»
Logical relation between stable, ramp up, and ramp down states (generating units with stable time) [p.u.] «eStableStates»
Maximum commitment of a committable unit (all except the VRES units) for all the load levels [p.u.] «eMaxCommitmentYearly»
Maximum commitment of a committable unit (all except the VRES units) for all the load levels [p.u.] «eMaxCommitmentHourly»
Maximum of all the capacity factors [p.u.] «eMaxCommitGenYearly»
Maximum of all the capacity factors [p.u.] «eMaxCommitGenHourly»
Yearly mutually exclusive \(g\) and \(g'\) units (e.g., thermal, ESS, VRES units) [p.u.] «eExclusiveGensYearly»
Hourly mutually exclusive \(g\) and \(g'\) units (e.g., thermal, ESS, VRES units) [p.u.] «eExclusiveGensHourly»
Initial commitment of the units for every period, scenario, and stage is determined by the model based on the merit order loading, including the VRES and ESS units.
Maximum ramp up and ramp down for the second block of a non-renewable (thermal, hydro) unit [p.u.] «eRampUp» «eRampDw»
P. Damcı-Kurt, S. Küçükyavuz, D. Rajan, and A. Atamtürk, “A polyhedral study of production ramping,” Math. Program., vol. 158, no. 1–2, pp. 175–205, Jul. 2016. 10.1007/s10107-015-0919-9
Maximum ramp down and ramp up for the charge of an ESS [p.u.] «eRampUpCharge» «eRampDwCharge»
Detection of ramp up and ramp down state for the second block of a non-renewable (thermal) unit with minimum stable time [p.u.] «eRampUpState» «eRampDwState».
The parameter \(\epsilon\) is added to detect if the generator is ramping up/down. It is defined in the code as 1e-4 (of the ramp up/down limit).
F. Labora, A. Ramos “Tight and Compact Formulations for Nuclear Power Plant Flexible Operation” TechRxiv. February, 2026. 10.36227/techrxiv.177004916.61674766/v1
The model can also consider a dead band, which means that ramps below a certain threshold in p.u. set by \(\epsilon\) should not be restricted. In this case, the \(\epsilon\) is defined in the code as 1e-2 (of the ramp up/down limit).
Minimum up time and down time of thermal unit [p.u.] «eMinUpTime» «eMinDownTime»
D. Rajan and S. Takriti, “Minimum up/down polytopes of the unit commitment problem with start-up costs,” IBM, New York, Technical Report RC23628, 2005. https://pdfs.semanticscholar.org/b886/42e36b414d5929fed48593d0ac46ae3e2070.pdf
Minimum stable time of a thermal unit [p.u.] «eMinStableTime»
In the code you can select a simplified (first) or the tight computational efficient formulation (second). With the simplified formulation ramp down maneuvers can no longer be split into several periods to avoid restrictions.
Reservoir operation
Maximum and minimum relative volume of reservoir candidates (only for load levels multiple of 1, 24, 168, 8736 h depending on the reservoir volume type, represented as \(n|\tau_{e'}\)) constrained by the hydro commitment decision times the maximum capacity [p.u.] «eMaxVolume2Comm» «eMinVolume2Comm»
Operating reserves from a hydropower plant can only be provided if enough water is available for turbining at the upstream reservoirs [GW] «eTrbReserveUpIfUpstream»
and if there is enough spare volume to store the water downstream «eTrbReserveUpIfDownstream»
Operating reserves while pumping can only be provided if there is enough available water downstream to pump «ePmpReserveDwIfUpstream»
and if there is enough spare volume to store the water upstream «ePmpReserveDwIfUpstream»
Water volume for each hydro reservoir (only for load levels multiple of 1, 24, 168 h, depending on the reservoir storage type, represented as \(n|\tau_{e'}\)) [hm3] «eHydroInventory»
The initial volume of the hydro reservoir divided by its initial volume \(I^p_{\omega e'}\) is equal to the final reservoir divided by its initial volume [p.u.] «eIniFinVolume».
Hydro outflows (only for load levels multiple of 1, 24, 168, 672, and 8736 h, depending on the ESS outflow cycle, represented as \(n|\rho_e\)) must be satisfied [m3/s] «eHydroOutflows»
Electricity network operation
Logical relation between transmission investment and switching {0,1} «eLineStateCand»
Logical relation between switching state, switch-on and switch-off status of a line [p.u.] «eSWOnOff»
The initial status of the lines is pre-defined as switched on.
Minimum switch-on and switch-off state of a line [h] «eMinSwOnState» «eMinSwOffState»
Power flow limit in transmission lines [p.u.] «eNetCapacity1» «eNetCapacity2»
DC Optimal power flow for existing and non-switchable, and candidate and switchable AC-type lines (Kirchhoff’s second law) [rad] «eKirchhoff2ndLaw1» «eKirchhoff2ndLaw2»
Half ohmic losses are linearly approximated as a function of the power flow [GW] «eLineLosses1» «eLineLosses2»
Cycle constraints for AC existing lines with DC optimal power flow formulation [rad] «eCycleKirchhoff2ndLawCnd1» «eCycleKirchhoff2ndLawCnd2». To activate these constraints you must put pIndCycleFlow = 1 in line 49 of the openTEPES.py file.
It usually improves the computational performance of the model. See the cycle constraints for the AC power flow formulation in the following reference:
E.F. Álvarez, J.C. López, L. Olmos, A. Ramos “An Optimal Expansion Planning of Power Systems Considering Cycle-Based AC Optimal Power Flow” Sustainable Energy, Grids and Networks, May 2024. 10.1016/j.segan.2024.101413
Kirchhoff’s second law is substituted by a cycle power flow formulation for cycles with only AC existing lines [rad]
and disjunctive constraints for cycles with some AC candidate line [rad]
Flows in AC existing parallel circuits are inversely proportional to their reactances [GW] «eFlowParallelCandidate1» «eFlowParallelCandidate2»
and disjunctive constraints in AC candidate parallel circuits are inversely proportional to their reactances [p.u.]
Given that there are disjunctive constraints, which are only correct with binary AC investment variables, this cycle-based formulation must be used only with binary AC investment decisions.
Hydrogen network operation
Balance of hydrogen generation by electrolyzers, hydrogen consumption from the hydrogen heater using it, and demand at each node [tH2] «eBalanceH2». A transport model is used to model the hydrogen network.
Heat network operation
Energy conversion from any energy type to heating [p.u.] («eEnergy2Heat»)
Balance of heat generation produced by CHPs and fuel heaters respectively and demand at each node [GW] «eBalanceHeat». A transport model is used to model the heat network.
Flow-based market coupling method
It is based on the flow-based approach presented in:
Huang D. “Dynamic PTDF Implementation in the Market Model” TU Delft, Delft University of Technology. Sep 2011.
The approach is based on the following equations [GW] [p.u.] «eNetPosition», «eFlowBasedCalcu1» and «eFlowBasedCalcu2»:
Bounds on generation and ESS variables [GW]
Bounds on reservoir variables [m3/s, hm3]
Bounds on electricity network variables [GW]
Voltage angle of the reference node fixed to 0 for each scenario, period, and load level [rad]
Bounds on hydrogen network variables [tH2]
Bounds on heat network variables [GW]