Apply start values only when warm start is enabled - #329
Merged
Merged
Conversation
Branch variables (PhaseShifterAngle, TapRatioVariable, CosineApproximation), bus voltages (ACP, ACR/IVR, LPAC) and RegulatedVoltageMagnitude got start values even with `warm_start = false`. A partial MIP start makes Gurobi complete it before presolve, which cost 29 minutes on a nodal day-ahead model. Bus voltage and thermal commitment variables now use IOM's `add_variables!` with per-bus hooks and `skip_variable` for must-run units. The reduction-aware branch and regulated-voltage builders keep their own loops and set start values through `set_start_value!`. `test_warm_start.jl` builds each affected model with warm start off and on. Sources IOM from the `mb/warm-start-bug` branch until the IOM change merges.
|
Performance Results
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
luke-kiernan
approved these changes
Sep 28, 2026
| #! format: off | ||
| # bus voltage limits are already per-unit | ||
| get_variable_binary(::Type{VoltageMagnitude}, ::Type{PSY.ACBus}, ::Type{ACPNetworkModel}) = false | ||
| get_variable_lower_bound(::Type{VoltageMagnitude}, bus::PSY.ACBus, ::Type{ACPNetworkModel}) = PSY.get_voltage_limits(bus).min |
Collaborator
There was a problem hiding this comment.
Huh. it's a little odd the get_voltage_limits(bus) runs: I'd expect it to error and require get_voltage_limits(bus, {SU/CU/NU} instead.
I opened an issue in PSY for the question of "do voltage fields like these get the units conversion treatment" here.
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
With
warm_start = false, several POM builders still set start values:PhaseShifterAngle,TapRatioVariable,CosineApproximation)RegulatedVoltageMagnitudeThe solver then gets a partial MIP start.
Changes
Depends on Sienna-Platform/InfrastructureOptimizationModels.jl#172, which adds
set_start_value!and theskip_variablehook.add_variables!with per-bus bound and start-value hooks, replacing POM's own loop.skip_variablefor must-run units, replacing POM's custom builder.set_start_value!.[sources]points IOM atmb/warm-start-buguntil the IOM PR merges.Worth checking in review:
Tests
test/test_warm_start.jlbuilds unit commitment, DCP phase control, ACP, ACR with a regulated-voltage device, and LPAC models.With warm start off, no variable has a start value; with it on, the affected variables all do.
It also checks that must-run units carry no commitment variables.
The full suite passes (131,912 tests).
🤖 Generated with Claude Code