RC4 / AC power flow

The stopwatch starts after warm‑up.
The ranking starts with the residual.

GridSim and seven other solvers ran the same 245 networks from a flat start. A timing counted only when all ten attempts converged and an independent check on the original case put the residual at or below 1e-8 pu. On every case where GridSim and another solver both passed, GridSim's sparse solver was the fastest.

The headline

Four numbers, and what each one means.

148 / 245

Networks GridSim solved and passed: 112 MATPOWER and PGLib cases and all 36 GridSim-Models networks. Most of the rest are cases no solver converged on from a flat start, or that the reader refused.

109 / 109

Cases where GridSim's CPU sparse solver had the shortest mean solve time, out of every case where it and at least one other solver passed the residual check.

4.29×

Median, over those 109 cases, of the fastest other solver's mean time divided by GridSim's. A ratio taken case by case, not a single speed-up.

0.76 s

Mean time per solve on the largest case solved, the 20,758-bus PGLib case20758_epigrids (__api variant), to a residual of 8.7e-9 pu.

The field

Eight tools. One harness.

The same harness drove every solver on every case: GridSim, MATPOWER, pandapower, PyPSA, VeraGrid, PowSyBl, ANDES and PowerModels. The pandapower path ran with LightSim2Grid disabled. ANDES adds 1e-8 pu to line resistance and reactance, so it fails the original-case residual check by design and is left out of the "fastest other solver" comparison.

The catalogue holds 209 MATPOWER-format cases from MATPOWER and PGLib-OPF after power-flow-equivalent duplicates were removed, plus the 36 GridSim-Models national and regional networks.

Benchmark criteria
GridSim CPU sparse, by tier
TierCasesPassedNo solver convergedReader refused
Standard, up to 5,000 buses1621043621
Large, above 5,000 buses478247
GridSim-Models363600

One standard case uses an unsupported field (dcline). In the large tier one case failed only in GridSim (case13659pegase, which now converges and matches PowSyBl to 2.8e-13 pu) and seven did not finish: the run stopped when another solver hit its memory cap on the shared box. The 28 reader refusals were PGLib generator rows with PMIN above PMAX, which the reader now loads with a warning.

Eligibility before ranking

A timing alone did not qualify.

  1. Same case and settings

    Flat start, tolerance 1e-8 pu, at most 50 iterations, reactive limits off; the mean of ten warmed solve calls, solve API only.

  2. All ten timed attempts converged

    A mean solve time was not enough when a path failed the convergence criterion.

  3. Original-case residual ≤ 1e-8 pu

    An independent residual check on the original electrical case, for every tool.

  4. At least one eligible other solver

    The 109-case ranking leaves out GridSim-only passes and cases without a qualifying result from another tool.

How the run was set up
ItemValue
GridSim buildRC4 2.1.073, commit 7b648759; Release, tiered JIT off
MachineLinux x86-64, 4 vCPU, 20 GB RAM, NVIDIA RTX A4000
ConcurrencyThree tiers at once, each pinned to its own CPU, so timings include shared memory-bandwidth contention
Paired subset112 GridSim CPU sparse passes, of which 109 have an eligible other solver
Normalised paired-median ratio: GridSim 1 and fastest eligible external 4.29.
Source: RC4 comparison tables and CSVs. Open the full-size graphic.

Inside GridSim

Why sparse is the default.

Sparse against dense on 9,241 buses

On case9241pegase, the largest meshed case in the gridsim bench matrix, the sparse engine took 1,178 ms where the dense engine took 199,934 ms. Both reached the same iteration count and the same mismatch, 6 iterations and 2.13e-9: on the CPU the two engines agree to the last bit, so the choice is speed alone. This was measured before the RC-4 ordering change below.

Minimum-degree ordering in RC-4

RC-4 replaced reverse Cuthill-McKee with an exact minimum-degree ordering for the sparse LU. On an EPYC 7763 server large sparse solves became 4 to 7 times faster: case_ACTIVSg2000 from 306 to 46 ms and case3375wp from 560 to 83 ms. The change moved results by at most 9.7e-13 pu on 66 MATPOWER cases, with identical iteration counts, and shipped labelled as a BREAKING CHANGE.

How breaking changes are labelled
GridSim-Models tier, 36 national and regional networksCPU sparse: 36 of 36 passedTen bit-identical results per networkPeak memory 394 MBGPU sparse: 35 of 36

Read the comparison

Every case, every tool, in the CSVs.

Reader refusals, failed residuals and cases no tool solved are all in the data beside the wins.

The RC4 results, charts and CSVs are in the repository under docs/developer/benchmarks/rc4-2.1.073.

All benchmark runsThe 20,758-bus case in detail