Performance#

Where does the time of a study go? This page profiles the MV/LV feeder case study (gridforge/case_study/mv_lv_feeder.py) to tell which part is worth making faster before choosing a power flow engine (issue #13).

Summary#

  • The case study takes 5.8 CPU-hours over 149 feeders. 99.6 % of that time goes to the runs with 30 % of flexible load, and 96 % to 54 runs of more than a minute, on feeders of 314 buses or more.

  • The flexibility strategy drives that time. Each of its steps runs a power flow, then recomputes the voltage sensitivities of every bus, about 118,000 times over the study.

  • The sensitivities take 61 % of the study, and strategy logic outside the engine 23 %, most of it pandas row iteration in FlexibilityStrategy._evaluate_actions.

  • The power flow takes 6.3 %, of which pandapower’s Newton-Raphson loop is 2.7 %. A power flow engine infinitely faster than pandapower would therefore make the study at most 1.07 times faster. A direct adapter to a faster engine (#7) is not worth building for speed. Faster sensitivities (#12) and a cheaper flexibility strategy (#19) are.

  • The 38 runs that end unresolved, all with flexibility, take 78 % of the time: they use their 3 passes in full, while every feeder is resolved without flexibility (#20).

  • The warm start of #6 cuts the Newton iterations by 24 to 47 % with identical results, but barely changes the time of a run, since the power flow is a small part of it.

  • Since then, #12 and #19 have made the runs with flexibility 5.6 times cheaper, from 20,885 to 3,709 CPU-seconds. Then #20 found that the voltage sensitivities were 100 times too large on these feeders, which made the flexibility strategy take hundreds of tiny steps. With that fixed, every run is resolved, and the runs with flexibility take 163 CPU-seconds: the whole study takes about 4 CPU-minutes, against 5.8 CPU-hours at first (see the sections below).

  • #22 then chose the strategies by the cost of the run they lead to. The runs with flexibility cost 0.4 % less in total, none more, and take 1.9 times longer, so the whole study takes about 6 CPU-minutes on an idle machine.

  • The stable release (#50 to #66) changes what the runs decide more than how fast they decide it. On version 1 of the 150 feeders, at 0.3.0, the study cost 36.22 M€ without flexibility and 9.82 M€ with 30 % of flexible load, against 48.39 M€ and 27.39 M€ before it, and shed 149.2 MW against 90.1 MW. A flexibility call now goes on where it used to stop at the first violation that no asset could relieve (#63), which makes 2.4 times more power flows: the whole study took about 24 CPU-minutes in one worker process on a loaded machine (see “The stable release” below).

  • Version 2 of the feeders (#14) fuses the switch at the head of each feeder, as in the Roseau source, which lifts every voltage of the feeder a little: the study now costs 34.63 M€ without flexibility and 9.50 M€ with 30 %, and sheds 145.5 MW, all

    300 runs resolved (see “Version 2 of the feeders (#14)”).

  • New MV/LV substations, the no-load tap and the planning profiles (#80): on the 150 feeders of version 2, the standard profile, which has the no-load tap priced at 700 € HT per visit, costs 33.608 M€ without flexibility and 9.190 M€ with 30 %, against 34.629 M€ and 9.495 M€ in 0.4.0, and all 300 runs are resolved. The new substations are built by the extended profile and not by standard (see “New MV/LV substations and planning profiles (#80)”).

Method#

benchmarks/profile_study.py runs the case study as mv_lv_feeder.py does: it loads a feeder, scales its loads by 2.5, runs GridEnhancementAlgorithm with the case study’s strategies and budget (3 passes), and writes the HTML visualisation of the run. Without flexibility, the strategies are line and transformer upgrades; with 30 % of flexible load, flexibility comes first.

It splits the time of each run by wrapping the methods of the engine and the algorithm. Each call is charged its own time, minus the time of the wrapped calls it makes, so that nested calls are counted once. The categories are:

Category

What it covers

pandapower runpp

pandapower.runpp, including its Newton-Raphson loop, reported apart

power flow (gridforge)

run_power_flow around runpp

sensitivities

the voltage and branch loading sensitivity methods of the engine

Jacobian rebuild

the Jacobian at the solution that the sensitivities use (#6)

violation checks

check_violations

network queries and mutation

the get_* methods, and the methods that apply actions

snapshots, logging, visualisation

copies of the network kept by the algorithm, writing the INFO logs to a file, the HTML page of the run

other

everything else: the logic of the strategies and of the algorithm, including building the log messages

Measurements#

Measured on 9 November 2026 with Python 3.12.13, pandapower 3.2.2, numpy 2.5.4, scipy 1.18.1 and numba 0.68.1, on an AMD Ryzen 9 3900X (12 cores, 24 threads) shared with other work: its load average was 3 to 15 during the study. The runs with flexibility and the comparison around #6 were measured at commit 807b42d. The runs without flexibility and the cProfile were measured again at 9699256, after a fix of the script (below); the library code is the same apart from a docstring. Each run records its commit and environment in the raw results, in benchmarks/results/2026-11-09. The results after #12, #19, #20 and #22 were measured before their code was committed: they record the parent commit with dirty: true, so the commit alone does not identify the code measured. Since #47 the script also records a hash of the uncommitted changes. Loading the feeder files is not included.

The full study#

The 150 feeders of gridforge/data/pandapower, without and with flexibility, in 4 worker processes with OMP_NUM_THREADS=1. 84_MVFeeder4049.json could not be read by pandapower 3.2.2 until its file was repaired (#45), which leaves 149 feeders and 298 runs. They take 20,971 CPU-seconds. The whole study took 5,422 s of wall-clock time.

In that first run of the study, the first run of each worker process included the compilation of numba’s functions, about 2 s. This only weighed on the runs without flexibility, which take 92 s in all, so those were measured again with a warm-up in each process (study_no_flexibility_rerun.json). The table uses the rerun.

Category

Without flexibility

With 30 % flexibility

Whole study

sensitivities

1.8 %

61.4 %

61.2 %

other (strategy logic)

8.4 %

23.3 %

23.3 %

pandapower runpp

17.7 %

6.1 %

6.1 %

violation checks

13.3 %

5.2 %

5.2 %

network queries

4.0 %

1.5 %

1.5 %

Jacobian rebuild

0.9 %

1.3 %

1.3 %

network mutation

3.2 %

0.5 %

0.5 %

visualisation

42.6 %

0.2 %

0.4 %

snapshots, logging, power flow (gridforge)

8.1 %

0.5 %

0.5 %

Total

86 s

20,885 s

20,971 s

The time of a run has a long tail: the median run takes 0.84 s, the 90th percentile 282 s, the longest 1,352 s (84_MVFeeder2000, 1,437 buses, with flexibility). On average over the study:

  • a power flow (runpp) takes 10.7 ms, of which 4.8 ms in Newton-Raphson, with 1.27 iterations per solve thanks to the warm start;

  • a call to the sensitivities takes 109 ms, ten times a power flow, and there is one after almost every power flow (117,748 calls for 119,632 power flows);

  • a violation check takes 9.1 ms, and a rebuild of the Jacobian 2.3 ms.

The 38 runs that end with violations left are all with flexibility. They stop at the end of their 3 passes, 27 of them with a single violation left, while the same feeders are resolved in 2 or 3 actions without flexibility. They take 78 % of the study’s time.

Inside the sensitivities and the strategy logic#

A cProfile of 24_MVFeeder1448 (527 buses) with flexibility, whose split resembles that of the long runs, shows where these two categories go. FlexibilityStrategy makes 518 evaluations of its candidate actions, each after a power flow:

  • each evaluation calls calculate_voltage_power_sensitivities, which solves the Jacobian against a dense identity matrix to get its whole inverse, and keeps one row (#12, first point);

  • calculate_branch_loading_sensitivities, for overloads, solves once per bus in a Python loop: 11,081 solves for 7 calls on 53_MVFeeder0641 (#12, second point);

  • _evaluate_actions iterates over the flexible assets with DataFrame.iterrows, which builds a pandas Series for each of the 418,000 rows it visits: this is most of the “other” category (#19).

With and without the warm start of #6#

The median feeder (75_MVFeeder0100, 541 buses) and the largest one (53_MVFeeder0641, 1,584 buses), run three times each, one process for the code before #6 (4c41a92) and one for the code after it (807b42d), at the same time. Times are medians; results (actions and costs) are identical.

Run

Total, before

Total, after

runpp, before

runpp, after

Newton iterations

median feeder, no flexibility

0.43 s

0.36 s

0.115 s

0.061 s

15 → 10

largest feeder, no flexibility

0.81 s

0.76 s

0.159 s

0.086 s

15 → 8

median feeder, 30 % flexibility

0.93 s

0.91 s

0.148 s

0.086 s

21 → 16

largest feeder, 30 % flexibility

8.64 s

8.61 s

0.309 s

0.172 s

30 → 19

The warm start cuts the power flow time by 42 to 47 %, but on these feeders, drawing the results page dominates the runs without flexibility (48 to 77 %), and the sensitivities those with flexibility (39 to 83 %). Neither depends on the engine.

After faster sensitivities (#12)#

#12 replaced the inverse of the Jacobian by transposed solves of one LU factorisation, for the rows the strategies use. The runs with 30 % flexibility were measured again on that code, the same way (4 processes, all 149 feeders). The machine was more loaded than in the first study (load average 17 to 36), so these times are, if anything, too long.

Runs with 30 % flexibility

Before #12

After #12

CPU time

20,885 s

8,742 s (2.4 times less)

a call to the sensitivities

109 ms

2.7 ms

longest run

1,352 s

498 s

sensitivities

61.4 %

3.7 %

other (strategy logic)

23.3 %

56.9 %

pandapower runpp, of which Newton-Raphson

6.1 %, 2.7 %

15.9 %, 7.3 %

violation checks

5.2 %

13.6 %

Jacobian rebuild

1.3 %

3.4 %

146 of the 149 runs take the same decisions, at the same cost. In the other three, the sensitivities, equal to about 1e-15 relative, lead after hundreds of steps to a voltage that is on one side of its limit or the other by less than the solver’s precision: the new code meets a “violation” of 1.4e-11 pu on 11_MVFeeder1365 and spends one more pass on it. Two of these runs end 0.2 % and 3.5 % dearer, the third makes 25 fewer power flows for the same result. Decisions should not depend on such noise (#18). Since #18 they are taken on the solution after one more Newton step, which agrees whatever the start of the run (see “Precision of the Power Flow” in the methodology).

The strategy logic is now most of the time, and the power flow 16.5 %: an infinitely fast engine would make these runs at most 1.2 times faster.

After a cheaper flexibility strategy (#19)#

At each step, FlexibilityStrategy._evaluate_actions built a pandas row for every flexible asset. #19 scores the assets on whole columns instead, and builds a candidate only for the assets that pass every test. The runs with 30 % flexibility were measured again (4 processes, all 149 feeders, load average 4 to 5).

Runs with 30 % flexibility

After #12

After #19

CPU time

8,742 s

3,709 s (2.4 times less)

wall-clock time, 4 processes

2,251 s

967 s

longest run (32_MVFeeder0100)

498 s

154 s

other (strategy logic)

56.9 %

7.7 %

pandapower runpp, of which Newton-Raphson

15.9 %, 7.3 %

35.2 %, 15.4 %

violation checks

13.6 %

29.5 %

sensitivities

3.7 %

8.4 %

Jacobian rebuild

3.4 %

7.4 %

All 149 runs take the same decisions, at the same cost and with the same number of Newton iterations. The machine was busier during the measurement after #12 (load average 17 to 36), so the three feeders named in #19 were also run with both versions side by side, at the same time. That comparison gives the same gain, so the busier machine explains little of it:

Feeder, 30 % flexibility

After #12

After #19

24_MVFeeder1448

29.4 s

14.3 s

84_MVFeeder2000

291.8 s

115.0 s

32_MVFeeder0100

367.7 s

167.6 s

#19 also proposed computing the sensitivities less often than at every step. After #12 they cost 2.7 ms a call and, with the Jacobian rebuild, 16 % of these runs. Reusing them across steps would save at most that, and would change the decisions, so it was not done.

After fixing the flexibility strategy (#20)#

#20 asked why 38 feeders that upgrades alone resolve were left unresolved with flexibility. There were two causes:

  • The voltage sensitivities were 100 times too large. The Jacobian is in per-unit of the network’s base power, and the feeders have sn_mva = 100. The sensitivities were not converted to pu per MW, so the flexibility strategy shed a hundredth of what each step needed. A voltage violation shrank by about 1 % a step, and the strategy ran out of its 500 steps before resolving it.

  • A planning change undid the operation actions until the next pass. After an upgrade, the algorithm reverted all flexibility actions, to choose them again on the upgraded network, but did not choose them again. The violations they had resolved came back, and the 3 passes ran out.

Both are fixed. The whole study was run again (4 processes, all 149 feeders, load average 2 to 3):

Runs with 30 % flexibility

After #19

After #20

resolved

111 of 149

149 of 149

CPU time

3,709 s

163 s (23 times less)

longest run (32_MVFeeder0100)

154 s

6.1 s

power flows

118,537

3,963

passes used

3 by every unresolved run

1 (0 for the 5 feeders without violations)

total cost, against no flexibility

27 % less

The runs without flexibility are unchanged. The runs with flexibility now cost 27 % less in total than the same feeders without it, and the 38 newly resolved ones 26 % less. Of the 111 runs that were already resolved, 52 take other decisions with the correct step sizes, at a total cost 5 % lower: 48 are cheaper and 4 at most 0.5 % dearer.

Three runs cost more with flexibility than without: 28_MVFeeder0290 (179 against 45) and 75_MVFeeder0165 (419 against 187), as before #20, and 76_MVFeeder2386 (3.08 M€ against 2.50 M€). The algorithm tries the cheaper kind of strategy first, flexibility before upgrades, and does not compare what each would cost in total.

Where the time of the runs with flexibility now goes: pandapower runpp 27.0 % (of which Newton-Raphson 13.7 %), violation checks 23.2 %, writing the HTML visualisation of the run 22.0 %, snapshots 6.2 %, network queries 5.2 %, sensitivities 4.7 %, strategy logic 4.6 %, Jacobian rebuild 3.9 %.

Choosing strategies by the cost of the run (#22)#

After #20, three runs cost more with flexibility than without, because the algorithm tried flexibility before upgrades whatever their prices. With a cost model, it now tries the strategies of a violation type from each of them in turn, finishes the run from each choice in the order of the cost levels, and keeps the choice whose run ends cheapest (see “Methodology”). The runs with flexibility were made with the former choice and the new one side by side, 2 processes each, on a machine loaded by other jobs (load average 13 to 21), so their times are comparable with each other but not with the sections above:

Runs with 30 % flexibility

Former choice (as after #20)

After #22

total cost

49.04 M€

48.84 M€ (0.4 % less)

runs cheaper, dearer

11 (one of them by a cent), none

runs dearer than without flexibility

3

1

CPU time

231 s

428 s (1.9 times more)

longest run (32_MVFeeder0100)

9.6 s

37.3 s

power flows

3,963

8,560

The former choice gives the same costs as after #20 on every feeder. The runs without flexibility have one strategy per violation type, so nothing to choose: they are unchanged, with the same 1,131 power flows. With flexibility, finishing the run from each choice doubles the power flows and recomputes sensitivities: they are now 22.0 % of these runs, the power flow 25.5 %, the violation checks 21.0 %. The results of the whole study, with and without flexibility, are in benchmarks/results/2026-11-11/study_after_22.json. That file is another run of the new choice, in 4 processes: its costs and power flows are those of the table, its CPU time with flexibility is 481 s.

28_MVFeeder0290 and 75_MVFeeder0165 now upgrade their line, at 45 € and 187 € like without flexibility, instead of shedding load for 179 € and 419 €. The largest gain is on 32_MVFeeder0835, 249 k€ instead of 356 k€.

76_MVFeeder2386 still costs 3.08 M€ against 2.50 M€ without flexibility. Its only choice is at the transformer overloads: shedding then a transformer upgrade, which leads to 3.08 M€, or the upgrade alone, which leads to 3.14 M€ because flexibility is then used on the line overloads. Without flexibility, the 62 lines upgraded for their loading also raise the voltages. With flexibility, 26 lines are upgraded, and the under-voltages left take 15 upgrades of MV lines for 2.35 M€, three of them parallel circuits on one 3.2 km line. Only a deeper search, rating each choice by runs that also choose, would see that a run without flexibility is cheaper. Comparing a strategy with the cost of the whole run does not make it so; trying one choice at a time does.

Choosing in the order of the cost levels only, but keeping at each violation type the cheapest chain of strategies, made the total 2.0 % dearer than after #20, with 24 runs dearer: a fix that is cheaper on its own often leaves dearer work to the next violation type. That is why the choice is rated by the end of the run.

What to make faster#

From the first study, in order of the time they would save:

  1. The sensitivities (61 %): solve for the rows that are used instead of the whole inverse, and transpose the per-bus loop of the branch loading sensitivities. Done in #12, see above.

  2. The flexibility strategy (most of the 23 % of strategy logic, 57 % after #12): iterate over arrays instead of iterrows. Done in #19, see above: 7.7 % remains.

  3. The unresolved runs with flexibility (78 % of the time): the voltage sensitivities were 100 times too large, and operation actions were not chosen again after an upgrade. Done in #20, see above: the study now takes about 4 CPU-minutes.

At that size, the study is no longer worth making faster for its own sake. If larger studies need it: the power flow is 27 % of the runs with flexibility, the violation checks 23 % (#21), and the HTML visualisation 22 %, the largest part of the runs without flexibility (42 %).

Reproducing#

From the root of the repository, with the feeders fetched (uv run python -m gridforge.data fetch, see “Data” in Installation), or in --data-dir:

# The full study, as above
OMP_NUM_THREADS=1 uv run python benchmarks/profile_study.py study --workers 4 \
    --out study.json

# Some feeders, three times each, with a cProfile of each case
OMP_NUM_THREADS=1 uv run python benchmarks/profile_study.py profile \
    --feeders 75_MVFeeder0100 53_MVFeeder0641 --repeat 3 \
    --cprofile-dir cprofile --out profile.json

To profile another version, put its checkout first on PYTHONPATH and pass it as --expect-root, which fails if Python imports another copy of gridforge.

Fixes of the review of !7 to !17 (#23 to #48)#

The study was run after the fixes of the review, at commit eda363b, and again with the code as after #22, both in 3 worker processes with OMP_NUM_THREADS=1 on a machine loaded by other jobs (load average 10 to 19), so that their times compare, roughly. Results: benchmarks/results/2026-11-11/study_after_review_fixes.json and study_after_22_same_settings.json (run from an archive of the code, hence without a commit). The runs now also record the load they shed.

The file of 84_MVFeeder4049 is repaired (#45), so both runs are on the 150 feeders: the costs of the 149 others with the code as after #22 are those of study_after_22.json. All 150 are resolved in one pass, without and with flexibility.

150 feeders

After #22

After the fixes

total cost without flexibility

67.81 M€

48.39 M€ (28.6 % less)

runs cheaper, dearer

95, 5

total cost with 30 % flexibility

49.30 M€

27.39 M€ (44.4 % less)

runs cheaper, dearer

101, 40

load shed with 30 % flexibility

28.2 MW

90.1 MW

runs dearer with flexibility than without

1

none

CPU time without flexibility

88 s

141 s

CPU time with flexibility

358 s

760 s

power flows with flexibility

8,593

16,914

Without flexibility, the costs fall because the thermal sizing of lines no longer adds conductors to lines already brought within their limit, nor replaces a line by one of lower rating (#32), and because a line taken through several types, by one action or by several, is charged for what the run lays (#34): the cost reported for the lines is that of the difference between the initial and the final network. Five runs cost more, by 349 k€ in total, 245 k€ of it on 76_MVFeeder2386 (2.75 M€ against 2.50 M€): its line overloads now cost half as much, but the conductors that were added for nothing also raised the voltages, and the under-voltages left take more upgrades.

With flexibility, most of the fall comes from the relief threshold applied to the candidates together (#39): flexibility is now used on feeders with many small loads, and three times more load is shed in total, at 10 k€/MW, in place of line upgrades. 76_MVFeeder2386 costs 0.75 M€ instead of 3.08 M€, shedding 2.9 MW instead of 0.4 MW. The 40 runs that cost more do so by 39 k€ in total. The largest rise is that of 52_MVFeeder0192, 111.5 k€ against 100.9 k€; the largest relative ones are on runs of a few hundred euros of shedding (53_MVFeeder1507, 970 € against 512 €). These runs make more flexibility steps, hence twice the power flows and about twice the CPU time (1.7 times in an earlier pair of runs: the load of the machine differs between runs). The longest run takes 52 s (76_MVFeeder2386) against 19 s (32_MVFeeder0100).

The transformer types of the feeders that are outside the upgrade ladder (315, 500, 800, 1000, 2000 and 3150 kVA; 60 of the feeders have some) can now be given a unit in parallel, and are priced in MV_LV_FEEDER by extending the line through the prices of 400 and 630 kVA. These prices are assumptions.

The stable release (#50 to #66)#

The study was run on the milestone branch after each issue of the stable release that can change a decision, with OMP_NUM_THREADS=1 and 1 to 3 worker processes on a machine loaded by other jobs, so that the times below compare only roughly. Results: benchmarks/results/2026-11-17/, one file per row of the table. All 300 runs are resolved at every step, in one pass, but for one run after #63 that took two (11_MVFeeder4794 with flexibility).

150 feeders

cost without flexibility

cost with 30 % flexibility

load shed with 30 %

power flows without / with

before the milestone (study_main_39df6d8.json)

48.39 M€

27.39 M€

90.1 MW

1,391 / 16,914

after #52 (study_after_52_final.json)

37.99 M€

21.60 M€

74.2 MW

1,220 / 16,043

after #59 (study_after_58_59.json)

38.04 M€

21.60 M€

74.2 MW

1,222 / 16,043

after #63 (study_after_63.json)

38.04 M€

10.38 M€

140.5 MW

1,222 / 39,098

after #60 (study_after_60.json)

36.22 M€

9.82 M€

149.2 MW

1,571 / 40,492

after #66, #57, #65 and #64 (study_stable_release.json)

36.22 M€

9.82 M€

149.2 MW

1,571 / 40,492

Four steps move the study; the changelog gives the runs behind each figure.

  • #52: with prices, a thermal upgrade takes the cheapest of a larger type and of elements of the type in place in parallel. The study prices a conductor added in parallel like a replacement of the type in place, so it now mostly adds parallel elements: 21.5 % less without flexibility (136 runs cheaper, 7 dearer by 33 k€ in all) and 21.1 % less with it (120 cheaper, 1 dearer by 3 k€).

  • #59: a line given conductors in parallel can still take fewer conductors of a larger type. Without flexibility 14 runs are cheaper, by 42 k€ in all, and 32_MVFeeder0835 is dearer by 91 k€: its line taken back leaves an MV bus 0.87 µpu under its limit, and a 0.83 km MV line is replaced to lift it. Nothing moves with flexibility.

  • #63: a flexibility call acts on the violations of the group it is given, and no longer stops at the first of them that no asset can relieve. With 30 % of flexible load the study costs 52 % less (104 runs cheaper, 10 dearer by 2 k€ in all), sheds 140.5 MW against 74.2 MW, and makes 2.4 times more power flows, in 2.4 times the CPU time (1,332 s against 553 s). The runs without flexibility do not move.

  • #60: with prices, the voltage steps of the line upgrade strategy are chosen by the voltage they buy per euro. The study costs 4.8 % less without flexibility (59 runs cheaper, 5 dearer by 80 k€ in all) and 5.4 % less with it (21 cheaper, 8 dearer by 29 k€), for 29 % more power flows without flexibility.

Two issues move costs without moving a decision: with the same actions, passes and power flows, #55 changes the cost of 139 runs with flexibility by at most 1.30 € (the powers of the flexibility actions are no longer rounded to 1 W) and #18 that of 69 runs by less than 0.001 €. The other issues of the milestone leave every run of the study as it was, in actions, passes, costs, load shed and power flows: the engine and loop fixes (#50, #51, #53, #54, #56, #62), the transformers charged for what the run lays (#58), the earlier violation given another turn (#66), the steps checked after the change (#57), the see-saw threshold at its default of 5 % (#65: the flexible assets of the study are loads only) and the small defects of #64, the name rules of loads and generators included.

In one worker process the runs without flexibility take 91 to 119 CPU-seconds and those with flexibility 1,314 to 1,412, about 24 CPU-minutes for the study, against 11 before the milestone (662 s in 3 workers). The longest run takes about a minute (76_MVFeeder2386). No run costs more with flexibility than without.

Version 2 of the feeders (#14)#

Version 2 of the feeders gives the switch at the head of each feeder z_ohm = 0 instead of 0.1 Ω, so that pandapower fuses the bus of the external grid with the first MV bus, as the ideal switch of the Roseau source; it also gives the slack bus coordinates and removes two redundant load columns from 84_MVFeeder4049, which move no power flow (see “Data” in Installation). At the load of the study, the voltages rise by 0.0019 p.u. at the median of the feeders and 0.012 p.u. at most, and the buses under their limit at the start go from 6,967 to 6,228. The reference of version 2 is the study run on the tip of the milestone (commit 17d5a3b) with OMP_NUM_THREADS=1 and one worker process on a machine loaded by other jobs (benchmarks/results/2026-11-24/study_milestone2.json), whose "data" record says version 2, its 150 feeders checked and current; version 1 is benchmarks/results/2026-11-17/study_stable_release.json. It is identical in all 300 runs, in actions, passes, costs, load shed, violations left and power flows, to the run made when #14 was merged (benchmarks/results/2026-11-23/study_after_14.json), which records a commit of the branch from before a rebase and no record of the data.

150 feeders

cost without flexibility

cost with 30 % flexibility

load shed with 30 %

power flows without / with

version 1 (2026-11-17/study_stable_release.json)

36.22 M€

9.82 M€

149.2 MW

1,571 / 40,492

version 2 (2026-11-24/study_milestone2.json)

34.63 M€

9.50 M€

145.5 MW

1,460 / 39,334

All 300 runs are resolved, in one pass, and none costs more with flexibility than without. Without flexibility 68 runs change, 65 of them cheaper by 1.60 M€ in all and 3 dearer by 8.7 k€ (32_MVFeeder1627 by 7.0 k€); with 30 % of flexible load 139 change, 126 cheaper by 347 k€ and 13 dearer by 26.7 k€ (84_MVFeeder2468 by 8.1 k€). Every run is identical, in actions, passes, costs, load shed, violations left, Newton iterations and power flows, to the run of version 1 with the switch fused as each feeder is loaded, on the code of 0.3.0 (benchmarks/results/2026-11-23/study_fused_switch.json, made by profile_study.py with switch.z_ohm set to 0 after mv_lv_feeder.load_network; its record says commit 29f4d47, clean, as the switch was set at load by a patch outside the repository): the coordinates and the columns change nothing, and nothing else in the code of the branch moves a decision. The runs without flexibility took 84 CPU-seconds and those with flexibility 1,234, about 22 CPU-minutes (1,453 s of wall time), in the run of #14; 112 and 1,679, about 30 CPU-minutes (1,956 s), in the reference run.

New MV/LV substations and planning profiles (#80)#

The 150 feeders of version 2, with loads × 2.5 and 0 and 30 % of flexible load: 300 runs per row, all resolved, with no error. The rows of the profiles are the 2026-11-27 batch (benchmarks/results/2026-11-27/study_profile_*.json, commit 0a6daf0, 2 workers under nice); the other rows are from other batches, and CPU is compared within a batch only. The settings and the feeder-by-feeder comparison of the profiles are in Planning profiles.

Run (result file)

Cost 0 % (M€)

Cost 30 % (M€)

Shed 30 % (MW)

Tap visits 0 / 30 %

CPU s, 0 / 30 %

Release 0.4.0, no cap (2026-11-24/study_milestone2.json)

34.629

9.495

145.5

–

112 / 1,679

Cap of 3, strategy off, before the tap (2026-11-25/study_step7_off_cap_3.json)

34.637

9.493

145.3

–

83 / 1,223

Cap of 3, max_new_substations 1 (2026-11-25/study_step7_on_max1.json; 2 and 3 identical)

34.637

9.470

141.7

–

146 / 1,389

standard, no-load tap at 700 € (2026-11-27/study_step6e_tap_default.json, commit 2a850d7)

33.608

9.190

134.1

134 / 25

116 / 1,440

standard (2026-11-27/study_profile_standard.json)

33.608

9.190

134.1

134 / 25

129 / 1,657

screening (study_profile_screening.json)

33.609

9.246

138.2

135 / 54

79 / 689

extended (study_profile_extended.json)

33.384

9.167

134.3

109 / 31

148 / 1,836

hosting_capacity, no prices (study_profile_hosting_capacity.json)

not priced

not priced

149.5

119 / 41

71 / 577

The cap of 3 conductors moves 7 of the 300 runs, all resolved (6 at 0 %, 1 at 30 %). The cap is a modelling choice of the case study (see “Conductors in Parallel” in the methodology). The new substation strategy was first measured in the batch of 2026-11-25, under the default order, with max_new_substations of 1, 2 and 3 (the three runs are identical): it builds no unit at 0 %, and at 30 % it builds three units, one on each of three feeders of the 150 runs (11_MVFeeder3298, 75_MVFeeder2731, 75_MVFeeder3319), each with a 10 m MV cable, which lower the total cost of the 150 runs at 30 % by 23,548 € against the cap-3 run. The no-load tap is priced per visit: the standard profile makes 134 interventions at 0 % and 25 at 30 %, where the tap was priced at 10 € per position before.

extended builds one unit at each level of flexibility: 22,941 € at 0 % and 17,941 € at 30 % in all, the works, the unit and a 10 m cable, with one LV line opened. Its CPU is 1.15 and 1.11 times that of standard in the same batch.