Skip to content

Use MPSolver for the "daily" hydro heuristic - #3365

Closed
flomnes wants to merge 15 commits into
developfrom
fix/daily-hydro-mpsolver
Closed

Use MPSolver for the "daily" hydro heuristic#3365
flomnes wants to merge 15 commits into
developfrom
fix/daily-hydro-mpsolver

Conversation

@flomnes

@flomnes flomnes commented Jan 25, 2026

Copy link
Copy Markdown
Member

No description provided.

The new MPSolver implementation was not setting DonneesMensuelles->ResultatsValides
to indicate whether solving succeeded or failed. This caused the calling code in
daily.cpp to always throw an exception since it checks this field to determine
if solving succeeded.

Set ResultatsValides to OUI when solver succeeds (OPTIMAL or FEASIBLE status)
and NON otherwise, matching the behavior of the old SPX-based solver.
- Wrap MPSolver object in std::unique_ptr for automatic memory management
- Replace if..else block with ternary operator for setting ResultatsValides
@flomnes
flomnes marked this pull request as draft January 25, 2026 23:24
@flomnes flomnes changed the title Fix: Set ResultatsValides in H2O_J_MPSolver_Solve Use MPSolver for the "daily" hydro heuristic Jan 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@flomnes flomnes added the stale Pull request has been inactive for an extended period label Apr 23, 2026
@flomnes

flomnes commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

Hey @flomnes, is this still relevant?

@flomnes flomnes closed this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL stale Pull request has been inactive for an extended period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant