Handle cuOpt UnboundedOrInfeasible termination status (11)#3916
Handle cuOpt UnboundedOrInfeasible termination status (11)#3916rgsl888prabhu wants to merge 5 commits intoPyomo:mainfrom
Conversation
cuOpt added a new termination status (value 11, UnboundedOrInfeasible) that the PSLP presolver returns when it cannot disambiguate infeasibility from unboundedness. The cuopt_direct plugin's status cascade did not recognize it, falling through to TerminationCondition.error and failing any LP_unbounded test. Adds an elif branch mapping status 11 to TerminationCondition. infeasibleOrUnbounded (with SolverStatus.warning / SolutionStatus.unsure). Also extends the status-code comment block to include status 10 (WorkLimit) and 11 (UnboundedOrInfeasible) for documentation. Tracked in NVIDIA/cuopt#1114. Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
|
This looks reasonable. Can you add a a test that exercises this result from cuOpt? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3916 +/- ##
==========================================
- Coverage 89.94% 89.93% -0.01%
==========================================
Files 902 902
Lines 106457 106461 +4
==========================================
- Hits 95748 95745 -3
- Misses 10709 10716 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
An unbounded LP with no variable bounds triggers cuOpt's presolver to return UnboundedOrInfeasible (status 11); the test asserts the plugin maps it to TerminationCondition.infeasibleOrUnbounded, SolverStatus.warning, and SolutionStatus.unsure.
|
Note: the test appears to require a specific version of cuOpt: |
Status 11 was introduced in cuOpt v26.04.00 (PR #941, tagged 2026-04-09). The CI runs 25.10.0, so PSLP isn't available and status 11 is never produced |
|
There are two things that are holding up this PR:
|
|
We are adopting a new review process where we convert PRs that are "waiting on the author" back to "draft" (to signal the PR state to both the author and the dev team). Please use the "Ready for review" button to signal the developers when it is time to get the PR back into the review queue. |
cuOpt status 11 (UnboundedOrInfeasible) is produced by the presolver introduced in cuOpt 26.04. On older cuOpt the LP in the test reaches the simplex/PDLP path and is reported as TerminationCondition.unbounded instead, failing the assertion. Guard the test with a runtime version check via CUOPTDirect._version. Addresses review feedback on PR Pyomo#3916.
Summary
cuOpt added a new termination status (value 11, `UnboundedOrInfeasible`) that its presolver returns when it cannot disambiguate infeasibility from unboundedness. The `cuopt_direct` plugin's status cascade does not recognize it, so it falls through to `TerminationCondition.error` and fails the `LP_unbounded` test variants (`test_cuopt_python`, `test_cuopt_python_nonsymbolic_labels`, `test_cuopt_python_symbolic_labels`).
Adds an `elif status == 11` branch mapping to `TerminationCondition.infeasibleOrUnbounded` (with `SolverStatus.warning` / `SolutionStatus.unsure`). Also extends the status-code comment block to include status 10 (WorkLimit) and 11 (UnboundedOrInfeasible).
Tracked upstream in NVIDIA/cuopt#1114.