OptiGridML: ML for Grid Topology Optimization
- OptiGridML is a machine learning-driven framework for grid optimization that predicts optimal breaker states and configurations to streamline transmission reconfiguration and distribution-grid modeling.
- It integrates supervised learning and graph neural networks, reducing mixed-integer optimization times dramatically and achieving speedups up to 251,765× on larger grids.
- The workflow leverages open GIS data and tailored optimization techniques with physics-informed training to generate simulation-ready models that meet practical power-flow requirements.
Searching arXiv for papers on OptiGridML and closely related grid-optimization ML work. arXiv search query: "OptiGridML OR transmission network reconfiguration breaker optimization graph neural network optimal power flow" OptiGridML denotes, in the supplied literature, a family of grid-optimization workflows centered on machine learning and open-data automation. In its most explicit usage, it is a supervised learning framework for transmission network reconfiguration at the substation breaker level, designed to replace repeated mixed-integer optimization solves with fast neural inference (Meng et al., 3 Aug 2025). In related usage within the supplied material, the label is also associated with an automated, scalable workflow for generating detailed, simulation-ready low-voltage distribution-grid models from open GIS and statistical data and exporting them to DIgSILENT PowerFactory for power-flow and quasi-dynamic studies (Çakmak et al., 2022). Taken together, these usages place OptiGridML at the intersection of topology optimization, learning-assisted power-system operation, and data-centric grid modeling.
1. Scope and problem setting
In the transmission-network formulation, OptiGridML targets transmission network reconfiguration in a two-zone grid with a source zone that has surplus generation and a sink zone with heavy load. The operational objective is to choose breaker states inside substations so that the grid can export as much power as possible from Zone 1 to Zone 2 while respecting DC power-flow physics and structural feasibility. This is explicitly harder than ordinary line switching because substation breaker actions change the bus-level graph structure inside substations, which in turn redistributes flows globally across the meshed network (Meng et al., 3 Aug 2025).
The resulting optimization is naturally a mixed-integer program: breaker variables are binary, while flows, voltage angles, and utilization ratios are continuous. The difficulty arises from the simultaneous presence of discrete topology decisions, physics constraints, substation structure constraints, and global coupling. The supplied material states that for 500 breakers, exact optimization already takes around 10.7 hours per instance, and that for 1,000 breakers mixed-integer optimization is no longer practical. On that basis, OptiGridML is positioned as an optimization proxy that learns to predict good breaker states directly rather than as a conventional solver accelerator (Meng et al., 3 Aug 2025).
In the distribution-grid usage, the same label is attached to a different research object: a workflow for automated creation of large-scale detailed distribution-grid models based solely on publicly available GIS and statistical data. That workflow is designed for suburban residential areas, uses OpenStreetMap street layouts as potential cable routes, augments them with residential-unit and photovoltaic data, and transforms the resulting meshed candidate graph into a radial low-voltage topology via optimization before transfer to PowerFactory (Çakmak et al., 2022). This suggests that, within the supplied material, OptiGridML functions less as a single canonical algorithm than as a broader designation for learning- and optimization-driven grid-analytics pipelines.
2. Breaker-level transmission reconfiguration formulation
The transmission-network OptiGridML formulation maximizes a utilization variable representing transferable generation in Zone 1. The core optimization is written as
with coupled scaling relations
generation and demand definitions
and standard DC power-flow equations
Breaker consistency is enforced with a big- construction so that a closed breaker imposes angle equality and an open breaker carries no flow, while nodal balance and a slack-bus reference complete the physical model (Meng et al., 3 Aug 2025).
Structural feasibility is not treated as an external postulate but as an explicit part of the optimization. One constraint prevents dangling busbars by requiring at least one active breaker incidence, and another ensures that substations with more than two breakers are split into at most two components. This matters because the task is not merely selecting an edge subset in a fixed graph; it is selecting substation-internal configurations that remain admissible under substation design rules (Meng et al., 3 Aug 2025).
The distribution-grid workflow uses a different optimization primitive. There, the graph induced from streets and attached buildings is transformed into a radial low-voltage network through a variation of the minimum-cost network flow problem extended by radiality constraints. The objective minimizes cable installation cost proportional to line-segment length, subject to flow conservation, an indegree-style radiality condition, and capacity linking between flow and edge installation variables. The method also inserts a virtual substation connected to all secondary substations with zero-cost links so that the optimizer can choose how secondary substations are connected without distorting the cable-length objective (Çakmak et al., 2022).
3. Neural architecture and physics-informed training
The transmission-network OptiGridML architecture has three conceptual stages: LGNN pretraining, HeteroGNN prediction, and repair. The first stage trains a line-graph neural network on feasible topology-flow pairs from solved instances. In the line graph , each transmission line becomes a node, and two line-nodes are connected if the corresponding lines share a bus or substation. This representation is chosen because the number of transmission lines is fixed even if substations are split, and because line-level message passing models flow redistribution more directly (Meng et al., 3 Aug 2025).
Each line-node is initialized with line reactance, thermal capacity, and the net injections at its endpoints,
and line-graph edges summarize shared-substation information. The LGNN uses message passing
followed by a shared linear decoder for predicted flows . It is trained with mean squared error against ground-truth DCOPF flows (Meng et al., 3 Aug 2025).
The second stage is a heterogeneous GNN that predicts breaker states directly. It is heterogeneous because breaker edges and transmission-line edges represent qualitatively different relations. Busbar nodes carry features such as generation, demand, and line degree; breaker edges encode breaker state and connection-side information; line edges encode reactance and thermal capacity. Message passing is type-specific, aggregated with learned attention, and the resulting node states are updated with a GRU. Final breaker probabilities are produced by applying a sigmoid to an MLP over the endpoint embeddings and breaker-edge features (Meng et al., 3 Aug 2025).
A central design feature is the physics-informed consistency loss. After a candidate breaker configuration is predicted, the pretrained flow encoder provides approximate line flows, and the training objective penalizes violations of Kirchhoff’s Current Law through
0
Additional penalties address thermal overload, dangling busbars, and excessive substation fragmentation, yielding a total loss
1
The model is therefore trained not only to match supervision labels but also to respect soft physical and structural constraints (Meng et al., 3 Aug 2025).
4. Data, training protocol, and empirical behavior
The transmission-network dataset is synthetic and is explicitly scaled across four regimes: 50 breakers with 12 substations and 500 samples, 100 breakers with 20 substations and 1,000 samples, 500 breakers with 100 substations and 2,000 samples, and 1,000 breakers with 200 substations and 5,000 samples. Each substation has 2–7 neighboring substations connected via double power lines, and operating instances are generated by perturbing generation and load by 2 and then rebalancing. For systems up to 500 breakers, ground-truth labels are generated by exact mixed-integer optimization using Gurobi; for 1,000 breakers, heuristic search produces near-optimal feasible configurations that are then validated with DCOPF. The dataset split is 8:1:1 into train, validation, and test sets (Meng et al., 3 Aug 2025).
The reported hyperparameters are fixed and explicit. The LGNN uses 3 message-passing layers, hidden size 64, Adam with learning rate 3, batch size 32, and 200 epochs with early stopping. The HeteroGNN uses 4 message-passing layers, hidden size 64, Adam with learning rate 4, batch size 16, and 300 epochs with early stopping. The best loss weights are reported as 5 and 6 (Meng et al., 3 Aug 2025).
Empirically, the full model improves export relative to the base topology by 7 for 50 breakers, 8 for 100 breakers, 9 for 500 breakers, and 0 for 1,000 breakers. Violation rates before repair are around 4–6% for the full model, compared with about 37–40% for an MLP baseline and about 26–30% for a GCN baseline. Inference time per instance is reported as 43 ms, 67 ms, 153 ms, and 228 ms at 50, 100, 500, and 1,000 breakers respectively, with speedups over mixed-integer optimization of 649×, 10,030×, and 251,765× on the first three scales. On solvable instances, the predicted 1 reaches over 90% of the optimal 2 (Meng et al., 3 Aug 2025).
The distribution-grid workflow is evaluated on a suburban residential district. The generated PowerFactory model contains 241 site elements representing houses, eight secondary substations, 495 busbars, 3,435 terminals, 2,941 switches, 485 lines, ten two-winding transformers, and 243 low-voltage loads. Eight load-flow scenarios cover present photovoltaic deployment and a full rooftop-PV expansion case at summer and winter, midday and evening operating points. Under present PV deployment, maximum line loading never exceeds 16.55%, transformer loading stays below 18.41%, minimum voltage does not fall below 0.977 p.u. in the text and 0.98 p.u. in the table, and total losses are at most 14.94 kVA. Under full PV expansion, summer midday conditions produce line loading above 120% according to the text and 133.07% in the table, transformer loading above 100% or 109.63%, voltage above 1.1 p.u. or 1.10 p.u., and losses reaching 220.55 kVA. Quasi-dynamic weekly simulation at 15-minute resolution yields similar conclusions and is presented as evidence of temporal realism (Çakmak et al., 2022).
5. Position within the broader grid-learning literature
OptiGridML belongs to the broader field of machine learning assisted optimal power flow and topology control, where computational effort is shifted from online optimization to offline training. A relevant comparison is the systematic study of FCNN, CNN, and GNN architectures for ML-assisted OPF. That literature finds that locality between feature and target variables is scarce for fixed grid topology, so fully connected networks often match or exceed topology-aware models, while GNNs become clearly advantageous when topology varies, as under 3 line contingencies (Falconer et al., 2021). This is directly pertinent to OptiGridML: its graph-native design is coupled to a setting in which topology changes are intrinsic rather than incidental.
Another closely related strand replaces full end-to-end prediction with solver-structured reduction. A classifier can predict which inequality constraints are binding, remove predicted non-binding constraints, and then iteratively restore any violated constraints until the full OPF solution is recovered. In that setting, training on downstream computational cost rather than ordinary classification loss substantially improves optimization performance, especially on larger grids where active-set diversity is high (Robson et al., 2019). This suggests a methodological contrast: OptiGridML predicts a high-quality topology directly, whereas meta-optimization approaches preserve exact solver recovery through reduced-problem refinement.
Sensitivity-informed learning provides a third point of comparison. In inverter dispatch on a linearized radial feeder, augmenting each OPF label with the Jacobian of the optimizer with respect to operating conditions produces a sensitivity-informed deep neural network whose mean square error improves by 2–3 orders of magnitude at minimal computational overhead, with especially strong gains in the small-data regime (Singh et al., 2020). That result is relevant because it shows that grid-learning architectures can benefit not only from graph structure or task-specific losses but also from optimization-derived first-order information.
LLM approaches define a newer adjacent direction. SafePowerGraph-LLM represents AC OPF instances as graph or table JSON sequences, uses in-context learning with 65 example pairs plus a 66th query, and fine-tunes models such as Llama-3.1-8B-Instruct and gpt-4o-mini on 65,000 input-output pairs. The paper reports that fine-tuning dramatically reduces invalid outputs and improves accuracy, particularly for smaller open-source models (Bernier et al., 13 Jan 2025). This does not make OptiGridML an LLM framework, but it indicates that structured representations of network state and solver outputs are becoming a common substrate across distinct grid-ML paradigms.
6. Data infrastructure, synthetic grids, and methodological caveats
OptiGridML-style research depends heavily on data generation and benchmarking infrastructure. PGLearn addresses the lack of standardized datasets and evaluation metrics for ML and OPF by releasing more than 10 million OPF samples, about 2.2 TB of data, and roughly 29,876.65 CPU-hours of AC, DC, and SOC cases, together with primal and dual labels, fixed train/test splits, solver metadata, and shared evaluation code (Klamkin et al., 28 May 2025). The benchmark emphasis is that optimality gap alone is insufficient and should be complemented by constraint violations, distance to the feasible set, distance to the true optimal solution, and computational metrics.
Synthetic-grid generation is another enabling layer. The Synthetic Grid Generator uses OpenStreetMap road and building data to construct synthetic medium-voltage and low-voltage networks of almost arbitrary size, validates them against a real Swiss grid, and exposes the workflow through an open-source web platform. Reported comparisons include 29 real versus 31 synthetic customers per km, 152 real versus 167 synthetic LV grids, and average LV diameter of 0.653 km real versus 0.538 km synthetic, with comparable voltage-magnitude and line-loading box plots (Dande et al., 2024). A plausible implication is that such synthetic, geospatially grounded networks provide a realistic testbed for OptiGridML-style training and evaluation when utility data are inaccessible.
More recent data engines expand this infrastructure further. gridfm-datakit-v1 generates large-scale AC PF and OPF datasets with realistic global load scaling from real profiles, localized bus noise, arbitrary 4 topology perturbations, and varying generator costs. It scales to up to 30,000 buses for PF and 10,000 buses for OPF, and reports PF convergence of 99.77% on IEEE 24, 99.67% on IEEE 118, 99.43% on GOC 2,000, and 99.94% on GOC 10,000, with OPF convergence of 95.19%, 98.88%, 99.15%, and 97.96% on the same cases (Puech et al., 16 Dec 2025). The paper also argues that higher entropy is not automatically more useful: PFΔ exhibits more overload-heavy scenarios, whereas gridfm-datakit provides a more balanced mix of in-limit and out-of-limit states.
Open-data reconstruction workflows offer an additional perspective. In the Alberta power-network case, public map, single-line diagram, load, generation, and census data are integrated into a graph 5, line directions are recovered through heuristic orientation plus multi-source DAG-style BFS, and a linear program infers feasible dispatch and flows with global optimum error below 6 (Cheng et al., 10 Apr 2025). This suggests that OptiGridML, broadly understood, is as much a data engineering and graph reconstruction problem as it is a learning problem.
The principal limitations are correspondingly clear. The transmission reconfiguration formulation is DC rather than AC, uses synthetic benchmark networks rather than real utility data, and studies a two-zone export-maximization objective rather than broader security-constrained or market-coupled objectives (Meng et al., 3 Aug 2025). The distribution-grid generation workflow requires accurate 20 kV substation locations and still defers voltage compliance to PowerFactory simulation rather than incorporating it directly into topology synthesis (Çakmak et al., 2022). Across the wider literature, a persistent misconception is that topology-aware architectures are automatically superior; the comparative evidence instead indicates that their advantage is strongest when topology itself varies materially across samples (Falconer et al., 2021).