betaFeedback

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 118118-bus network, the controller completed 189189 of 208208 final-test scenarios (score 64.3964.39) 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:

  1. Specify a controller that ranks and combines topology and continuous-control candidates using predicted congestion, curtailment, and redispatch costs.

  1. 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.

  1. 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 nn buses N={1,…,n}\mathcal{N} = \{1,\ldots,n\}, which can be partitioned into ZZ disjoint control regions N=N1∪…∪NZ\mathcal{N} = \mathcal{N}_1 \cup\ldots\cup\mathcal{N}_Z, and mm (possibly parallel) lines L={1,…,m}\mathcal{L} = \{1,\ldots,m\}, where ℓ∈L\ell\in\mathcal{L} has endpoints (iℓ,jℓ)∈N×N(i_\ell,j_\ell) \in\mathcal{N} \times\mathcal{N}. We observe the network over a finite discrete-time horizon TT, indexed by timesteps t∈{0,…,T−1}t \in\{0,\ldots,T-1\}. Line ℓ=(ℓi,ℓj)\ell= (\ell_i,\ell_j) has status yℓ∈{0,1}y_\ell\in\{0,1\}, with yℓ=1y_\ell= 1 when in service. It carries an active power flow fℓf_\ell and its thermal limit Iˉℓ\bar{I}_\ell defines its loading ρℓ=∣Iℓ∣/Iˉℓ\rho_\ell= |I_\ell|/\bar{I}_\ell, where we write ρmax⁡=max⁡ℓρℓ\rho_{\max} = \max_\ell\rho_\ell. A substation with dd connected elements can be split across two busbars by an assignment β∈{0,1}d\beta\in\{0,1\}^d, which redistributes flow among its lines without changing any continuous control (Figure 2, Appendix § 7).

Node-breaker model of a four-element substation, showing nominal and split configurations

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, a=(β,y,ΔPg,cr,su)a = (\beta,y,\Delta P_g,c_r,s_u), where β\beta specifies the busbar assignments, y∈{0,1}my \in\{0,1\}^m specifies line connections or disconnections. The tuple (ΔPg,cr,su)(\Delta P_g,c_r,s_u) specifies the continuous controls: the redispatch ΔPg\Delta P_g of dispatchable generators g∈G⊆Ng \in\mathcal{G} \subseteq\mathcal{N}, the curtailment cr≥0c_r \geq0 of renewable units r∈R⊆Nr \in\mathcal{R} \subseteq\mathcal{N}, and the power sus_u of storage units u∈U⊆Nu \in\mathcal{U} \subseteq\mathcal{N}, positive when charging.

A generator with output Pgmin⁡≤Pg≤Pgmax⁡P_g^{\min} \leq P_g \leq P_g^{\max}, and ramp limits Rg↓,Rg↑R_g^{\downarrow},R_g^{\uparrow} has one-step ramp margins

r‾g=min⁡(Pg−Pgmin⁡,Rg↓),r‾g=min⁡(Pgmax⁡−Pg,Rg↑).(1)\underline{r}_g = \min\left(P_g - P_g^{\min}, R_g^{\downarrow}\right), \qquad\overline{r}_g = \min\left(P_g^{\max} - P_g, R_g^{\uparrow}\right). \tag*{(1)}

We write a∅a^\varnothing for the no-op (do-nothing action) and a⊕a′a \oplus a' for the action that applies aa and then a′a' 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 κℓ\kappa_{\ell}, which counts the consecutive steps during which ρℓ>1\rho_{\ell} > 1 and resets to zero when ρℓ≤1\rho_{\ell} \le1. A line trips when κℓ\kappa_{\ell} exceeds an allowance κˉ\bar{\kappa}. Additionally, a line is disconnected immediately when its loading exceeds a hard threshold, ρℓ>ρhard>1\rho_{\ell} > \rho^{\mathrm{hard}} > 1 (Figure 3, Appendix § 7).

Figure 3. Thermal overload protection as a state diagram. A sustained overload is tolerated for up to κˉ\bar{\kappa} consecutive steps before a trip. An overload above the hard threshold ρhard\rho^{\mathrm{hard}} trips the line immediately from either state, regardless of κℓ\kappa_\ell.

Unannounced outages are generated by the benchmark’s regional opponent. Region zz has a set BzB_z of attackable lines, and B=⋃z=1ZBzB = \bigcup_{z=1}^{Z} B_z. 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 BzB_z is in service, a target is proposed with probability proportional to 4k/(∣Bz∣−1)4^{k/(|B_z|-1)}, where k∈{0,…,∣Bz∣−1}k \in\{0,\ldots,|B_z|-1\} ranks the lines from least to most loaded. If any line of BzB_z 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 t∈{0,…,T−1}t \in\{0,\ldots,T-1\}, the controller observes oto_t, 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 τℓ(ot)\tau_{\ell}(o_t) before the next scheduled outage, that cannot be prevented or canceled, of each line ℓ\ell. It compares candidate actions with a forward simulation model Γ\Gamma initialized from observation oto_t. For each candidate action aa, it simulates applying aa once and following the no-op policy thereafter, i.e., o1a=Γ(ot,a)o^a_1 = \Gamma(o_t,a) and, for h≥1h \ge1, oh+1a=Γ(oha,a∅)o^{a}_{h+1} = \Gamma(o^{a}_h,a^{\varnothing}), where ohao^{a}_h is the simulated state of the network hh steps ahead. It uses forecast injections and AC power flow, applies the overload protection, but excludes the stochastic contingency process. We write ρℓ(o)\rho_{\ell}(o), κℓ(o)\kappa_{\ell}(o), and ρmax⁡(o)\rho_{\max}(o) for the corresponding quantities in any observed or simulated state oo.

An episode is completed if the controller successfully survives all TT 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, 0.8Cop+0.2Clc0.8C_{\mathrm{op}} + 0.2C_{\mathrm{lc}}, with Cop,Clc∈[−100,100]C_{\mathrm{op}}, C_{\mathrm{lc}} \in[-100,100]. The operation score CopC_{\mathrm{op}} decreases with the normalized operating cost, which counts losses, flexibility, and the blackout cost after an early end; it is −100-100 for immediate failure, 00 for the no-op, and 8080 for a policy that only reconnects lines on a network without overload protection. The low-carbon score ClcC_{\mathrm{lc}} 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 ff 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) Φℓ,i\Phi_{\ell,i} is the change of the flow on line ℓ\ell when one unit of power is injected at bus ii and withdrawn at a fixed reference bus. These factors form the matrix Φ∈Rm×n\Phi\in\mathbb{R}^{m \times n}. By linearity, a change of the injections that sums to zero changes the flows by Φ\Phi times that change. The dispatch program of § 3.3 uses this relation.

The line-outage distribution factor (LODF) Lℓ,eL_{\ell,e} is the change of the flow on line ℓ\ell when line ee is removed, per unit of the flow fef_e that ee carried. Given e=(ie,je)e=(i_e,j_e),

Lℓ,e:=Φℓ,ie−Φℓ,je1−(Φe,ie−Φe,je),fℓ(e)=fℓ+Lℓ,efe,ℓ≠e,(2)L_{\ell,e} := \frac{\Phi_{\ell,i_e}-\Phi_{\ell,j_e}}{1-(\Phi_{e,i_e}-\Phi_{e,j_e})}, \qquad f_{\ell}^{(e)} = f_{\ell}+L_{\ell,e}f_e, \qquad\ell\ne e, \tag*{(2)}

where fℓ(e)f_{\ell}^{(e)} is the flow on line ℓ\ell after the removal. The denominator vanishes exactly when ee 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 Γ\Gamma of § 2.

Evaluation of an action

We evaluate each action over H=2H = 2 decision steps, corresponding to 10 minutes in the benchmark. The two functions below evaluate an action aa at oto_t on the simulated states o1a,…,oHao_1^a,\ldots,o_H^a of § 2. Both equal +∞+\infty if a simulated step ends the episode. The first function is the peak loading,

FH(ot,a)=max⁡h=1,…,Hρmax⁡(oha).(3)F_H(o_t,a)=\max_{h=1,\ldots,H}\rho_{\max}(o_h^a). \tag*{(3)}

The second function depends on a state cost. With [⋅]+=max⁡(⋅,0)[\cdot]_+ = \max(\cdot,0), an overload weight λ≫1\lambda\gg1, and a counter weight μ>1\mu> 1, the cost of a state oo is

Ψ(o)=−∑ℓ[1−ρℓ(o)]+2+λ∑ℓ(1+(μ−1)min⁡(κℓ(o),κˉ)κˉ)[ρℓ(o)−1]+2.(4)\Psi(o)=-\sum_{\ell}[1-\rho_{\ell}(o)]_+^2+\lambda\sum_{\ell}\left(1+(\mu-1)\frac{\min(\kappa_{\ell}(o),\bar{\kappa})}{\bar{\kappa}}\right)[\rho_{\ell}(o)-1]_+^2. \tag*{(4)}

The first sum rewards spare capacity, so candidates without overload are still ranked. The second penalizes overload with the large weight λ\lambda, increased up to μ\mu times as a line’s counter approaches its allowance. The cost-to-go approximation is

JH(ot,a)=max⁡h=1,…,HΨ(oha)+γ1χ(o1a)+γ2Ω(o1a)1{ρmax⁡(ot)<ρsafe},(5)J_H(o_t,a)=\max_{h=1,\ldots,H}\Psi(o_h^a)+\gamma_1\chi(o_1^a)+\gamma_2\Omega(o_1^a)\mathbf{1}\{\rho_{\max}(o_t)<\rho^{\mathrm{safe}}\}, \tag*{(5)}

where γ1,γ2>0\gamma_1,\gamma_2>0 are weights, χ∈[0,1]\chi\in[0,1] is the curtailed share of renewable potential, Ω=∑gπg∣ΔPg∣\Omega=\sum_g\pi_g|\Delta P_g| is the standing redispatch weighted by normalized generator costs πg\pi_g, and ρsafe<1\rho^{\mathrm{safe}}<1 marks an uncongested network. A small tolerance δ>0\delta>0 defines strict improvement in JHJ_H.

Convex dispatch subproblem

For a fixed topology, the continuous controls ΔP=(ΔPg)g∈G\Delta P=(\Delta P_g)_{g\in\mathcal{G}}, c=(cr)r∈Rc=(c_r)_{r\in\mathcal{R}}, and s=(su)u∈Us=(s_u)_{u\in\mathcal{U}} enter the flows linearly through the PTDF matrix Φ\Phi of § 3.1, so the joint decision is a convex quadratic program. Let fobsf^{\mathrm{obs}} be the observed AC flows, fˉℓobs=∣fℓobs∣/ρℓ(ot)\bar{f}_{\ell}^{\mathrm{obs}}=|f_{\ell}^{\mathrm{obs}}|/\rho_{\ell}(o_t) the active power that corresponds to the thermal limit at the observed operating point, and Ag,Ac,AsA_g,A_c,A_s the maps from generators, renewable units, and storage units to the first busbar of their substation. The program is

min⁡ΔP,c,s,ξ,ζηξ∥ξ∥22+ηP∥ΔP∥22+ηc1Tc+ηs∥s∥22+ηζ1Tζ(6)\min_{\Delta P,c,s,\xi,\zeta}\quad\eta_{\xi}\|\xi\|_2^2+\eta_P\|\Delta P\|_2^2+\eta_c\mathbf{1}^{\mathsf{T}}c+\eta_s\|s\|_2^2+\eta_{\zeta}\mathbf{1}^{\mathsf{T}}\zeta \tag*{(6)}
s.t.f^=fobs+ΦΔi,Δi=AgΔP−Acc−Ass,1TΔi=0,−r‾≤ΔP≤r‾,0≤c≤PR,s‾≤s≤s‾,ξ,ζ≥0,∣f^ℓ∣≤ρtgtfˉℓobs+ξℓ(ℓ∈M),∣f^ℓ+Lℓ,ef^e∣≤fˉℓobs+ζℓe((ℓ,e)∈Q),(7)\begin{aligned} \text{s.t.}\quad&\hat{f}=f^{\mathrm{obs}}+\Phi\Delta i,\quad\Delta i=A_g\Delta P-A_cc-A_ss,\quad\mathbf{1}^{\mathsf{T}}\Delta i=0,\\ &-\underline{r}\leq\Delta P\leq\overline{r},\quad0\leq c\leq P_R,\quad\underline{s}\leq s\leq\overline{s},\quad\xi,\zeta\geq0,\\ &|\hat{f}_{\ell}|\leq\rho^{\mathrm{tgt}}\bar{f}_{\ell}^{\mathrm{obs}}+\xi_{\ell}\quad(\ell\in\mathcal{M}),\qquad |\hat{f}_{\ell}+L_{\ell,e}\hat{f}_{e}|\leq\bar{f}_{\ell}^{\mathrm{obs}}+\zeta_{\ell e}\quad((\ell,e)\in\mathcal{Q}), \tag*{(7)} \end{aligned}

with f^\hat{f} the predicted flows, r‾,r‾\underline{r},\overline{r} the ramp margins ((1)), PRP_R the renewable outputs, s‾,s‾\underline{s},\overline{s} the storage power limits, ξ,ζ\xi,\zeta the slacks of the two limits, ηξ,ηP,ηc,ηs,ηζ>0\eta_{\xi},\eta_P,\eta_c,\eta_s,\eta_{\zeta}>0 the weights, ρtgt<1\rho^{\mathrm{tgt}}<1 the target loading, and M={ℓ:νℓ=1, ρℓ(ot)>ρtgt}\mathcal{M}=\{\ell:\nu_{\ell}=1,\ \rho_{\ell}(o_t)>\rho^{\mathrm{tgt}}\} the monitored lines. The set Q\mathcal{Q} secures scheduled outages: it pairs each line ee such that 0<τe(ot)≤τesec0<\tau_e(o_t)\leq\tau_e^{\mathrm{sec}} for the span τe(ot)\tau_e(o_t) before its next scheduled outage (§ 2) and a window τsec\tau^{\mathrm{sec}}, with the lines ℓ\ell whose post-outage flow predicted by (2) exceeds their limit, ∣fℓobs+Lℓ,efeobs∣>fˉℓobs|f_{\ell}^{\mathrm{obs}}+L_{\ell,e}f_e^{\mathrm{obs}}|>\bar{f}_{\ell}^{\mathrm{obs}}. The weights satisfy ηP,ηs≪ηc≪ηξ\eta_P,\eta_s\ll\eta_c\ll\eta_{\xi}. 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 Φ\Phi 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 ρmax⁡(ot)≥ρtgt\rho_{\max}(o_t)\geq\rho^{\mathrm{tgt}}. Its solution aua^u, with set points clamped to their limits, is kept only if FH(ot,au)<FH(ot,a∅)−ϵFF_H(o_t,a^u)<F_H(o_t,a^\varnothing)-\epsilon_F, for a tolerance ϵF>0\epsilon_F>0.

Candidate generation and composition

The candidate search runs when the forecast peak loading is high (§ 3.6). It targets the congested lines L†(ot):={ℓ:ρℓ(ot)>ρ†}\mathcal{L}^{\dagger}(o_t):=\{\ell:\rho_{\ell}(o_t)>\rho^{\dagger}\}, or the three most loaded lines if this set is empty. It builds a set Cz(ot)\mathcal{C}_z(o_t) of topology actions for each region zz containing such a line, and one set Cc(ot)\mathcal{C}_c(o_t) of continuous actions. Note that all candidates satisfy Assumption 1 and three sources feed Cz\mathcal{C}_z.

Algorithm 1: Preventive withholding policy

Input: observation oto_t, withheld set W\mathcal{W}, relief action arela^{\mathrm{rel}} of the control law (§ 3.6)

  1. if ρmax⁡(ot)≤ρarm\rho_{\max}(o_t) \le\rho^{\mathrm{arm}} and D={wz∈W:ywz=1, no cooldown on wz}≠∅D = \{w_z \in\mathcal{W}: y_{w_z}=1,\ \text{no cooldown on }w_z\} \ne\varnothing then aW←a^{\mathcal{W}} \leftarrow disconnect every line in DD

  2. if arela^{\mathrm{rel}} changes no line status and JH(ot,aW⊕arel)≤JH(ot,aW)+δJ_H(o_t,a^{\mathcal{W}}\oplus a^{\mathrm{rel}}) \le J_H(o_t,a^{\mathcal{W}})+\delta then return aW⊕arela^{\mathcal{W}}\oplus a^{\mathrm{rel}}

  3. else return aWa^{\mathcal{W}}

  4. end

  5. end

  6. if ρmax⁡(ot)≤ρyld\rho_{\max}(o_t) \le\rho^{\mathrm{yld}} then do not reconnect any line that is the only disconnected line of its set Bz\mathcal{B}_z

  7. end

(i) The offline library Toff\mathcal{T}_{\mathrm{off}} of single-substation bus assignments that relieved stressed states in simulation, limited to the substations of region zz at the ends of congested lines and to the six substations with the most connected elements.

(ii) A local pool Tloc(ot)\mathcal{T}_{\mathrm{loc}}(o_t) 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 FHF_H is at least ϵloc\epsilon_{\mathrm{loc}} below that of the first.

(iii) At most three line openings, ranked by the peak loading predicted after the opening, qe=max⁡ℓ≠e∣fˉℓ(e)∣/fˉℓq_e=\max_{\ell\ne e}\lvert\bar{f}^{(e)}_\ell\rvert/\bar{f}_\ell with fˉℓ=3vℓIˉℓ\bar{f}_\ell=\sqrt{3}v_\ell\bar{I}_\ell, where fˉℓ(e)\bar{f}^{(e)}_\ell is given by ((2)) applied to the observed flows fobsf^{\mathrm{obs}}, and vℓv_\ell is the observed line-to-line voltage of the three-phase network, so that fˉℓ\bar{f}_\ell is the thermal limit in MW at unit power factor (Appendix § 9). Line ee is kept only if qe<1q_e<1. Bridges, lines under cooldown, and withheld lines are excluded.

The continuous set Cc\mathcal{C}_c includes ramp-limited redispatch steps, storage charging and discharging, curtailment near the most-loaded lines, OptimCVXPY when ρmax⁡(ot)>1\rho_{\max}(o_t)>1, and the dispatch solution of § 3.3. With C(ot)=Cc(ot)∪⋃zCz(ot)\mathcal{C}(o_t)=\mathcal{C}_c(o_t)\cup\bigcup_z\mathcal{C}_z(o_t), the search starts from a⋆=arg⁡min⁡a∈C(ot)JH(ot,a)a^\star=\arg\min_{a\in\mathcal{C}(o_t)}J_H(o_t,a). If JH(ot,a⋆)≥JH(ot,a∅)−δJ_H(o_t,a^\star)\ge J_H(o_t,a^\varnothing)-\delta, the search returns a∅a^\varnothing, provided that FH(ot,a∅)<ρresF_H(o_t,a^\varnothing)<\rho^{\mathrm{res}}. Otherwise, it returns the first fallback whose simulated trajectory survives the horizon (Appendix § 9).

The search combines a⋆a^\star with the best actions of the other regions and with the best continuous action. Let az⋆a_z^\star be the best element of Cz(ot)\mathcal{C}_z(o_t) under JHJ_H, and ac⋆a_c^\star the best element of Cc(ot)\mathcal{C}_c(o_t). The search visits the regions not used by a⋆a^\star by increasing JH(ot,az⋆)J_H(o_t,a_z^\star) and accumulates the actions: starting from aˉ=ac⋆\bar{a}=a_c^\star, it sets aˉ←aˉ⊕a′\bar{a}\leftarrow\bar{a}\oplus a', first for a′=az⋆a'=a_z^\star in each region visited, then for a′=ac⋆a'=a_c^\star if it is topology free and differs from a⋆a^\star, whenever JH(ot,aˉ⊕a′)<JH(ot,aˉ)−δJ_H(o_t,\bar{a}\oplus a')<J_H(o_t,\bar{a})-\delta. The composed action aˉ\bar{a} satisfies Assumption 1: each region contributes at most one element of Cz(ot)\mathcal{C}_z(o_t), and ac⋆a_c^\star is topology free.

Preventive contingency-exposure reduction

Under the benchmark protocol, no new adversarial outage is initiated in region zz if any line of Bz\mathcal{B}_z is out of service. This motivates holding one line wz∈Bzw_z\in\mathcal{B}_z out of service in each region. Each wzw_z 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 B\mathcal{B} a bridge.

Algorithm 1 applies W=(w1,…,wZ)\mathcal{W}=(w_1,\ldots,w_Z) with two loading thresholds, ρarm≤ρyld\rho^{\mathrm{arm}}\le\rho^{\mathrm{yld}}, for opening the withheld lines and for holding their reconnection. The action aWa^{\mathcal{W}} that opens the withheld lines is triggered by the loading threshold alone. It is neither ranked by JHJ_H 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.

controllercompletedlostgainedppbackendinfeasible
full controller706517
without the dispatch program (§3.3)68243190.0036814
without OptimCVXPY, all uses (§3.3)6318914<10−13< 10^{-13}11517
without secured outages QQ (§3.3)7001150.21568
without the local pool (§3.4)68942250.0506411
without LODF line openings (§3.4)702840.395210
without opening withheld lines (§3.5)67960330.007778
without the scheduled-outage look-ahead (§3.6)6892360.002696
without margin preservation (§3.6)69734250.305413
without the extended-horizon safeguard (§3.6)68834160.0156511
reference: no-op1526120
reference: reconnection only926720
reference: OptimCVXPY alone70209485

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 pp 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 W\mathcal{W}, several other parameters of the controller are set offline from the training scenarios (the loading thresholds of Table 3, the library Toff\mathcal{T}_{\mathrm{off}}, 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 W\mathcal{W} is retested, against one alternative W′\mathcal{W}'.

symbolvalueusesymbolvalueuse
HH2evaluation horizonρsafe\rho^{\mathrm{safe}}0.90comfortable regime
H′H'8safeguard horizonρdgr\rho^{\mathrm{dgr}}1.30candidate search
λ\lambda200overload weight in Ψ\Psiρres\rho^{\mathrm{res}}1.20last resort
μ\mu4counter weight in Ψ\Psiρ†\rho^\dagger0.99congested lines
γ1\gamma_10.05curtailment in JHJ_Hρtgt\rho^{\mathrm{tgt}}0.95dispatch program
γ2\gamma_20.1redispatch cost in JHJ_Hρarm\rho^{\mathrm{arm}}0.95open withheld lines
δ\delta10−610^{-6}strict improvement in JHJ_Hρyld\rho^{\mathrm{yld}}1.00hold reconnections
ϵF\epsilon_F10−410^{-4}dispatch acceptanceρsurv\rho^{\mathrm{surv}}1.30outage severity
ϵoff\epsilon_{\mathrm{off}}0.01library screeningτlead\tau^{\mathrm{lead}}12look-ahead window
ϵloc\epsilon_{\mathrm{loc}}0.07local pool acceptanceτsec\tau^{\mathrm{sec}}48secured outages
ηξ,ηc,ηζ\eta_{\xi}, \eta_c, \eta_{\zeta}1000, 50, 5program weightsΔflex\Delta^{\mathrm{flex}}5 MWmargin preservation
ηP,ηs\eta_P, \eta_s0.03, 0.1program weightsα,M,N\alpha, M, N0.05, 1, 10revalidation
κˉ,ρhard\bar{\kappa}, \rho^{\mathrm{hard}}3, 2protectionZ,∣Bz∣Z, |\mathcal{B}_z|3, (6, 10, 6)regions
cooldown3 stepsline and substationTTone weekfive-minute steps

Table 3. Parameter values.

Safeguards and control law

The scheduled-outage look-ahead prepares the network for announced outages. Let ee be the in-service line with the nearest announced outage within τlead\tau^{\mathrm{lead}} steps, and let a−ea^{-e} be the action that disconnects ee. Once per line and episode, the controller simulates Γ(ot,a−e)\Gamma(o_t,a^{-e}), the outage applied now. If the simulated step does not end the episode and keeps ρmax⁡\rho_{\max} below ρsurv\rho^{\mathrm{surv}}, 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, R=∑grgR=\sum_g r_g, with rgr_g from (1). Returning redispatch to the economic set point can leave units at their minimum, where rg=0r_g=0. On the 764 local runs, RR 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 ρmax⁡(ot)≤ρsafe\rho_{\max}(o_t)\leq\rho^{\mathrm{safe}}, 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 ata_t of reactive control (§ 3.6) over a longer horizon H′>HH' > H, with SH′(ot,a)S_{H'}(o_t,a) the number of steps, up to H′H', that aa followed by no-ops survives in simulation. When ρmax⁡(ot)>1\rho_{\max}(o_t)>1, some counter is positive, and SH′(ot,at)<H′S_{H'}(o_t,a_t)<H', it ranks ata_t and the topology candidates of the overloaded regions by SH′S_{H'}, with ties broken by lower peak loading, and plays the best one only if it survives longer than both ata_t and a∅a^{\varnothing} (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 arela^{\mathrm{rel}} with a reconnection areca^{\mathrm{rec}}.

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 arela^{\mathrm{rel}} depends on the operating regime. In the comfortable regime, ρmax⁡(ot)≤ρsafe\rho_{\max}(o_t)\leq\rho^{\mathrm{safe}}, it is housekeeping. Above ρsafe\rho^{\mathrm{safe}}, it is preventive dispatch or a∅a^{\varnothing} while the forecast peak loading of the no-op stays below a threshold ρdgr>1\rho^{\mathrm{dgr}}>1, FH(ot,a∅)<ρdgrF_H(o_t,a^{\varnothing})<\rho^{\mathrm{dgr}} (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 ρsafe\rho^{\mathrm{safe}}. 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 FH(ot,a∅)=+∞F_H(o_t,a^{\varnothing})=+\infty. The dispatch solution of § 3.3 replaces a∅a^{\varnothing} whenever its peak loading FHF_H is lower by more than ϵF\epsilon_F. The reconnection areca^{\mathrm{rec}} 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 {arec⊕arel, arec, arel}\{a^{\mathrm{rec}}\oplus a^{\mathrm{rel}},\ a^{\mathrm{rec}},\ a^{\mathrm{rel}}\} with the lowest JHJ_H.

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 p<0.05p < 0.05, 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 (p=0.21p = 0.21).

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 W′\mathcal{W}' led the incumbent by 16.5 points on these scenarios and was accepted, and the validation score rose by 0.78, within noise (paired t=0.58t = 0.58). In the final test phase, W′\mathcal{W}' 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 HH, 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.

symbolmeaning
N,L,n,m\mathcal{N}, \mathcal{L}, n, mbuses, lines, and their numbers
Nz,Bz,Z\mathcal{N}_z, \mathcal{B}_z, Zbuses and attackable lines of region zz, number of regions
G,R,U\mathcal{G}, \mathcal{R}, \mathcal{U}dispatchable generators, renewable units, storage units
yℓ,fℓ,Iℓ,Iˉℓ,ρℓ,ρmax⁡y_\ell, f_\ell, I_\ell, \bar{I}_\ell, \rho_\ell, \rho_{\max}status, active flow, current, thermal limit, loading, largest loading
κℓ,κ,ρhard\kappa_\ell, \kappa, \rho^{\mathrm{hard}}overflow counter, its allowance, immediate trip threshold
τℓ\tau_\ellsteps before the next scheduled outage of line ℓ\ell
Φ,L\Phi, LPTDF, LODF
ΔPg,cr,su\Delta P_g, c r, s uredispatch, curtailment, storage power (positive when charging)
Pg,rg,rˉg,Rg↓,Rg↑P_g, r_g, \bar{r}_g, R_g^{\downarrow}, R_g^{\uparrow}generator output, downward and upward ramp margins, ramp limits
ot,at,a∅,⊕o_t, a_t, a^\varnothing, \oplusobservation, applied action, no-op, application in the same step
Γ,oha\Gamma, o_h^aforward model, simulated state hh steps after aa
FH,JH,Ψ,χ,ΩF_H, J_H, \Psi, \chi, \Omegapeak loading, cost-to-go, state cost, curtailed share, standing redispatch
SH′S_H'simulated survival over the horizon H′H'
Cz,Cc,C,a⋆,aˉC_z, C_c, C, a^\star, \bar{a}regional and continuous candidate sets, their union, best single, composed action
arel,arec,au,aW,a−ea^{\mathrm{rel}}, a^{\mathrm{rec}}, a^u, a^W, a^{-e}relief, reconnection, dispatch solution, withholding, scheduled disconnection
qe,fˉeq_e, \bar{f}_escreen score of line ee, thermal limit converted to MW at unit power factor
fˉeobs\bar{f}_e^{\mathrm{obs}}thermal limit converted to MW at the observed power factor
M,Q,ξ,ζ\mathcal{M}, Q, \xi, \zetamonitored lines, secured outage pairs, and their slacks
wz,W,Rw_z, W, Rwithheld line of region zz, withheld set, fleet downward capacity

Table 2. Symbols.

The withheld set of the submitted controller is W=(106,131,33)\mathcal{W} = (106, 131, 33), and the alternative tested by the rule (8) is W′=(162,110,61)\mathcal{W}' = (162, 110, 61). 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 Q\mathcal{Q} 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 [0.92,1][0.92, 1], ρmax⁡≤1\rho_{\max} \le1, it is the most loaded in-service line of its region’s BzB_z, and the forward model shows no termination and a peak loading of at most 1.55. The controller then plays a ∅\varnothing 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 ρmax⁡>1.7\rho_{\max} > 1.7.

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 RR 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 a∅a^{\varnothing}. 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 ρmax⁡>1\rho_{\max} > 1, the OptimCVXPY solution, played if it lowers JHJ_H below JH(ot,a∅)−δJ_H(o_t, a^{\varnothing}) - \delta. (ii) An anticipatory action: if removing the most loaded in-service line of B\mathcal{B}, 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 oto_t shows no termination and a peak loading of at most ρsafe+0.2\rho_{\mathrm{safe}} + 0.2. After this action, the same path stays inactive for the next eight steps outside the comfortable regime. (iii) If ρmax⁡>1\rho_{\max} > 1 and a counter is positive, the same program is solved again and played if the one-step peak loading falls below ρmax⁡(ot)\rho_{\max}(o_t). If none applies, the action is a∅a^{\varnothing}.

Offline library of bus assignments. The library Toff\mathcal{T}_{\mathrm{off}} 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 ρmax⁡>0.85\rho_{\max} > 0.85. (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 ϵoff\epsilon_{\mathrm{off}} 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 zz and observation oto_t, the pool Tloc(ot)\mathcal{T}_{\mathrm{loc}}(o_t) of § 3.4 is built at decision time in three steps. (i) The substations VV are those of region zz at the ends of the congested lines L′(ot)\mathcal{L}'(o_t), the hubs of region zz (among the six substations of the network with the most connected elements), and the neighbors in region zz of the endpoints of the most loaded line. (ii) Substations under cooldown are removed from VV. (iii) The pool holds every configuration of a substation of VV 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 qeq_e, at most three, and added to the pool of the first congested region.

Continuous templates and last resort. The templates of Cc(ot)\mathcal{C}_c(o_t) 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 fˉℓobs\bar{f}^{\mathrm{obs}}_{\ell} of § 3.3, fˉℓ\bar{f}_{\ell} of § 3.4 expresses the thermal limit Iˉℓ\bar{I}_{\ell} in MW, with vℓv_{\ell} in kV and Iˉℓ\bar{I}_{\ell} 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 ∣fℓobs∣/ρℓ|f^{\mathrm{obs}}_{\ell}|/\rho_{\ell} is 0/00/0, whereas 3vℓIˉℓ\sqrt{3}v_{\ell}\bar{I}_{\ell} is defined for every line.

Revalidation of Fitted Parameters

The parameters set offline in § 3.5, W\mathcal{W} included, are denoted by ψ\psi. 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 ψ′\psi' against the incumbent ψ\psi on the same NN scenarios. Let Δi\Delta_i be the score of ψ′\psi' minus the score of ψ\psi on scenario ii, with mean Δ‾\overline{\Delta} and sample standard deviation σ^Δ\hat{\sigma}_{\Delta}. The alternative is accepted only if

Δ‾>zα/(2M)σ^Δ/N,(8)\overline{\Delta} > z_{\alpha/(2M)}\hat{\sigma}_{\Delta}/\sqrt{N}, \tag*{(8)}

where MM is the number of alternatives, α\alpha the family-wise level, and zα/(2M)z_{\alpha/(2M)} the upper α/(2M)\alpha/(2M) 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: NN is the number of scenarios on which the incumbent and the MM alternatives can be scored within the time reserved for the test. In the submitted controller, ψ\psi contains only the withheld set W\mathcal{W}, with one alternative W′\mathcal{W}' (Appendix § 8), and one hour reserved for the test gave N=10N=10. § 4 reports both applications of this rule in the challenge, but the rule extends to all parameters in ψ\psi, 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 τlead\tau^{\mathrm{lead}}.

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 HH of the forecast used elsewhere is too short to value a posture against a later disconnection.

Algorithm 2: Scheduled-outage look-ahead

Input: observation oto_t, line ee with 0<τe(ot)≤τlead0 < \tau_e(o_t) \le\tau^{\mathrm{lead}} not yet evaluated, severity threshold ρsurv\rho^{\mathrm{surv}}

  1. o′←Γ(ot,a−e)o' \leftarrow\Gamma(o_t, a^{-e})

  2. if o′o' does not end the episode and ρmax⁡(o′)<ρsurv\rho_{\max}(o') < \rho^{\mathrm{surv}} then

  3. &nbsp;&nbsp;&nbsp;&nbsp;return no posture

  4. end

  5. if an offline record Pe\mathcal{P}_e of postures that survived the outage of ee exists then

  6. &nbsp;&nbsp;&nbsp;&nbsp;A←{a∈Pe:JH(ot,a⊕a−e)<+∞}A \leftarrow\{a \in\mathcal{P}_e : J_H(o_t, a \oplus a^{-e}) < +\infty\}

  7. &nbsp;&nbsp;&nbsp;&nbsp;if A≠∅A \ne\varnothing then

  8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return the highest-ranked posture in AA

  9. &nbsp;&nbsp;&nbsp;&nbsp;end

  10. else

  11. &nbsp;&nbsp;&nbsp;&nbsp;C←C \leftarrow the topology candidates of the regions of the endpoints of ee, and OptimCVXPY

  12. &nbsp;&nbsp;&nbsp;&nbsp;a←arg⁡min⁡a′∈CJH(ot,a′⊕a−e)a \leftarrow\arg\min_{a' \in C} J_H(o_t, a' \oplus a^{-e})

  13. &nbsp;&nbsp;&nbsp;&nbsp;if JH(ot,a⊕a−e)<JH(ot,a−e)−δJ_H(o_t, a \oplus a^{-e}) < J_H(o_t, a^{-e}) - \delta then

  14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return aa

  15. &nbsp;&nbsp;&nbsp;&nbsp;end

  16. end

  17. return no posture

Margin preservation. Units less than one ramp step above their minimum raise their output, each by up to tg=min⁡(Rg↓−rg,Rg↑)t_g = \min(R_g^{\downarrow} - r_g, R_g^{\uparrow}), and recover room. Units with rg=Rg↓r_g = R_g^{\downarrow} lower their output by the same total. The shift is played if ∑gtg≥Δflex\sum_g t_g \ge\Delta^{\mathrm{flex}} and FH≤ρsafeF_H \le\rho^{\mathrm{safe}}. Let Gsat={g:rg=Rg↓}\mathcal{G}^{\mathrm{sat}} = \{g : r_g = R_g^{\downarrow}\} be the units that give output, and let the transferred power be

Ptr=min⁡(∑gtg, ∑g∈GsatRg↓).P^{\mathrm{tr}} = \min\left(\sum_g t_g,\ \sum_{g \in\mathcal{G}^{\mathrm{sat}}} R_g^{\downarrow}\right).

Each unit’s redispatch is its share of PtrP^{\mathrm{tr}}:

ΔPg=tgPtr∑g′tg′ if tg>0,ΔPg=−Rg↓Ptr∑g′∈GsatRg′↓ if g∈Gsat.\Delta P_g = \frac{t_g P^{\mathrm{tr}}}{\sum_{g'} t_{g'}} \text{ if } t_g > 0,\qquad\Delta P_g = -\frac{R_g^{\downarrow}P^{\mathrm{tr}}}{\sum_{g' \in\mathcal{G}^{\mathrm{sat}}} R_{g'}^{\downarrow}} \text{ if } g \in\mathcal{G}^{\mathrm{sat}}.

The increases and the decreases sum to zero, and each redispatch respects the ramp limit of its unit.

Extended-horizon safeguard. The horizon-HH evaluation of § 3.2 can miss a line held at mild overload, ρℓ∈(1,ρhard)\rho_\ell\in(1, \rho^{\mathrm{hard}}), for several steps without tripping. Within HH steps, a slow approach to the allowance κˉ\bar{\kappa} can look no worse than a short excursion. The safeguard of § 3.6 takes as wider candidate set the action ata_t 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 SH′S_{H'}, with ties broken by the lower peak loading over the horizon H′H'.

Computational Complexity and Deployment

One control cycle has three parts. It builds the candidate set C(ot)C(o_t), whose size ∣C(ot)∣=O(∣Toff∣+∣Tloc(ot)∣+∣G∣+∣U∣)|C(o_t)| = O(|\mathcal{T}_{\mathrm{off}}| + |\mathcal{T}_{\mathrm{loc}}(o_t)| + |\mathcal{G}| + |\mathcal{U}|) 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 HH, 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 nn buses costs O(n1.5)O(n^{1.5}) per iteration with a sparse factorization and needs few iterations near a feasible operating point. The quadratic program has O(∣G∣+∣R∣+∣U∣+∣M∣+∣Q∣)O(|\mathcal{G}| + |\mathcal{R}| + |\mathcal{U}| + |\mathcal{M}| + |\mathcal{Q}|) 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

O(∣C(ot)∣⋅H⋅n1.5),(9)O(|C(o_t)| \cdot H \cdot n^{1.5}), \tag*{(9)}

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 oto_t at each step and a contingency list that supplies the credible set B=B1∪…∪BZB = B_1 \cup\ldots\cup B_Z, 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. [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. [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. [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. [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. [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. [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. [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. [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. [9]Allen J. Wood, Bruce F. Wollenberg, and Gerald B. Sheblé. Power Generation, Operation, and Control. Wiley-IEEE Press, 3 edition, 2013.
  10. [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. [11]Dimitri P. Bertsekas. Reinforcement Learning and Optimal Control. Athena Scientific, 2019.
  12. [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.
  13. [14]Benjamin Donnot. Grid2Op: A testbed platform to model sequential decision making in power systems. https://github.com/Grid2op/grid2op, 2020.
  14. [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
  15. [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
  16. [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

Paper details

vlnc:W_xegg9txd
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Engineering

Claude, ChatGPT

View statement
Looking for related papers…
Contents