Skip to content

Apply start values only when warm start is enabled - #329

Merged
jd-lara merged 1 commit into
mainfrom
mb/warm-start-bug
Sep 28, 2026
Merged

jd-lara merged 1 commit into
mainfrom
mb/warm-start-bug

Conversation

@m-bossart

@m-bossart m-bossart commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

With warm_start = false, several POM builders still set start values:

  • reduction-aware branch variables (PhaseShifterAngle, TapRatioVariable, CosineApproximation)
  • bus voltages under ACP, ACR/IVR and LPAC
  • RegulatedVoltageMagnitude

The solver then gets a partial MIP start.

Changes

Depends on Sienna-Platform/InfrastructureOptimizationModels.jl#172, which adds set_start_value! and the skip_variable hook.

  • Bus voltage variables use IOM's add_variables! with per-bus bound and start-value hooks, replacing POM's own loop.
  • Thermal commitment variables use IOM's builder, with skip_variable for must-run units, replacing POM's custom builder.
  • The branch and regulated-voltage builders keep their own loops (reduced arcs share one variable; regulated voltage keys a container per tag) and set start values through set_start_value!.
  • [sources] points IOM at mb/warm-start-bug until the IOM PR merges.

Worth checking in review:

  • Bus voltage and commitment variables are now created in IOM's loop order (time step outer), which changes JuMP variable order.
  • Start/stop binaries now get explicit 0/1 bounds from hooks POM already defined.

Tests

test/test_warm_start.jl builds 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

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.
@github-actions

Copy link
Copy Markdown

Performance Results

Version Precompile Time
Main 2.592301947
This Branch 2.594193232
Version Build Time
Main-Build Time Precompile 69.023799256
Main-Build Time Postcompile 0.991242159
This Branch-Build Time Precompile 68.979651348
This Branch-Build Time Postcompile 0.849720083
Version Solve Time
Main-Solve Time Precompile 128.61229878
Main-Solve Time Postcompile 102.093188713
This Branch-Solve Time Precompile 511.94476802
This Branch-Solve Time Postcompile 477.778415853

@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.19048% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/network_models/acr_model.jl 66.66% 2 Missing ⚠️
src/network_models/lpacc_model.jl 60.00% 2 Missing ⚠️
src/network_models/acp_model.jl 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

#! 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jd-lara
jd-lara merged commit c18fda7 into main Sep 28, 2026
6 of 7 checks passed
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.

3 participants