Spaces:
Running
From fault to plan: GENCO as screener, plan verifier and voltage setter for corrective response on transmission grids
An operator tool: mark a fault, get a redispatch and minimum load-shedding plan, always confirmed by the AC power flow.
It is an interface for operators and a multi-step corrective workflow (screening, corrective plan, plan verification, voltage setting and repair order), in the spirit of corrective SCOPF, in which GENCO is used in three ways.
Participants: Rafael Pissinati de Souza (UTAD, Vila Real, Portugal; Unesp – Ilha Solteira, LAPSE laboratory; IFRO – Porto Velho Calama, Control and Automation Engineering) and Leonardo Pilarski (UTAD, Vila Real, Portugal; HumanISE, INESC TEC, UTAD Pole)
Contact: rafael.pissinati@ifro.edu.br (main), pilarski@utad.pt
Use of AI. Code and text were developed with the assistance of Claude Code (Anthropic) and reviewed by the authors. The narration of the video is a synthetic voice (Microsoft neural text-to-speech); its background music was synthesized by us.
Demo (no install): https://prof-pissinati.github.io/genco-corrective-response/ · Code (Apache-2.0): https://github.com/Prof-Pissinati/genco-corrective-response · Video (2 min 15 s, narrated): https://youtu.be/Kl1CWCO2mCY
The demo only replays results precomputed by our backend, because GitHub Pages cannot run a server. This is a hosting limit, not a limit of the tool: run locally, the same interface computes any fault live.
In brief
| Question | Answer |
|---|---|
| What is it? | An operator tool for transmission grids (IEEE 14, 30, 57, 118): mark a fault, get a redispatch and a minimum load-shedding plan, always confirmed by the AC power flow. |
| What does GENCO do? | Ranks the N-1 sweep, vets a plan before the exact solver, and picks generator voltages (GENCO-OPF, IEEE 118). The AC has the last word. |
| Does it work? | On IEEE 118: mean loading error 0.11 points vs 2.96 for DC; the verifier falsely approves 17 of 173 insufficient plans at a 100% threshold (DC: 121) and none at 99%; voltage violations go from 15 to 0 in 13 plans. |
| Where does it not? | Not faster than the AC on CPU; about the same as DC, or worse, on the GOC networks of 500 to 10,000 buses; the GENCO view covers only single-line outages. In a check we added, a couple of Newton–Raphson steps from the base case beat the authors' checkpoint on the IEEE 118 (CPU only; we have no GPU). |
Summary
We turned GENCO into a corrective-response tool for operators of transmission grids (IEEE 14, 30, 57 and 118): the operator marks a fault and gets a redispatch and a minimum load-shedding plan, always confirmed by the AC power flow. GENCO is not the solver. It does three jobs around it: it ranks the N-1 sweep, it verifies a plan before the exact solver runs, and it picks the generator voltages (GENCO-OPF, IEEE 118). On the IEEE 118, GENCO's mean loading error is 0.11 points against 2.96 for DC; as a plan verifier it falsely approved 17 of 173 insufficient plans at a 100% threshold (DC: 121), and none at 99%. The plans it vets, with redispatch and load shedding, are states GENCO never saw in training. The main contribution is the tool: a way to see GENCO's outputs in operator terms (on the diagram, in the N-1 ranking, next to the AC) and to check them, with the exact solver always deciding.
Motivation
When a line or bus trips, an operator needs to know which outages are dangerous, what to redispatch and shed, and whether the plan holds. A fast, approximate answer helps in all three, and a wrong one is caught anyway if an exact solver has the last word. That is the role we give GENCO. Our own AC power flow (sparse Newton–Raphson) confirms every plan, overload and voltage.
Method
Mark a line or bus on the diagram, or click a row of the N-1 sweep. The tool computes the post-fault state, a corrective LP (redispatch and minimum load shedding), the AC check, and the repair order with block-by-block load reconnection and the energy not supplied. The diagram has DC, AC and GENCO views. GENCO is used in three ways:
- Screener: estimate the loading of every line after each single-line outage, to rank the N-1 sweep.
- Plan verifier: approve or reject a candidate plan (redispatch and shedding) before the exact solver.
- Voltage setter (GENCO-OPF, IEEE 118): choose the generator voltages, redo the power plan with them, and let the AC confirm.
We use the checkpoints published by the GENCO authors, unchanged. The state used to compare methods is the one GENCO saw in training (AC-OPF base dispatch, one line out, the reference bus absorbing the imbalance).
Results (IEEE 118 unless noted; sources in docs/NUMBERS.md)
1. Screening. Over 177 single-line outages the mean loading error against the AC is 0.11 points for GENCO and 2.96 for DC. GENCO flags 99.5% of the lines loaded at 90% or more (DC: 78%) but only 56% of those at 100% or more (DC: 13%): a ranking tool, not a verdict. The gap is just as large on IEEE 14, 30 and 57.
2. Plan verifier. Of 173 insufficient plans (the AC shows an overload), DC falsely approves 121 and GENCO 17 at a 100% threshold; at 99% GENCO falsely approves none (zero errors in 173 bounds the error rate at about 1.7% with 95% confidence). With a 3-point margin GENCO approves 83 of 89 sufficient plans (263 MW shed in total); DC, at the same safety level, approves 1. We also re-chose the threshold on part of the outages and tested it on the rest (leave one outage out, and 2,000 random halves): at the 99% threshold no insufficient plan of the held-out outages was approved (0 of 173; 0 of 174,888 tested states), while a threshold tuned to the tenth of a point let through about 1% (a mistake in half of the splits) and one extra point of safety removed every mistake, at the cost of a few points of approvals (93% to 89% of the plans with a 3-point margin). Applied without refitting to the IEEE 30 (the authors' checkpoint for that network), the 99% threshold falsely approved 0 of 30 insufficient plans (at 100% it would be 7) and approved all 15 plans with a margin of 3 points or more, while the DC threshold did not carry over (21 of 30); the IEEE 57 has only 4 insufficient plans, too few to say. Small samples; details in docs/GENCO_VERIFICACAO.md.
3. Voltage setter. In the replay, 13 plans left a voltage out of band (15 violations). With GENCO-OPF voltages and the power plan redone, the AC shows 0 violations and no new overload; shedding in those plans goes from 901.8 to 866.2 MW. On a larger test of 43 outages, voltage is solved in 41.
4. Same state, two views. On a typical outage (line 76–77, no overload) GENCO follows the AC with a mean error of 0.06 points (median over the 177 outages: 0.05). With line 8–5 out, 7 lines exceed their limit and AC and GENCO flag the same 7 (mean error 0.57).
5. Training on more outages did not help (our N-10 model). We also trained a GENCO Tiny on outages up to N-10 (39,761 samples, 42 epochs; the authors' checkpoint used 250,000 samples and 200 epochs). It is worse on every accuracy measure: mean loading error 0.93 vs 0.11 points on the 177 single-line outages, and 2.50 vs 1.19 with ten lines out. It overestimates the loading by about 3 points, though, and as a verifier it approves no insufficient plan even at a 100% threshold (the authors' model approves 17), at the price of needing an 8-point margin to approve 82 of 89 sufficient plans (3 points for 83). In our test, a biased-high estimate vetted plans more safely than an unbiased one (one network, one seed). Details: docs/GENCO_CHECKPOINT_AUTORES.md.
6. A classical baseline (added after we first posted). We also asked how a plain Newton–Raphson, started from the pre-outage AC solution and stopped after 1 or 2 steps, does on the same states. On the IEEE 118 it is more accurate than the authors' GENCO checkpoint and cheaper on CPU: mean loading error 0.06 points after one step and 0.004 after two (GENCO 0.11, DC 2.96), 93% of the lines at 100% or more found with one step (GENCO 56%), about 1.5 ms per scenario against about 20 ms. As a plan verifier, one step falsely approves 7 of 173 insufficient plans at 100% and two steps none (GENCO 17). So in our data GENCO's edge is over the DC approximation, not over a warm-started Newton. This is a limited test: one network, single-line outages and plans close to the base case, CPU only (we have no GPU, so we could not test GENCO batched on one), and not N-k or clustered outages, where a few Newton steps can fail. Details: docs/GENCO_COMPARADOR_NEWTON.md.
Honest limits
- GENCO does not replace the AC. Every plan shown is AC-confirmed.
- Not faster on CPU in our tests: 30.4 ms per scenario for GENCO against 8.0 ms for our AC and 0.5 ms for DC on IEEE 118 (scale study; in the N-1 sweep run the video quotes it was 20.5 against 15.0 ms); GPU not tested (we have no GPU).
- A warm-started Newton–Raphson beat the authors' checkpoint on the IEEE 118 for single-line outages and for the plans we vet (item 6). We could not test the cases where GENCO might do better: N-k outages far from the base case, larger networks, GPU.
- It stops helping at scale: on GOC 500, 2,000 and 10,000 buses its error is about the DC's or worse (10,000: 2.95 vs 2.47 points).
- GENCO never saw shedding or redispatch in training; the 99% threshold was first chosen on the same data (a held-out re-check is in item 2 of the results), mainly on the IEEE 118 (the IEEE 30 and 57 have few insufficient plans) and one seed.
- The GENCO view exists for the intact network and single-line outages without islanding; voltage setting only for IEEE 118; repair times are synthetic.
- The dataset behind our N-10 model is not published (
configs/data_case118_grande.yaml, seed 42); the model is in the repository.
Relation to other entries
Several entries pair GENCO with a classical solver, and we read them as complementary. #7 (Trust, but verify) wraps GENCO in a Newton–Raphson check for N-k contingency screening and shows that GENCO under-reacts to system-wide stress. #8 (predict the change, not the state) uses GENCO's predicted change as the start of one Newton step and also finds no wall-clock gain on CPU; our own baseline (item 6) points the same way, since a Newton step from the base case was already hard to beat on the IEEE 118. We keep the exact solver as the final decision-maker too, but the object we check is different: a corrective plan (redispatch and load shedding) after single-line outages, where GENCO's approval is only a pre-filter before the AC confirmation. #15 (reliability and extreme scenarios) and #11 (a test split that overlaps the checkpoint's training data) are reminders of what we flag in our own limits: our 99% verifier threshold was first chosen on the same data, so we re-checked it on held-out outages (results, item 2), as #7 and #8 do with frozen cases.
Conclusion and next steps
The contribution is the tool: a way to bring GENCO's outputs to an operator (ranking, plan vetting, voltages) with the exact solver confirming everything. In our data GENCO is close to the AC where it was trained and much better than DC at ranking and at vetting plans, and harmless when the AC keeps the last word; it did not beat a warm-started Newton–Raphson on the IEEE 118, and we could not test it on a GPU or on N-k outages. Next steps: run GENCO live in the backend and host the full tool online (today the demo is a replay), extend the voltage setting to the repair sequence and to IEEE 14, 30 and 57 (which needs OPF checkpoints), and validate the verifier threshold on held-out data, more networks and more seeds.
Links to code, models and data
All in https://github.com/Prof-Pissinati/genco-corrective-response: code and scripts; the authors' checkpoints (unchanged, see Credits) and our own N-10 exploration checkpoint in models/case118_genco_tiny_n10/; the PGLib test cases and the precomputed results behind the demo in interface/src/data/. To reproduce and trace every figure: README.md, docs/FIGURES.md (data, script and protocol of each figure), docs/NUMBERS.md; figures in docs/figures/.
Credits: what is not ours
GENCO and the OpenGridFM tools are the work of others: A. Puech et al., GENCO – A Unified Neural Solver Embedded in a Development Framework for Steady-State Grid Analysis, arXiv:2608.09921, and gridfm-datakit-v1, arXiv:2512.14658, with gridfm-graphkit and gridfm-datakit (https://github.com/gridfm, Apache-2.0), used as dependencies. The checkpoints are used as published, unchanged (SHA-256 in models/*_autores/): GENCO Tiny for IEEE 14, 30, 57, 118 and GOC 500, 2,000, 10,000 (https://huggingface.co/gridfm/genco-pf-datakit) and GENCO-OPF Small for IEEE 118 (https://huggingface.co/gridfm/genco-opf-datakit).
Also third-party: the PGLib-OPF v23.07 cases (IEEE PES Power Grid Library, CC BY 4.0; arXiv:1908.02788), PowerModels.jl (AC-OPF base dispatch), HiGHS (corrective LP), pandapower (validation), FastAPI, NumPy, SciPy, React and Vite. The interface grew out of an earlier power simulator by one of the authors (a private repository, see interface/ORIGEM.md). Full list: NOTICE.md.
Ours: the backend (sparse AC power flow, corrective LP, N-1 screening, repair simulation, voltage loop), the interface and demo, the three uses of GENCO and their evaluation, the scripts and figures. Fault lists and repair times are synthetic. Code Apache-2.0; texts and figures CC BY 4.0. Thank you to the GridFM team and the organizers.











