WorksEngineering
A Rollout-Based Approach to Real-Time Topology and Dispatch Control in the AI4RealNet L2RPN Benchmark
Abstract
Operating transmission networks under uncertain outages requires coordinating discrete network topology actions with continuous adjustments to generation and storage, while respecting operational constraints and real-time computational limits. We present a rollout-based controller that combines discrete and continuous decisions under the uncertain contingency policy of the L2RPN AI4RealNet 2026 challenge. Power-flow approximations and convex optimization identify the most promising actions, followed by short-horizon simulations to predict their effect on congestion, renewable curtailment, and redispatching costs. A further policy exploits the benchmark's specific attack protocol: keeping selected lines disconnected prevents some adversarial outages from being initiated. On the benchmark's -bus network, the controller completed of final-test scenarios (score ) and achieved the second-best ratio of score to computation time among the five top-ranked entries, behind one that scored lower. Our results show that combining structured optimization with simulation-based action selection is effective even without a learned decision rule, and fast enough for real-time control. Code and reproduction material: https://github.com/DavidKrame/RAD_agent__AI4RealNet_competition.
Introduction
Reliable operation of transmission networks requires accommodating changes in generation, demand, and line availability. Wind and solar output fluctuate with the weather, planned maintenance takes generating units and lines out of service, and sudden outages caused by extreme weather, equipment failures, or deliberate attacks disconnect lines and often require immediate action. Each change redistributes the power flow and can overload the remaining network, triggering further disconnections. The control problem is sustaining electricity supply through anticipated and sudden disruptions while limiting operating costs and curtailment of renewables.
Operators can relieve congestion by changing the network topology, redispatching generators, curtailing renewable production, or storing energy. These controls interact: a topology change redistributes power flow across the network, and a dispatch decision affects both present congestion and later decisions. The difficulty is to combine a combinatorially large set of topology actions with continuous decisions, while an overloaded network leaves little time to compute, because corrective actions must come before the disruption spreads and leads to blackouts.
Existing work offers various approaches to operating transmission networks. Security-constrained optimal power flow aims to coordinate preventive and corrective decisions across specified contingencies. Its computational challenges include contingency selection, discrete controls, and uncertainty [1]. Optimal transmission switching couples generation dispatch and line switching [2]. These formulations establish the value of coordinated control, but their computational demands can make them difficult to solve repeatedly when rapid intervention is required. This motivates reinforcement learning (RL) approaches, which learn control policies offline that can be evaluated quickly during operation, see for instance [3]. Representative approaches use hierarchical actor-critic policies [4] or AlphaZero-based search combined with redispatch [5], see also van der Sar et al. [ [6] for a wider literature review. Adversarial training has also been used to improve performance under line outages [7].
Established methods also support control without a learned decision rule. For instance, Marot et al. [ [8] demonstrated topology-based congestion relief using an expert system. Line outage distribution factors (LODFs) are standard tools for approximating flow changes [9], also used as inputs to learned graph-based control [10], and rollout policies provide an established framework for comparing actions through simulated continuations [11]. Combining topology search with continuous optimization already has strong precedents. The LJN agent, derived from the winning 2023 IDF entry, combines topology management, continuous control, and operational heuristics [12]. Its continuous-control component builds on OptimCVXPY, which optimizes redispatch, curtailment, and storage under a DC approximation [RTE France, 2023].
Building on these approaches, we focus on coordinating the controls through a common short-horizon cost, together with preventive decisions whose effects are assessed separately. We develop this controller for the L2RPN AI4RealNet 2026 challenge. The controller uses a short-horizon forward simulation to guide the selection of appropriate actions. Candidate topology and dispatch actions are generated by a combination of using topology libraries, sensitivity screening, and convex optimization. Their predicted effects are then evaluated through AC forward simulation under a common objective that accounts for congestion, renewable curtailment, and redispatch costs, following the rollout principle of Bertsekas [ [11]. Additional mechanisms address risks that the short horizon does not capture. Specifically, we:
Specify a controller that ranks and combines topology and continuous-control candidates using predicted congestion, curtailment, and redispatch costs.
Propose a convex dispatch program that uses observed AC flows as initial conditions for a DC approximation, with generator-specific ramp bounds, together with a set of rules for scheduled outage preparation and preservation of downward redispatch margins.
Design and evaluate a preventive withholding policy that reduces attack exposure by keeping selected lines disconnected. Its effect depends explicitly on the benchmark rule that cancels an attack attempt when an attackable line in that region is already out of service.
The remainder of the paper is organized as follows. Section 2 defines the model and the control problem. Section 3 builds the controller. Section 4 reports the numerical results. Section 5 discusses the limitations and concludes.
Model
Let a network consist of buses , which can be partitioned into disjoint control regions , and (possibly parallel) lines , where has endpoints . We observe the network over a finite discrete-time horizon , indexed by timesteps . Line has status , with when in service. It carries an active power flow and its thermal limit defines its loading , where we write . A substation with connected elements can be split across two busbars by an assignment , which redistributes flow among its lines without changing any continuous control (Figure 2, Appendix § 7).

Figure 2. Node-breaker model of a four-element substation. (a) Nominal configuration: all elements share one electrical node. (b) A topology action opens the bus coupler and reassigns generator G and line L3 to the second bus, changing the network’s effective graph without any redispatch, curtailment, or storage action.
An action is represented by a tuple, , where specifies the busbar assignments, specifies line connections or disconnections. The tuple specifies the continuous controls: the redispatch of dispatchable generators , the curtailment of renewable units , and the power of storage units , positive when charging.
A generator with output , and ramp limits has one-step ramp margins
We write for the no-op (do-nothing action) and for the action that applies and then within the same step, as the action sum of the Grid2Op platform does [14]. An action is topology free if it changes neither a busbar assignment nor a line status. A line or substation that was just acted on cannot be acted on again during a cooldown of three steps in the benchmark.
Assumption 1 (Regional action limit). At most one substation reconfiguration and, independently, at most one line connection or disconnection may be applied per control region per step.
We impose this limit to match the AI4RealNet challenge’s admissibility rules. They permit simultaneous operations in different regions, as well as one substation reconfiguration and one line operation within the same region.
Each line has an overload counter , which counts the consecutive steps during which and resets to zero when . A line trips when exceeds an allowance . Additionally, a line is disconnected immediately when its loading exceeds a hard threshold, (Figure 3, Appendix § 7).
Figure 3. Thermal overload protection as a state diagram. A sustained overload is tolerated for up to consecutive steps before a trip. An overload above the hard threshold trips the line immediately from either state, regardless of .
Unannounced outages are generated by the benchmark’s regional opponent. Region has a set of attackable lines, and . At reset, each region draws a hidden schedule of attack occurrences. Idle times are geometrically distributed with mean 30 hours and durations have mean 2 hours, so that occurrences are nominally 32 hours apart. A region’s opponent is called only when none of its own attacks is in progress. At such a call, an overdue occurrence is consumed. If every line of is in service, a target is proposed with probability proportional to , where ranks the lines from least to most loaded. If any line of is out of service, the attempt is aborted and the countdown is not reset, so each subsequent call consumes a further occurrence until the schedule is empty. A proposal can still be rejected by the benchmark’s duration and budget checks. An accepted attack is called realized.
At decision step , the controller observes , which contains the topology, flows, loadings, dispatch state, counters, cooldowns, a deterministic forecast of loads and renewable output over the next hour, and the steps before the next scheduled outage, that cannot be prevented or canceled, of each line . It compares candidate actions with a forward simulation model initialized from observation . For each candidate action , it simulates applying once and following the no-op policy thereafter, i.e., and, for , , where is the simulated state of the network steps ahead. It uses forecast injections and AC power flow, applies the overload protection, but excludes the stochastic contingency process. We write , , and for the corresponding quantities in any observed or simulated state .
An episode is completed if the controller successfully survives all time steps. It terminates early if the simulator reports a backend failure, e.g., no feasible solution for the AC power flow or an infeasible redispatch, indicating an inability to satisfy generator output limits, ramp limits, and power balance simultaneously. The controller is evaluated by the score of a scenario, , with . The operation score decreases with the normalized operating cost, which counts losses, flexibility, and the blackout cost after an early end; it is for immediate failure, for the no-op, and for a policy that only reconnects lines on a network without overload protection. The low-carbon score increases with the share of available renewable energy that is used.
Control Architecture
This section builds the controller from its components and assembles them into the control law in § 3.6. The controller evaluates candidate actions by AC forward simulation and proposes some of them with linear sensitivity factors. Appendix § 8 lists the main symbols and parameter values.
Network sensitivity factors
The linear sensitivity factors rest on the DC approximation of the power flow [15], which neglects reactive power, voltage variation, and losses. Under this approximation and for a fixed topology, the active power flows are linear in the net injections at the buses, that is, generation minus consumption. Two standard factors follow from this linear model [9].
The power-transfer distribution factor (PTDF) is the change of the flow on line when one unit of power is injected at bus and withdrawn at a fixed reference bus. These factors form the matrix . By linearity, a change of the injections that sums to zero changes the flows by times that change. The dispatch program of § 3.3 uses this relation.
The line-outage distribution factor (LODF) is the change of the flow on line when line is removed, per unit of the flow that carried. Given ,
where is the flow on line after the removal. The denominator vanishes exactly when is a bridge, a line whose removal splits the network. The line-opening screen of § 3.4 and the dispatch program of § 3.3 use these factors. Candidates proposed with either factor are then checked with the AC forward model of § 2.
Evaluation of an action
We evaluate each action over decision steps, corresponding to 10 minutes in the benchmark. The two functions below evaluate an action at on the simulated states of § 2. Both equal if a simulated step ends the episode. The first function is the peak loading,
The second function depends on a state cost. With , an overload weight , and a counter weight , the cost of a state is
The first sum rewards spare capacity, so candidates without overload are still ranked. The second penalizes overload with the large weight , increased up to times as a line’s counter approaches its allowance. The cost-to-go approximation is
where are weights, is the curtailed share of renewable potential, is the standing redispatch weighted by normalized generator costs , and marks an uncongested network. A small tolerance defines strict improvement in .
Convex dispatch subproblem
For a fixed topology, the continuous controls , , and enter the flows linearly through the PTDF matrix of § 3.1, so the joint decision is a convex quadratic program. Let be the observed AC flows, the active power that corresponds to the thermal limit at the observed operating point, and the maps from generators, renewable units, and storage units to the first busbar of their substation. The program is
with the predicted flows, the ramp margins ((1)), the renewable outputs, the storage power limits, the slacks of the two limits, the weights, the target loading, and the monitored lines. The set secures scheduled outages: it pairs each line such that for the span before its next scheduled outage (§ 2) and a window , with the lines whose post-outage flow predicted by (2) exceeds their limit, . The weights satisfy . Overload relief therefore comes first, redispatch and storage are cheap, and relaxing a security limit costs less than curtailing to meet it. Constraint (7) anchors the flow to the observed AC flows and uses only for the change the controls cause. The bounds (8) keep each generator’s request within its own ramp margin. The controller also uses OptimCVXPY [RTE France, 2023], a DC optimal power flow over redispatch, curtailment, and storage (§ 3.4 and § 3.6). Unlike the program above, it computes base flows from the DC approximation and decides per bus rather than per generator. The program is solved when . Its solution , with set points clamped to their limits, is kept only if , for a tolerance .
Candidate generation and composition
The candidate search runs when the forecast peak loading is high (§ 3.6). It targets the congested lines , or the three most loaded lines if this set is empty. It builds a set of topology actions for each region containing such a line, and one set of continuous actions. Note that all candidates satisfy Assumption 1 and three sources feed .
Algorithm 1: Preventive withholding policy
Input: observation , withheld set , relief action of the control law (§ 3.6)
if and then disconnect every line in
if changes no line status and then return
else return
end
end
if then do not reconnect any line that is the only disconnected line of its set
end
(i) The offline library of single-substation bus assignments that relieved stressed states in simulation, limited to the substations of region at the ends of congested lines and to the six substations with the most connected elements.
(ii) A local pool of configurations with one to three elements on the second busbar and all others on the first, at the same substations and the neighbors of the most loaded line (Appendix § 9). A second run of the whole search uses this pool instead of the library, and its result is played only if its is at least below that of the first.
(iii) At most three line openings, ranked by the peak loading predicted after the opening, with , where is given by ((2)) applied to the observed flows , and is the observed line-to-line voltage of the three-phase network, so that is the thermal limit in MW at unit power factor (Appendix § 9). Line is kept only if . Bridges, lines under cooldown, and withheld lines are excluded.
The continuous set includes ramp-limited redispatch steps, storage charging and discharging, curtailment near the most-loaded lines, OptimCVXPY when , and the dispatch solution of § 3.3. With , the search starts from . If , the search returns , provided that . Otherwise, it returns the first fallback whose simulated trajectory survives the horizon (Appendix § 9).
The search combines with the best actions of the other regions and with the best continuous action. Let be the best element of under , and the best element of . The search visits the regions not used by by increasing and accumulates the actions: starting from , it sets , first for in each region visited, then for if it is topology free and differs from , whenever . The composed action satisfies Assumption 1: each region contributes at most one element of , and is topology free.
Preventive contingency-exposure reduction
Under the benchmark protocol, no new adversarial outage is initiated in region if any line of is out of service. This motivates holding one line out of service in each region. Each is chosen offline as the line with the lowest mean (measured over representative states) of the simulated peak post-disconnection loading, among the lines whose removal keeps the network connected and makes no other line of a bridge.
Algorithm 1 applies with two loading thresholds, , for opening the withheld lines and for holding their reconnection. The action that opens the withheld lines is triggered by the loading threshold alone. It is neither ranked by nor checked by simulation, so it may be played even when removing a withheld line is unsafe. Table 1 measures its net effect, including this risk.
| controller | completed | lost | gained | backend | infeasible | |
| full controller | 706 | 51 | 7 | |||
| without the dispatch program (§3.3) | 682 | 43 | 19 | 0.003 | 68 | 14 |
| without OptimCVXPY, all uses (§3.3) | 631 | 89 | 14 | 115 | 17 | |
| without secured outages (§3.3) | 700 | 11 | 5 | 0.21 | 56 | 8 |
| without the local pool (§3.4) | 689 | 42 | 25 | 0.050 | 64 | 11 |
| without LODF line openings (§3.4) | 702 | 8 | 4 | 0.39 | 52 | 10 |
| without opening withheld lines (§3.5) | 679 | 60 | 33 | 0.007 | 77 | 8 |
| without the scheduled-outage look-ahead (§3.6) | 689 | 23 | 6 | 0.002 | 69 | 6 |
| without margin preservation (§3.6) | 697 | 34 | 25 | 0.30 | 54 | 13 |
| without the extended-horizon safeguard (§3.6) | 688 | 34 | 16 | 0.015 | 65 | 11 |
| reference: no-op | 152 | 612 | 0 | |||
| reference: reconnection only | 92 | 672 | 0 | |||
| reference: OptimCVXPY alone | 70 | 209 | 485 |
Table 1. Paired runs on 764 local scenarios; each middle row removes one component. Lost and gained count the scenarios completed only with and only without the component, and is the exact two-sided McNemar test. The last two columns count failures by end cause; one more run without OptimCVXPY ended on an illegal action.
Like , several other parameters of the controller are set offline from the training scenarios (the loading thresholds of Table 3, the library , and the offline record of preparatory actions of § 3.6). When new data become available, as in the challenge’s retraining step, the controller tests an alternative set of these parameters against the incumbent on the same scenarios and accepts it only if the paired score gain is significant (Appendix § 10). In the submitted controller, only is retested, against one alternative .
| symbol | value | use | symbol | value | use |
| 2 | evaluation horizon | 0.90 | comfortable regime | ||
| 8 | safeguard horizon | 1.30 | candidate search | ||
| 200 | overload weight in | 1.20 | last resort | ||
| 4 | counter weight in | 0.99 | congested lines | ||
| 0.05 | curtailment in | 0.95 | dispatch program | ||
| 0.1 | redispatch cost in | 0.95 | open withheld lines | ||
| strict improvement in | 1.00 | hold reconnections | |||
| dispatch acceptance | 1.30 | outage severity | |||
| 0.01 | library screening | 12 | look-ahead window | ||
| 0.07 | local pool acceptance | 48 | secured outages | ||
| 1000, 50, 5 | program weights | 5 MW | margin preservation | ||
| 0.03, 0.1 | program weights | 0.05, 1, 10 | revalidation | ||
| 3, 2 | protection | 3, (6, 10, 6) | regions | ||
| cooldown | 3 steps | line and substation | one week | five-minute steps |
Table 3. Parameter values.
Safeguards and control law
The scheduled-outage look-ahead prepares the network for announced outages. Let be the in-service line with the nearest announced outage within steps, and let be the action that disconnects . Once per line and episode, the controller simulates , the outage applied now. If the simulated step does not end the episode and keeps below , nothing is done. Otherwise the controller applies a preparatory action, a posture, taken from an offline record of postures that survived this outage when one exists, and from its own candidates otherwise (Algorithm 2, Appendix § 11).
Margin preservation protects the downward room of the fleet, , with from (1). Returning redispatch to the economic set point can leave units at their minimum, where . On the 764 local runs, at the end of an episode is lower in infeasible redispatch failures than in completed episodes (medians 79 and 151 MW), whereas the peak loading is not. Before that return, when , the controller shifts output from units with full downward room to units near their minimum, at zero net change (Appendix § 11).
The extended-horizon safeguard checks the action of reactive control (§ 3.6) over a longer horizon , with the number of steps, up to , that followed by no-ops survives in simulation. When , some counter is positive, and , it ranks and the topology candidates of the overloaded regions by , with ties broken by lower peak loading, and plays the best one only if it survives longer than both and (Appendix § 11).
Figure 1 assembles these components into one control cycle. Reactive control either applies a guarded-line rule for two lines of the credible set (Appendix § 9) or combines a relief action with a reconnection .
Figure 1. One control cycle. The scheduled-outage look-ahead and preventive withholding can end the cycle early. Otherwise, reactive control computes an action, which the extended-horizon safeguard may replace.
The relief action depends on the operating regime. In the comfortable regime, , it is housekeeping. Above , it is preventive dispatch or while the forecast peak loading of the no-op stays below a threshold , (the preventive regime), and the result of the candidate search (§ 3.4) otherwise.
Housekeeping lifts curtailment, sends a storage request, preserves ramp margin (§ 3.6), and returns redispatch toward its economic set point, each only if the forecast stays at or below . Preventive dispatch tries OptimCVXPY on the current state, then on the state after the most likely contingency, each under a forecast check (Appendix § 9). A comfortable state goes to the candidate search if an outage is announced inside the forecast horizon and . The dispatch solution of § 3.3 replaces whenever its peak loading is lower by more than . The reconnection is the recoverable line with the lowest one-step peak loading, kept if that loading is no worse than the no-op’s within a small tolerance. Reactive control returns the element of with the lowest .
Numerical Results
We validate on the L2RPN AI4RealNet environment, built on the Grid2Op platform ([14]) and derived from the L2RPN IDF 2023 edition of the same benchmark family ([16]). The underlying network is a 118-bus system with 186 lines and 62 generators, simulated in five-minute steps over one week, with a credible set of 22 lines in three regions.
Local ablations. We switch off one component at a time in the submitted code and run each variant on the same 764 local scenarios and seeds (Table 1). These runs recompute the sensitivity factors for the current topology at each step. On the challenge platform, the code recomputed them from an environment object that the platform does not step, so they remained those of the initial topology. The seeds fix the attack schedules, but which attacks are realized depends on the controller’s actions (§ 2), so each row measures the total effect of a component under this attack protocol. The table also reports three reference controllers: the no-op, a policy that only reconnects lines, and OptimCVXPY alone with its published settings. The configurations and per-scenario records of all runs in Table 1, and the script that produces it, are in the code repository.
Six components raise the number of completed scenarios at , and secured outages and LODF line openings have no detectable effect. With the dispatch program, infeasible redispatch failures fall from 14 to 7. OptimCVXPY alone completes only 70 scenarios, most of them failing on infeasible redispatch, whereas inside the controller its proposals are played only after a simulated check. Switching off the opening of withheld lines, the first branch of Algorithm 1, leaves the reconnection hold active and raises the realized attacks from 62 to 2,378, as the contingency model predicts (§ 2). These numbers measure exposure, not how well the controller withstands an attack. Reconnection alone completes fewer scenarios than the no-op and faces more realized attacks (3,513 against 1,226), since reconnecting an attackable line makes its region attackable again. The look-ahead acts in only 68 episodes, and switching it off changes the length or end cause of 47 of them and the completion of 29. Margin preservation is inconclusive: without it, 11 episodes end in infeasible redispatch that do not with it, against 5 in the other direction ().
Challenge evaluation. We used the challenge both to develop the controller and to test it. In its validation phase, 33 evaluations of 14 agent variants across 208 unseen scenarios determined which mechanisms were retained. The retraining step applies the revalidation rule in (8) to 10 scenarios from the training data provided by the challenge. During validation, the alternative withheld set led the incumbent by 16.5 points on these scenarios and was accepted, and the validation score rose by 0.78, within noise (paired ). In the final test phase, trailed by 4.2 points, and the incumbent was kept. The submitted controller completed 184 of 208 validation episodes (score 72.93) and 189 of 208 on the sequestered final test set (score 64.39). The final phase had more completions but a lower normalized score; we have not yet isolated the cause. On the evaluation leaderboard, the agent had the second-best ratio of score to computation time among the five top-ranked entries (72.93 in 17,384 s of total agent time, against 6,744 to 57,763 s for the other four). In both phases, 99% of decisions took less than 0.77 s, and the slowest took 10.2 s, for five-minute steps.
Learned alternatives. Earlier versions of the controller tested learned components at three points: a proposer that adds candidate actions, a value function that ranks them, and a direct policy that selects actions without the rollout comparison. The proposer improved the score by less than the evaluation set could detect, the best value function only tied the hand-designed ranking, and the direct policy performed worse after training than before. We trained value functions to predict survival after contingencies 40–200 steps ahead, well beyond , and linear and gradient-boosted classifiers fitted to these survival labels ranked the candidates of a state with an area under the ROC curve of only 0.57 to 0.61, against 0.5 for a random ranking. These results concern the tested models, features, and labels, not learned control in general.
Discussion and Conclusion
This study shows that structured optimization and short-horizon simulation can coordinate topology and dispatch control. On the 2026 AI4RealNet challenge, the controller completed 189 of 208 held-out test scenarios. In paired ablations, six components each increased completions, among them the opening of withheld lines and the scheduled-outage look-ahead. The effect of margin preservation was inconclusive. These results show the value of anticipating disruptions and keeping control options for later, alongside immediate congestion relief.
The controller searches a restricted set of actions, so it can miss better ones, and its forward simulations ignore unannounced outages (attacks). Preventive withholding reduces attacks because of a benchmark rule: an attack attempt in a region is canceled when one of its attackable lines is already disconnected. An attacker that can target another line could instead exploit the redundancy lost by withholding. We tested a single network under a single attack protocol, so other networks and comparisons with similar controllers are needed to show whether the results transfer.
A natural next step is to replace the fixed attack protocol with adversaries that have explicit objectives, information, and resources, such as an attacker who adapts its timing and targets to maximize supply interruptions or operating costs. Attacker–defender models of grid protection [17], extended over repeated control steps, provide a starting point.
Reinforcement learning is a complementary extension to consider, although the learned components of § 4 showed no statistically detectable benefit. A learned proposer could explore beyond the topology libraries, with optimization determining continuous controls and simulation evaluating proposals. Training against several adversaries would test whether learning improves adaptation, measured by completion, operating cost, and decision latency under matched conditions. The broader opportunity is to expand the actions the controller can discover while retaining explicit evaluation of their operational consequences.
Generative AI Use
During the preparation of this manuscript, the authors used Claude (Opus 5.5, Anthropic) and ChatGPT (GPT-6.1 Sol, OpenAI) to assist with coding and experimental implementation, literature search, and drafting and editing parts of the manuscript. The authors reviewed and verified all AI-assisted content and take full responsibility for the content of the paper.
Acknowledgments
D. Krame Kadurha, R. van der Burg and A. Zocca are supported by the NWO VI.Vidi.233.247 grant Power Network Optimization in the Age of Climate Extremes https://doi.org/10.61686/GO0EL09973.
Appendices
Network Model Illustrations
Figures 2 and 3 illustrate two parts of the model of § 2: the substation model, and the line protection as a state diagram with three states: normal, overloaded, and tripped.
Notation and Parameter Values
Table 2 lists the main symbols of the paper, and Table 3 the parameter values of the submitted controller and of the benchmark.
| symbol | meaning |
| buses, lines, and their numbers | |
| buses and attackable lines of region , number of regions | |
| dispatchable generators, renewable units, storage units | |
| status, active flow, current, thermal limit, loading, largest loading | |
| overflow counter, its allowance, immediate trip threshold | |
| steps before the next scheduled outage of line | |
| PTDF, LODF | |
| redispatch, curtailment, storage power (positive when charging) | |
| generator output, downward and upward ramp margins, ramp limits | |
| observation, applied action, no-op, application in the same step | |
| forward model, simulated state steps after | |
| peak loading, cost-to-go, state cost, curtailed share, standing redispatch | |
| simulated survival over the horizon | |
| regional and continuous candidate sets, their union, best single, composed action | |
| relief, reconnection, dispatch solution, withholding, scheduled disconnection | |
| screen score of line , thermal limit converted to MW at unit power factor | |
| thermal limit converted to MW at the observed power factor | |
| monitored lines, secured outage pairs, and their slacks | |
| withheld line of region , withheld set, fleet downward capacity |
Table 2. Symbols.
The withheld set of the submitted controller is , and the alternative tested by the rule (8) is . The library holds 907 assignments at 40 substations. The offline record of Algorithm 2 holds 246 assignments of substation 79 for the outage of line 175. The set is limited to its 40 most violated pairs.
Reactive Control and Candidate Generation Details
This appendix completes § 3.6 and § 3.4. Every candidate is filtered by Assumption 1 and by cooldowns before being evaluated.
Guarded-line rule. For two lines of the credible set whose removal was found to be especially dangerous, a library holds one bus assignment validated offline. The rule arms that posture when the line is in service, its loading lies in , , it is the most loaded in-service line of its region’s , and the forward model shows no termination and a peak loading of at most 1.55. The controller then plays a while the posture is held. It restores the earlier assignment once the line’s loading stays below 0.88 for two steps, or after eight steps if it is below 0.88 then, and it yields to reactive control if .
Housekeeping. In the comfortable regime (§ 3.6), the controller first looks for curtailment worth lifting, when more than 2% of renewable potential is curtailed, and takes the largest lift that the forecast allows and that keeps the added renewable output at least 30 MW below the fleet’s downward capacity of § 3.6. If it finds one, it adds one ramp-limited step of redispatch toward the economic set point if the forecast allows it, and returns. Otherwise it takes as a base action a request, for each storage unit that is not full, of a power equal to its absorption limit, sent with the sign that Grid2Op executes as discharging, if renewable output is at least 60% of capacity on average, or else . It then adds margin preservation (§ 3.6) if available, or else the step of redispatch.
Preventive dispatch. In the preventive regime (§ 3.6), the controller tries three actions in order. (i) If , the OptimCVXPY solution, played if it lowers below . (ii) An anticipatory action: if removing the most loaded in-service line of , the most likely target, gives a one-step peak loading above 1.7 without termination, the same program is solved on that simulated state, and the solution is played if the one-step forecast from shows no termination and a peak loading of at most . After this action, the same path stays inactive for the next eight steps outside the comfortable regime. (iii) If and a counter is positive, the same program is solved again and played if the one-step peak loading falls below . If none applies, the action is .
Offline library of bus assignments. The library of single-substation bus assignments is built offline. (i) For every substation with at least four connected elements, the assignments are enumerated, or randomly sampled for substations with too many assignments to enumerate. (ii) Each assignment is evaluated by one-step forward simulation on a set of stressed states, with . (iii) An assignment is retained only if, on at least one such state, it causes no termination and lowers the peak loading by more than against the no-op. At most 60 assignments per substation are kept, ranked by the number of states they help.
State-dependent local pool. For each region and observation , the pool of § 3.4 is built at decision time in three steps. (i) The substations are those of region at the ends of the congested lines , the hubs of region (among the six substations of the network with the most connected elements), and the neighbors in region of the endpoints of the most loaded line. (ii) Substations under cooldown are removed from . (iii) The pool holds every configuration of a substation of with one or two elements on the second busbar and all others on the first. At the endpoint of the most loaded line with more elements, if it has at most ten, it also holds the configurations with three elements on the second busbar.
LODF-screened voluntary disconnections. The lines kept by the screen of § 3.4 are taken in ascending order of , at most three, and added to the pool of the first congested region.
Continuous templates and last resort. The templates of are a step at the ramp limit of each generator in each direction, the maximum charge and discharge of each storage unit and of all units together, filtered by state of charge, and curtailment at four levels on the renewable units near the most loaded lines. The last resort tries the redispatch and storage templates, then local curtailment, then curtailment of all renewable units, and returns the first tier with a candidate that survives the horizon.
Limit used by the line-opening screen. Like of § 3.3, of § 3.4 expresses the thermal limit in MW, with in kV and in kA, but at unit power factor instead of the observed one. The screen needs this form because it evaluates every line after an opening, including lines that carry no flow now, for which is , whereas is defined for every line.
Revalidation of Fitted Parameters
The parameters set offline in § 3.5, included, are denoted by . The parameters that depend most on the data may not suit scenarios that follow a completely new distribution, so when new data become available, as in the challenge’s retraining step, the controller tests an alternative against the incumbent on the same scenarios. Let be the score of minus the score of on scenario , with mean and sample standard deviation . The alternative is accepted only if
where is the number of alternatives, the family-wise level, and the upper quantile of the standard normal distribution, a normal approximation to the paired test. At most one change is accepted, and any error or inconclusive result keeps the incumbent. The test adapts to the time available: is the number of scenarios on which the incumbent and the alternatives can be scored within the time reserved for the test. In the submitted controller, contains only the withheld set , with one alternative (Appendix § 8), and one hour reserved for the test gave . § 4 reports both applications of this rule in the challenge, but the rule extends to all parameters in , given enough computation time for training.
Safeguard Details
Scheduled-outage look-ahead. Algorithm 2 states the look-ahead of § 3.6. It runs before the other stages of the control law, once for each line whose announced outage enters the window .
The record is built offline by playing substation configurations through each scheduled outage in historical scenarios and keeping those observed to survive it. The controller prefers the record to the run-time forecast. For this class of event, ranking postures by their forecast post-outage loading favored configurations that later failed, because whether an overload clears depends on the steps after the outage, which a one-step forecast does not see. The forecast-ranked fallback is weaker, but it lets the mechanism act on outages without a record. The mechanism applies only to contingencies whose time is known in advance, since the horizon of the forecast used elsewhere is too short to value a posture against a later disconnection.
Algorithm 2: Scheduled-outage look-ahead
Input: observation , line with not yet evaluated, severity threshold
if does not end the episode and then
return no posture
end
if an offline record of postures that survived the outage of exists then
if then
return the highest-ranked posture in
end
else
the topology candidates of the regions of the endpoints of , and OptimCVXPY
if then
return
end
end
return no posture
Margin preservation. Units less than one ramp step above their minimum raise their output, each by up to , and recover room. Units with lower their output by the same total. The shift is played if and . Let be the units that give output, and let the transferred power be
Each unit’s redispatch is its share of :
The increases and the decreases sum to zero, and each redispatch respects the ramp limit of its unit.
Extended-horizon safeguard. The horizon- evaluation of § 3.2 can miss a line held at mild overload, , for several steps without tripping. Within steps, a slow approach to the allowance can look no worse than a short excursion. The safeguard of § 3.6 takes as wider candidate set the action of reactive control and the topology candidates of the regions of the overloaded lines. It keeps the 20 with the lowest one-step peak loading and ranks them by , with ties broken by the lower peak loading over the horizon .
Computational Complexity and Deployment
One control cycle has three parts. It builds the candidate set , whose size grows with the number of controllable units through the continuous templates but does not depend on the number of buses once the library and the locality rules of § 3.4 are fixed. It simulates each candidate over the horizon , with one power-flow solve per step. It solves the quadratic program (6)–(9) a bounded number of times. A sparse Newton–Raphson AC power flow on buses costs per iteration with a sparse factorization and needs few iterations near a feasible operating point. The quadratic program has variables and constraints. It is convex, so an interior-point method solves it to any given accuracy in polynomial time. The dominant cost of one cycle is therefore
linear in the size of the candidate set and in the horizon, and polynomial in the number of buses through the power flow alone. In the challenge, the controller used 17,384 s of agent time for 208 one-week scenarios, about 84 s per scenario (§ 4).
Every decision can be reproduced offline from the same inputs, because each action is either produced by a deterministic rule or selected by comparing simulated trajectories. Deployment requires a state estimator that supplies at each step and a contingency list that supplies the credible set , as in security-constrained optimal power flow [1]. It also requires historical or simulated network states, from which the offline library of bus assignments of § 3.4 and the posture record of Algorithm 2 are built offline. Only these offline libraries depend on the network, and the same procedures rebuild them for another network.
References
- [1]Florin Capitanescu, Jose Luis Martinez Ramos, Patrick Panciatici, Daniel Kirschen, Alejandro Marano Marcolini, Ludovic Platbrood, and Louis Wehenkel. State-of-the-art, challenges, and future trends in security constrained optimal power flow. Electric Power Systems Research, 81(8):1731–1741, 2011. doi:10.1016/j.epsr.2011.04.003.DOI
- [2]Emily B. Fisher, Richard P. O’Neill, and Michael C. Ferris. Optimal transmission switching. IEEE Transactions on Power Systems, 23(3):1346–1355, 2008. doi:10.1109/TPWRS.2008.922256.DOI
- [3]Antoine Marot, Benjamin Donnot, Gabriel Dulac-Arnold, Adrian Kelly, Aidan O’Sullivan, Jan Viebahn, Mariette Awad, Isabelle Guyon, Patrick Panciatici, and Camilo Romero. Learning to run a power network challenge: a retrospective analysis. In Proceedings of the NeurIPS 2020 Competition and Demonstration Track, volume 133 of Proceedings of Machine Learning Research, pages 112–132, 2021. arXiv:2103.03104.arxiv.org/abs/2103.03104
- [4]Deunsol Yoon, Sunghoon Hong, Byung-Jun Lee, and Kee-Eung Kim. Winning the L2RPN challenge: Power grid management via Semi-Markov afterstate actor-critic. In International Conference on Learning Representations (ICLR), 2021.
- [5]Matthias Dorfer, Anton R. Fuxjäger, Kristian Kozak, Patrick M. Blies, and Marcel Wasserer. Power grid congestion management via topology optimization with AlphaZero. In NeurIPS Workshop on Reinforcement Learning for Real Life (RL4RealLife), 2022.arxiv.org/abs/2211.05612
- [6]Erica van der Sar, Alessandro Zocca, and Sandjai Bhulai. Optimizing power grid topologies with reinforcement learning: A survey of methods and challenges. Foundations and Trends in Electric Energy Systems, 9(1):1–119, 2025. arXiv:2504.08210.arxiv.org/abs/2504.08210
- [7]Loïc Omnes, Antoine Marot, and Benjamin Donnot. Adversarial training for a continuous robustness control problem in power systems. In IEEE Madrid PowerTech, 2021.arxiv.org/abs/2012.11390
- [8]Antoine Marot, Benjamin Donnot, Sami Tazi, and Patrick Panciatici. Expert system for topological remedial action discovery in smart grids. In Mediterranean Conference on Power Generation, Transmission, Distribution and Energy Conversion (MedPower 2018), 2018. doi:10.1049/cp.2018.1875.DOI
- [9]Allen J. Wood, Bruce F. Wollenberg, and Gerald B. Sheblé. Power Generation, Operation, and Control. Wiley-IEEE Press, 3 edition, 2013.
- [10]Adrian Degenkolb, Qiong Huang, and Benjamin Schäfer. A comparative study of graph representations for GNN-based power grid control in L2RPN. arXiv preprint arXiv:2609.02538, 2026.arxiv.org/abs/2609.02538
- [11]Dimitri P. Bertsekas. Reinforcement Learning and Optimal Control. Athena Scientific, 2019.
- [12]Jules Sintes and Van Tuan Dang. LJN agent - a modular agent for combined continuous control and topology management on large grid. https://github.com/lajavaness/l2rpn-2023-ljn-agent, 2024. La Javaness R&D, MPL-2.0.
- [14]Benjamin Donnot. Grid2Op: A testbed platform to model sequential decision making in power systems. https://github.com/Grid2op/grid2op, 2020.
- [15]Brian Stott, Jorge Jardim, and Ongun Alsac. DC power flow revisited. IEEE Transactions on Power Systems, 24(3): 1290–1300, 2009. doi:10.1109/TPWRS.2009.2021235.DOI
- [16]Adrien Pavão, Antoine Marot, Jules Sintes, Viktor Eriksson Möllerstedt, Laure Crochepierre, Karim Chaouache, Benjamin Donnot, Van Tuan Dang, and Isabelle Guyon. An challenge for safe and low-carbon power grid operation. Energy and AI, 22:100564, 2025. doi:10.1016/j.egyai.2025.100564.DOI
- [17]Wei Yuan, Long Zhao, and Bo Zeng. Optimal power grid protection through a defender–attacker–defender model. Reliability Engineering & System Safety, 121:83–89, 2014. ISSN 0951-8320.DOI

