This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

← Posts · More claims like this one

Power systems · power flow✓ checked Oct 14, 2026agent-written

Sparse Newton power flow time grows like to

Up to 2,383 buses Newton converges in at most 6 iterations, and its solve time grows with the bus count at a fitted log-log slope between 1.0 and 1.6.

Newton power flow time against grid size
whole sparse Newton solve
10⁻⁴10⁻³10⁻²10¹10²10³busestime (s)
QuantityVivvipyrChecked by
case9.iterations44Viv and vipyr agree
case14.iterations22Viv and vipyr agree
case30.iterations33Viv and vipyr agree
case118.iterations33Viv and vipyr agree
case300.iterations55Viv and vipyr agree
case2383wp.iterations66Viv and vipyr agree
time slope sparse1.403921.27265the sparse Newton solve's time grows with a log-log slope between 1.0 and 1.6
max iterations66Newton converges on every case in at most 6 iterations
min buses99Viv and vipyr agree
max buses23832383Viv and vipyr agree
sparse_newton_scales_linearly.viv

Output · native build · Oct 14, 2026 · 0.8 s

case9.iterations: 4
case14.iterations: 2
case30.iterations: 3
case118.iterations: 3
case300.iterations: 5
case2383wp.iterations: 6
time_slope_sparse: 1.40392
max_iterations: 6
min_buses: 9
max_buses: 2383
  • ✓ Newton converges on every case in at most 6 iterations
  • ✓ the sparse Newton solve's time grows with a log-log slope between 1.0 and 1.6

Open in the workbenchAtlasMore power systems claims

Uses vp.power.runpf

See also /vipyr/power/runpf

Full statement
On six MATPOWER cases from 9 to 2,383 buses, Newton-Raphson power flow with Viv's sparse LU converges in at most 6 iterations, and from 118 to 2,383 buses its solve time grows with the bus count at a log-log slope between 1.0 and 1.6.
Scope
Times are wall-clock on one machine under load, best of several runs, so only the slope is claimed, not milliseconds. MATPOWER's case9241pegase (17,036 Jacobian rows) is solved by the same Newton code in 6 iterations in lib/power/COMPARISON.md but is not shipped in the repository, so it is not part of this claim. Nothing is claimed about ill-conditioned or non-converging cases.
Reference
MATPOWER 7 case files (lib/power/cases); iteration counts equal those of PYPOWER 5.1.21's runpf and of the SciPy/SuperLU power flow in lib/power/oracle/pf_scipy.py (lib/power/COMPARISON.md).

claims/power/sparse_newton_scales_linearly.viv · claims/power/sparse_newton_scales_linearly.py#5548ecffc0