Repository navigation
Start the rectangular AC model from the W-space cone of the same stage (IndACConeStart) - #212
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,
IndACConeStartinoT_Data_Option, off by default and valid only withIndACPowerFlow = 3. With it on,ProblemSolvingcallsACConeWarmStartbefore the solver is set up:coneand without the loop condition.SettingUpVariablesBIMandNetworkBIMOperationModelFormulationtake a mode override, a name tag and a loop-condition switch for this; without them they behave as before.vVreandvVimare set from them; the dispatch keeps the cone's values. The cone cost is kept inmTEPES.pACConeBound[(p, sc, st)].After the solve, the bound and the gap are printed:
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:
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) andtest_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.