Skip to content

Route every start value through set_start_value! - #172

Open
m-bossart wants to merge 1 commit into
mainfrom
mb/warm-start-bug
Open

m-bossart wants to merge 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

A model built with warm_start = false could still reach the solver with start values.
Builders that create variables outside IOM's add_variables! had to check the setting themselves, and several in POM didn't.
A partial MIP start is expensive: on a 24-hour nodal ERCOT day-ahead model, Gurobi spent 29 minutes completing one before presolve.

Changes

  • set_start_value!(container, variable, value) applies a start value only when warm start is enabled, and does nothing for nothing.
    The device and service variable builders now use it.
    It is exported so downstream builders that create variables directly can call it.
  • skip_variable(V, device, F) (default false) lets add_variables! leave a device off a variable's axis.
    POM uses it to drop must-run units from thermal commitment variables, which removes a custom builder.

Tests

test/test_start_values.jl covers set_start_value! under both settings, the device builder's warm-start hook, and skip_variable, including the case where every device is skipped.

Companion POM PR: Sienna-Platform/PowerOperationsModels.jl#329

🤖 Generated with Claude Code

Add `set_start_value!(container, variable, value)`, which applies a start value only
when warm start is enabled, and use it in the device and service variable builders.
Downstream builders that create variables directly call the same function, so
`warm_start = false` reaches the solver with no start values.

Add a `skip_variable(V, device, F)` hook that leaves a device off a variable's axis,
so downstream builders that only filtered devices can use the generic builder.
@github-actions

Copy link
Copy Markdown
Contributor

Performance Results
Main


This branch


@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/common_models/interfaces.jl 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

2 participants