Skip to content

Start the rectangular AC model from the W-space cone of the same stage (IndACConeStart) - #212

Merged
erikfilias merged 1 commit into
masterfrom
feat/ac-cone-warm-start
Oct 10, 2026
Merged

erikfilias merged 1 commit into
masterfrom
feat/ac-cone-warm-start

Conversation

@erikfilias

Copy link
Copy Markdown
Contributor

Problem

The exact AC model in rectangular coordinates (IndACPowerFlow = 3) starts Ipopt from a flat profile, every bus at 1.0 p.u. and zero angle. On a 695-bus case a coupled day takes 9 to 20 minutes that way, and the only warm start openTEPES has is the one of the AC recovery step in branch flow (IndACRestoreWarmStart, #209), which does not apply here.

The usual second step in the literature is to solve a convex relaxation first and start the non-linear solve from its point (Kocuk, Dey and Sun 2016; Venzke, Chatzivasileiadis and Molzahn 2020). The relaxation also gives what a flat start cannot: its cost is a lower bound on the exact cost, so the distance between the two certifies the local optimum.

Solution

A new option, IndACConeStart in oT_Data_Option, off by default and valid only with IndACPowerFlow = 3. With it on, ProblemSolving calls ACConeWarmStart before the solver is set up:

  1. The rectangular constraints of the stage are deactivated.
  2. The W-space variables are declared and the cone block of the same stage is built beside them, under the name tag cone and without the loop condition. SettingUpVariablesBIM and NetworkBIMOperationModelFormulation take a mode override, a name tag and a loop-condition switch for this; without them they behave as before.
  3. The cone is solved, with Gurobi when it is available and with the run's solver otherwise. A failed barrier is tried again with presolve off, then with the dual reductions on: on 6 of 24 day-bundles of a 695-bus case the presets stopped at the second iteration and one of the two settled it.
  4. The cone's W is projected to rank one: the voltage magnitude of each bus is the square root of its W diagonal, the angle difference across each branch is the argument of its W off-diagonal, and the angles are propagated from the reference bus of each connected part along a spanning tree. vVre and vVim are set from them; the dispatch keeps the cone's values. The cone cost is kept in mTEPES.pACConeBound[(p, sc, st)].
  5. The cone block and its variables are removed and the rectangular constraints are activated again. If the cone does not solve, a warning says so and the solve starts flat.

After the solve, the bound and the gap are printed:

AC cone lower bound          cost [MEUR]  0.035714  gap 2.949 % of the exact cost

Observed behaviour

9n_AC, first two hours, Ipopt: flat start and cone start reach the same total cost, 0.0367991 MEUR; the cone bound is 0.035714 MEUR, a gap of 2.95 per cent.

695-bus Nordic case, 15 January, 24 coupled hours with storage, Ipopt with MUMPS. The cone took Gurobi 16 seconds and gave the bound 56.639704 MEUR, 0.13 per cent below the exact cost. On this day the start saves iterations but not time, and the cone-started run goes to the optimal exit where the flat one stopped at the acceptable level:

Start Iterations Ipopt seconds Exit Operation cost of generation
Flat 467 732 acceptable level 56.714938 MEUR
W-space cone 423 878 optimal 56.714902 MEUR

Tests

tests/test_ac_input.py: test_cone_start_reaches_the_flat_start_optimum (the same optimum, the bound below the cost, no cone block or variable left on the model) and test_cone_start_needs_the_rectangular_model (the option refused with any other network model). The two AC test files pass on the branch, 116 tests.

Files

openTEPES_ModelFormulationElectricity.py, openTEPES_ProblemSolving.py, openTEPES_InputData.py, openTEPES_DataConfiguration.py, openTEPES.py, doc/md/InputData.md, CHANGELOG.md, tests/test_ac_input.py. Every module touched carries the date of 10 October 2026 in its header.

…e (IndACConeStart)

The exact AC model in rectangular coordinates (IndACPowerFlow = 3) started
from a flat profile. With the new option the W-space cone of the stage is
solved first, its cost is kept as a lower bound on the exact cost, and the
voltages are set from its rank-one projection: the magnitude from the W
diagonal, the angle differences from the arguments of the W off-diagonals,
propagated from the reference bus along a spanning tree. The dispatch keeps
the cone's values. The cone is solved with Gurobi when it is available and
with the run's solver otherwise; a failed barrier is tried again with presolve
off, then with the dual reductions on. The solve that follows reports the gap
to the bound. Off by default; refused with any other network model.

SettingUpVariablesBIM and NetworkBIMOperationModelFormulation take a mode
override, a name tag and a loop-condition switch so the cone block can be
built beside the rectangular one and removed again; without them they behave
as before.
@erikfilias
erikfilias merged commit 628a1b1 into master Oct 10, 2026
14 checks passed
@erikfilias
erikfilias deleted the feat/ac-cone-warm-start branch October 10, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant