Skip to content

Use MPSolver for the "daily" hydro heuristic#3365

Draft
flomnes wants to merge 15 commits intodevelopfrom
fix/daily-hydro-mpsolver
Draft

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

Conversation

@flomnes
Copy link
Member

@flomnes flomnes commented Jan 25, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant