Grid Foundation Model (GENCO)–Embedded Optimization for AC-Feasible Unit Commitment

#34
by wkaleem - opened

Participant: Waquar Kaleem [Linkedin]
Contact: wzk5140@psu.edu
(fifth-year PhD student in Industrial Engineering and Operations Research at Penn State University, #WeAre)

Summary

We embed (incorporate) GENCO in multi-period unit commitment with AC optimal power flow (UC–ACOPF) [3] and minimize generation, online, startup and shutdown costs in order to find unit commitment schedules that satisfy the AC power flow equations and all operating limits.

Motivation

Given a set of online generators and transmission network data, GENCO approximates a single-period ACOPF solution [1] (such a solution may still violate AC constraints despite GENCO's internal corrections).
We exploit this approximate capability to consider an inverse problem where the goal is to find unit commitment decisions that admit an AC-feasible dispatch across multiple periods. We embed GENCO in the unit commitment problem so that its predictions guide these decisions (with an additional projection to correct GENCO’s prediction errors and enforce AC feasibility). This embedding idea is based on our earlier work [9] and [10] on neural-embedded optimization in logistics.

Method

Decision variables are shown in bold (including predictions determined by the GENCO equations).

Let T\mathcal T denote the set of periods and \boldsymbol{x^{\mathrm{UC}}} the vector of online, startup and shutdown indicators over the horizon. For each period t∈Tt\in\mathcal T, let \boldsymbol{u_t^{on}} denote the online indicators in \boldsymbol{x^{\mathrm{UC}}} and \boldsymbol{x_t^{\mathrm{in}}} the selected GENCO inputs to be optimized (real and reactive demands, line resistances and reactances, and generation-cost coefficients). We restrict GENCO’s input decisions to the bounded set Xtin()\mathcal X_t^{\mathrm{in}}(\boldsymbol{u_t^{on}}).

Let ftGENCOf_t^{\mathrm{GENCO}} denote GENCO's prediction function for period tt with trained parameters β\beta (fixed). The corresponding output is:

=ftGENCO(,,β)=(,,,),(1) \boldsymbol{x_t^{\mathrm{out}}}=f_t^{\mathrm{GENCO}}(\boldsymbol{u_t^{on}},\boldsymbol{x_t^{\mathrm{in}}},\beta) =\bigl(\boldsymbol{\widehat p_t},\boldsymbol{\widehat q_t^{\mathrm{bus}}},\boldsymbol{\widehat V_t},\boldsymbol{\widehat\theta_t}\bigr), \tag{1}

where \boldsymbol{\widehat p_t} denotes predicted real power generation at each generator, \boldsymbol{\widehat q_t^{\mathrm{bus}}} total reactive power generation at each bus, and ,\boldsymbol{\widehat V_t},\boldsymbol{\widehat\theta_t} bus voltage magnitudes and phase angles (hats indicate predictions).

To correct GENCO's predictions that violate AC constraints, we adapt the projection idea of Iftakher et al. [2]. Let z\boldsymbol{z} denote the vector of real and reactive generation, voltage magnitude and phase angle variables that the correction adjusts in period tt. Let At(,)A_t(\boldsymbol{x_t^{\mathrm{out}}},\boldsymbol{u_t^{on}}) denote the predicted values of the components of z\boldsymbol{z} after allocating total reactive generation at each bus among the online generators connected to that bus. Let Ct()\mathcal C_t(\boldsymbol{u_t^{on}}) denote the set of vectors z\boldsymbol{z} satisfying the original single-period AC power flow equations, operating limits and reference-angle condition. The correction problem is:

min⁡z12∥z−At(,)∥22s.t.z∈Ct().(2) \begin{aligned} \min_{\boldsymbol{z}}\quad &\tfrac12\|\boldsymbol{z}-A_t(\boldsymbol{x_t^{\mathrm{out}}},\boldsymbol{u_t^{on}})\|_2^2\\ \mathrm{s.t.}\quad &\boldsymbol{z}\in\mathcal C_t(\boldsymbol{u_t^{on}}). \end{aligned} \tag{2}

Let Pt(,)\mathcal P_t(\boldsymbol{x_t^{\mathrm{out}}},\boldsymbol{u_t^{on}}) denote the set of ACOPF decisions obtained from feasible Karush–Kuhn–Tucker (KKT) points of the correction problem (2) (including the resulting voltage products and line power flows). In the correction objective, power and voltage are in per unit and angles are in radians. Let =()t∈T\boldsymbol{x^{\mathrm{OPF}}}=(\boldsymbol{x_t^{\mathrm{OPF}}})_{t\in\mathcal T} denote the ACOPF decision vectors over the horizon (generation, voltages, voltage products and line flows). We can now formulate the grid foundation model–embedded optimization (GFMO) problem as follows:

min⁡fUC()+∑t∈TftOPF()s.t.(,)∈FUC–ACOPF,∈Xtin()∀t∈T,=ftGENCO(,,β)∀t∈T,∈Pt(,)∀t∈T. \begin{align} \min\quad &f^{\mathrm{UC}}(\boldsymbol{x^{\mathrm{UC}}}) +\sum_{t\in\mathcal T}f_t^{\mathrm{OPF}}(\boldsymbol{x_t^{\mathrm{OPF}}}) \tag{3a}\\ \mathrm{s.t.}\quad &(\boldsymbol{x^{\mathrm{UC}}},\boldsymbol{x^{\mathrm{OPF}}})\in\mathcal F_{\mathrm{UC\text{–}ACOPF}}, \tag{3b}\\ &\boldsymbol{x_t^{\mathrm{in}}}\in\mathcal X_t^{\mathrm{in}}(\boldsymbol{u_t^{on}}) &&\forall t\in\mathcal T, \tag{3c}\\ &\boldsymbol{x_t^{\mathrm{out}}}=f_t^{\mathrm{GENCO}}(\boldsymbol{u_t^{on}},\boldsymbol{x_t^{\mathrm{in}}},\beta) &&\forall t\in\mathcal T, \tag{3d}\\ &\boldsymbol{x_t^{\mathrm{OPF}}}\in\mathcal P_t(\boldsymbol{x_t^{\mathrm{out}}},\boldsymbol{u_t^{on}}) &&\forall t\in\mathcal T. \tag{3e} \end{align}

The objective function (3a) minimizes total commitment and generation costs over the horizon. Here, fUCf^{\mathrm{UC}} denotes online, startup and shutdown costs, and ftOPFf_t^{\mathrm{OPF}} denotes generation cost in period tt. Constraint (3b) enforces the complete UC–ACOPF feasible set, including commitment logic, minimum up and down times, and ramp limits. Constraints (3c)–(3e) apply to every period and link the commitment decisions to an AC-feasible dispatch through GENCO. Specifically, (3c) bounds the inputs, (3d) determines GENCO's predictions, and (3e) selects the corrected dispatch from feasible KKT points of (2). GENCO's predictions are determined by the online indicators and input decisions, but the corrected dispatch need not be unique.

Following [3] and [4], we solve (3) using augmented Lagrangian dual decomposition (see [5, Ch. 17] for background). The key idea is to confine GENCO evaluations and corrections to period subproblems while a horizon subproblem handles operating costs and interperiod coupling. We introduce separate horizon and period copies of the online indicators and real power generation and relax the consensus constraints requiring the copies to agree. The horizon subproblem accounts for all operating costs and enforces the UC constraints and ramp limits. With convex quadratic generation costs, it is a mixed-integer convex quadratic program that can be solved using standard solvers (we use SCIP [8]). Each period subproblem considers on/off combinations consistent with fixed generator statuses and GENCO's graph and input restrictions. For each fixed combination, we locally optimize \boldsymbol{x_t^{\mathrm{in}}} by evaluating GENCO through (3d) and solving the correction problem (2) using an active-set Newton method. The period subproblems are independent once the horizon decisions, multipliers and penalty are fixed.

To optimize \boldsymbol{x_t^{\mathrm{in}}}, we combine PyTorch automatic differentiation through GENCO with implicit differentiation of the KKT conditions of (2). This gives derivatives of the corrected real power generation with respect to the GENCO inputs when the correction's active set is locally unchanged and its KKT matrix is nonsingular. We take projected gradient steps in the normalized input coordinates to enforce Xtin()\mathcal X_t^{\mathrm{in}}(\boldsymbol{u_t^{on}}) and apply an Armijo line search to reduce the period subproblem objective. Differences between the horizon and period copies define the consensus residuals used to update the multipliers. The penalty increases up to a prescribed maximum when the consensus residual remains above tolerance and fails to decrease sufficiently [5, Ch. 17]. Finally, we complete a UC schedule from the corrected period decisions and accept it only if all AC and UC constraints hold within the specified tolerances, irrespective of GENCO's prediction errors.

Results

We highlight that these are preliminary results from a prototype implementation (mostly vibe coded with codex) on 15 instances. Here, TT is the number of hourly periods and α\alpha scales the reference demand profile (0.90,1.05,1.05,0.90)(0.90,1.05,1.05,0.90), repeated for longer horizons. Column names: SCIP [8] and Juniper.jl [6] solve the full UC–ACOPF formulation, and Zhang et al. [3] denotes a decomposition method. GFMO denotes our grid foundation model–embedded optimization method. Small and Base denote the released GENCO model sizes, and 0 and 1 denote the model seeds. Bold denotes the smallest time in each row.

Computation time to first feasible solution (s).

Network TT α\alpha SCIP [8] Juniper.jl [6] Zhang et al. [3] GFMO Small 0 GFMO Small 1 GFMO Base 0 GFMO Base 1
IEEE 14 4 0.9 1273.75 215.30 169.08 33.53 39.49 29.33 47.14
IEEE 14 4 1.0 1313.98 162.15 206.93 33.47 34.27 62.75 21.00
IEEE 14 4 1.1 1676.16 169.62 — 30.37 35.61 31.69 24.44
IEEE 14 8 0.9 2920.86 165.98 199.20 50.37 32.59 37.83 36.63
IEEE 14 8 1.0 2281.22 130.70 130.51 36.36 40.99 41.23 32.69
IEEE 14 8 1.1 1848.26 131.84 — 29.43 24.73 61.46 35.99
IEEE 14 12 0.9 — 158.53 347.54 30.50 45.86 24.48 40.10
IEEE 14 12 1.0 — 258.40 151.38 32.26 32.27 26.08 53.77
IEEE 14 12 1.1 2694.37 152.82 — 60.43 32.51 33.88 32.28
IEEE 14 (tighter ramps) 4 1.0 113.72 233.09 — — — — 373.93
IEEE 30 4 1.0 — 173.05 — 61.69 63.78 75.18 64.39
IEEE 57 4 1.0 — 115.48 270.84 127.21 125.44 82.98 151.11
IEEE 118 4 1.0 — 552.49 — 241.53 464.04 366.90 300.41
Synthetic 500 4 1.0 — — — 2493.60 3388.79 2467.06 2422.04
Synthetic 2000 4 1.0 — — — — — — —

Times are recorded from solver entry point to the first complete schedule passing the AC and UC checks, including model loading, initialization and correction. Each run has a 3600s budget on one CPU core. A dash means no feasible solution was found, except for Zhang et al. [3] on the tighter-ramp instance, which the Zhang et al. implementation does not support. Tolerances are set to 10−310^{-3} MW/MVAr/MVA, 10−510^{-5} p.u. and 10−610^{-6} rad in all methods.

Findings

On 11 instances, all four GFMO variants have smaller reported times than every benchmark that returns a feasible schedule. All four variants also find feasible schedules on the 500-bus instance in approximately 40–57 minutes, where none of the benchmarks succeeds. The results are less consistent on IEEE 57, where Juniper.jl is faster than three GFMO variants, and on the tighter-ramp instance, where only GFMO Base 1 succeeds and SCIP is fastest. In the three unsuccessful tighter-ramp runs, the horizon and period decisions agree on commitment but retain dispatch differences of approximately 2.01–7.05 MW. This indicates difficulty coordinating dispatch across periods even after obtaining feasible period solutions. No method finds a feasible schedule on the 2,000-bus instance within the time budget. All four GFMO runs stop during first-period initialization. The timing comparisons remain preliminary because processors differ across runs and Juniper's solution is checked when its solve returns.

Overall, the results suggest that combining GENCO's predictions with AC-feasibility correction and dual decomposition is promising for finding feasible commitment schedules. Comparing solution costs and improving performance under tighter ramp limits and on larger networks remain directions for further work.

Code and data

Self-contained notebook
· Code
· GENCO OPF models
· Source data

Collaboration

If you are interested in working on this project please reach out to me at wzk5140@psu.edu.

References

  1. A. Puech et al. GENCO — A Unified Neural Solver Embedded in a Development Framework for Steady-State Grid Analysis, 2026.
  2. A. Iftakher, R. Golder, B. N. Roy and M. M. Faruque Hasan. Physics-Informed Neural Networks with Hard Nonlinear Equality and Inequality Constraints, 2025.
  3. W. Zhang, Y. Kim and K. Kim. On Solving Unit Commitment with Alternating Current Optimal Power Flow on GPU, 2023.
  4. S. Zeng et al. Scalable Mixed-Integer Optimization with Neural Constraints via Dual Decomposition, AAAI, 2026.
  5. J. Nocedal and S. J. Wright. Numerical Optimization, Chapter 17, 2006.
  6. O. Kröger et al. Juniper: An Open-Source Nonlinear Branch-and-Bound Solver in Julia, 2018.
  7. Jing Qi. Close Enough? Turning GENCO Predictions into Feasible AC Solutions, GENCO Challenge entry, 2026.
  8. SCIP. What types of optimization problems does SCIP solve?, official solver documentation.
  9. W. Kaleem, D. Lee, C. Kwon and A. Subramanyam. Neural Embedded Mixed-Integer Optimization for Location-Routing Problems, 2024.
  10. W. Kaleem, H. Ayala and A. Subramanyam. Neural embedded optimization for integrated location and routing problems, IISE Annual Conference Proceedings, pp. 1–6, 2024.
wkaleem changed discussion status to closed
wkaleem changed discussion status to open

Sign up or log in to comment