Benchmarking GAT Against Public Datasets
GAT includes integrated benchmarking tools for systematically evaluating AC OPF solver performance against public power flow datasets. The primary benchmark suite uses the PFDelta project: 859,800 solved power flow instances across IEEE standard test cases with N/N-1/N-2 contingencies.
PFDelta Integration (v0.3)
Dataset Overview
PFDelta (https://github.com/MOSSLab-MIT/pfdelta) provides:
- 859,800 test cases across 6 standard IEEE networks
- 6 network sizes: IEEE 14-bus, 30-bus, 57-bus, 118-bus, GOC 500-bus, GOC 2000-bus
- 3 contingency types: N (no contingencies), N-1 (single line), N-2 (double line)
- Pre-solved optimal solutions with ground truth data
- Two subdirectories per contingency:
raw/(feasible) andnose/(near-infeasible/boundary cases) - JSON format with bus/gen/load/branch data in per-unit representation
Directory Structure
pfdelta/
โโโ case14/
โ โโโ n/
โ โ โโโ raw/
โ โ โ โโโ pfdelta_0.json
โ โ โ โโโ pfdelta_1.json
โ โ โ โโโ ...
โ โ โโโ nose/
โ โ โโโ ...
โ โโโ n-1/
โ โ โโโ raw/
โ โ โโโ nose/
โ โโโ n-2/
โ โโโ raw/
โ โโโ nose/
โโโ case30/
โโโ case57/
โโโ case118/
โโโ case500/
โโโ case2000/
Usage Examples
Basic Benchmark Run
Benchmark AC OPF solver on a subset of test cases:
Parameters:
--pfdelta-root: Path to PFDelta root directory--case: Filter by network size (14, 30, 57, 118, 500, 2000) or omit for all--contingency: Type of contingencies (n,n-1,n-2, orall)--max-cases: Limit number of test cases (0 = all)--out: Output CSV file path--threads: Parallel solver threads (auto = CPU count)--tol: Convergence tolerance (default 1e-6)--max-iter: Maximum iterations (default 20)
Output Format
Results written to CSV with columns:
case_name: Network identifier (case14, case30, etc.)contingency_type: Contingency class (n, n-1, n-2, etc.)case_index: Index in result setsolve_time_ms: AC OPF solve time (milliseconds)num_buses: Network sizenum_branches: Transmission lines
Full Test Suite (All Cases)
Benchmark all 859,800 instances across all network sizes and contingencies:
# On a 16-core system, takes ~8-10 hours
For faster preview, sample:
# Test 1000 random cases (representative sample)
Contingency-Type Comparison
Compare solver behavior across different contingency levels:
# N (no contingencies)
# N-1 (single line outages)
# N-2 (double line outages)
Network-Size Scaling
Test how solver scales with network complexity:
for; do
done
Expected behavior:
- 14-bus: ~0.5-1ms per case
- 30-bus: ~1-2ms per case
- 57-bus: ~2-4ms per case
- 118-bus: ~5-15ms per case
- 500-bus: ~50-200ms per case (dense interconnection)
- 2000-bus: ~200-500ms per case (sparse geographic distribution)
Analysis and Visualization
Post-Processing Results
With Python/Pandas:
# Load results
=
# Convergence rate
= /
# Performance statistics
Performance Expectations
On modern hardware (e.g., 16-core Ryzen 5950X):
| Case Size | Typical Time | Throughput | Notes |
|---|---|---|---|
| IEEE 14 | 0.8ms | 1250 cases/sec | Trivial |
| IEEE 30 | 1.5ms | 667 cases/sec | Quick |
| IEEE 57 | 3.0ms | 333 cases/sec | Fast |
| IEEE 118 | 10ms | 100 cases/sec | Standard |
| GOC 500 | 100ms | 10 cases/sec | Large |
| GOC 2000 | 300ms | 3.3 cases/sec | Very large |
Full suite estimate: 859,800 cases at weighted average ~50ms/case = ~12 hours (16 cores).
Test Suite
The benchmark implementation includes integration tests:
Tests verify:
- CLI command parsing
- Result CSV schema validation
- Parallel execution correctness
- Error handling for missing files
Known Limitations
-
No Convergence Guarantee: Near-infeasible cases (in
nose/directories) may not converge. This is expected; GAT reports these as failed. -
Per-Unit Normalization: PFDelta uses different base MVA for different cases. Ensure proper scaling during network conversion.
-
Ground Truth Comparison: PFDelta solutions are provided as reference; comparing against them requires additional parsing logic not included in the loader.
-
Memory Scaling: Very large cases (2000-bus) with 500 Monte Carlo scenarios require ~1GB per case. Use
--max-casesto limit.
Future Enhancements
Planned for subsequent releases:
- Direct JSON solution comparison (vs. ground truth)
- Reliability metrics per test case (LOLE/EUE impact)
- Visualization dashboard (Parquet โ interactive web UI)
- Integration with dsgrid/RTS-GMLC time-series data
- Distributed benchmark runner (fan-out across compute cluster)
PGLib-OPF Benchmarking
GAT also supports benchmarking against PGLib-OPF, the IEEE PES benchmark library for optimal power flow. Unlike PFDelta (power flow), PGLib provides pre-formulated OPF test cases in MATPOWER format.
Dataset Overview
PGLib-OPF (https://github.com/power-grid-lib/pglib-opf) provides:
- Standardized OPF test cases from IEEE and industry
- MATPOWER format (.m files) directly importable
- Published optimal values for validation
- Multiple difficulty levels: from 5-bus to 10,000+ bus networks
Basic PGLib Benchmark
OPF Method Selection
The --method option selects which OPF solver to benchmark:
| Method | Description | Default |
|---|---|---|
socp | SOCP relaxation (convex, reliable) | โ Default |
ac | Fast-decoupled linear approximation | |
dc | DC optimal power flow (LP) | |
economic | Economic dispatch (no network) |
Why SOCP is the default: SOCP converges reliably on most test cases and provides a good balance of accuracy and speed. Full AC-NLP can be run separately using gat opf ac-nlp for individual cases where higher fidelity is needed.
Full PGLib Example
# Benchmark all PGLib cases with SOCP
# Compare with DC-OPF
# Filter to specific cases
Comparing Against Baseline
If you have a CSV with published optimal values:
The output will include objective gap percentages against the baseline.
CLI Parameters
| Parameter | Description | Default |
|---|---|---|
--pglib-dir | Path to PGLib-OPF directory | Required |
--out | Output CSV path | Required |
--method | OPF method (socp, ac, dc, economic) | socp |
--case-filter | Filter cases by name pattern | All |
--max-cases | Limit number of cases (0=all) | 0 |
--threads | Parallel threads (auto=CPU count) | auto |
--tol | Convergence tolerance | 1e-6 |
--max-iter | Maximum solver iterations | 200 |
--baseline | Optional baseline CSV for comparison | None |
References
- PFDelta Project: https://github.com/MOSSLab-MIT/pfdelta
- PFDelta Dataset: https://huggingface.co/datasets/pfdelta/pfdelta
- PFDelta Paper: https://arxiv.org/abs/2510.22048 (MOSSLab preprint)
- PGLib-OPF: https://github.com/power-grid-lib/pglib-opf
- Crate:
crates/gat-io/src/sources/pfdelta.rs - CLI:
gat benchmark pfdelta --help,gat benchmark pglib --help - Tests:
crates/gat-cli/tests/benchmark_pfdelta.rs
DPLib: Distributed ADMM OPF Benchmarking
GAT implements the ADMM (Alternating Direction Method of Multipliers) algorithm for distributed optimal power flow, following the DPLib paper approach (arXiv:2506.20819). The gat benchmark dplib command compares distributed ADMM-OPF against centralized SOCP solutions.
Algorithm Overview
The network is partitioned into regions, each solving a local OPF subproblem. Boundary buses are shared via consensus constraints:
min ฮฃ_k f_k(x_k)
s.t. A_k x_k = b_k (local constraints)
x_k|_boundary = z (consensus constraints)
ADMM iterates three phases:
- x-update: Each partition solves local OPF with augmented Lagrangian
- z-update: Average boundary variables across partitions
- ฮป-update: Update dual variables (Lagrange multipliers)
Convergence is achieved when primal residual (consensus violation) and dual residual (consensus change rate) are below tolerance.
Basic DPLib Benchmark
Compare ADMM distributed OPF against centralized SOCP on PGLib cases:
CLI Parameters
| Parameter | Description | Default |
|---|---|---|
--pglib-dir | Path to PGLib-OPF directory | Required |
--out | Output CSV path | Required |
--case-filter | Filter cases by name pattern | All |
--max-cases | Limit number of cases (0=all) | 0 |
--threads | Parallel threads (auto=CPU count) | auto |
--num-partitions | Number of ADMM partitions (0=auto) | 0 |
--max-iter | Maximum ADMM iterations | 100 |
--tol | Primal/dual convergence tolerance | 1e-4 |
--rho | Initial penalty parameter (ฯ) | 1.0 |
--subproblem-method | Local OPF method (dc, socp) | dc |
Output Format
Results CSV includes columns for both centralized and distributed solves:
| Column | Description |
|---|---|
case_name | Network identifier |
num_buses | Network size |
num_partitions | Partitions used |
num_tie_lines | Branches crossing partition boundaries |
centralized_time_ms | Centralized SOCP solve time |
centralized_objective | Centralized optimal cost |
admm_time_ms | Distributed ADMM solve time |
admm_objective | ADMM optimal cost |
admm_iterations | ADMM iterations to convergence |
primal_residual | Final consensus violation |
dual_residual | Final dual residual |
objective_gap_rel | Relative gap: (ADMM - centralized) / centralized |
speedup_ratio | Centralized time / ADMM time |
x_update_ms | Time in x-update phase |
z_update_ms | Time in z-update phase |
dual_update_ms | Time in ฮป-update phase |
Example Experiments
Partition Scaling Study
Test how ADMM performance scales with partition count:
for; do
done
Subproblem Method Comparison
Compare DC vs SOCP for local subproblems:
# DC subproblems (fastest)
# SOCP subproblems (more accurate)
Penalty Parameter Tuning
Test different ฯ values for convergence behavior:
for; do
done
Performance Characteristics
Expected behavior on typical hardware:
| Network Size | Partitions | ADMM Time | Iterations | Speedup vs Centralized |
|---|---|---|---|---|
| 118-bus | 4 | ~50ms | 15-25 | 0.8-1.2x |
| 300-bus | 4 | ~100ms | 20-30 | 1.0-1.5x |
| 1354-bus | 8 | ~300ms | 25-40 | 1.5-2.5x |
| 2853-bus | 16 | ~500ms | 30-50 | 2.0-4.0x |
Key observations:
- ADMM overhead dominates on small networks (< 200 buses)
- Speedup becomes significant for large networks (> 1000 buses)
- More partitions = more parallelism but more consensus iterations
- DC subproblems are 5-10x faster than SOCP but may need more iterations
Analysis with Python
# Load results
=
# Convergence rate
= /
# Objective accuracy
= * 100
# Speedup analysis
=
# Phase timing breakdown
=
= / * 100
= / * 100
= / * 100
Theoretical Background
ADMM solves the distributed OPF by forming an augmented Lagrangian:
L_ฯ(x, z, ฮป) = ฮฃ_k f_k(x_k) + ฮปแต(x_k - z) + (ฯ/2)||x_k - z||ยฒ
The penalty parameter ฯ controls the trade-off:
- Large ฯ: Faster consensus but suboptimal local solutions
- Small ฯ: Better local solutions but slower consensus
Adaptive penalty scaling adjusts ฯ based on residual ratios to balance convergence.
References
- DPLib Paper: arXiv:2506.20819
- Boyd et al.: "Distributed Optimization and Statistical Learning via ADMM"
- Crate:
crates/gat-algo/src/opf/admm.rs - Partitioning:
crates/gat-algo/src/graph/partition.rs - CLI:
gat benchmark dplib --help