update dual status for specific case

This commit is contained in:
Peter Mitri
2025-01-23 10:41:34 +01:00
parent 5377f7c345
commit ebdbfc0166

View File

@@ -495,9 +495,13 @@ SolutionStatusProto XpressSolver::getDualSolutionStatus() const {
case XPRS_SOLSTATUS_FEASIBLE:
return SOLUTION_STATUS_FEASIBLE;
case XPRS_SOLSTATUS_INFEASIBLE:
// when primal is unbounded, XPRESS returns unbounded for dual also
case XPRS_SOLSTATUS_UNBOUNDED:
return SOLUTION_STATUS_INFEASIBLE;
case XPRS_SOLSTATUS_UNBOUNDED:
// when primal is unbounded, XPRESS returns unbounded for dual also (known
// issue). this is a temporary workaround
return (xpress_lp_status_.primal_status == XPRS_LP_UNBOUNDED)
? SOLUTION_STATUS_INFEASIBLE
: SOLUTION_STATUS_UNDETERMINED;
case XPRS_SOLSTATUS_NOTFOUND:
return SOLUTION_STATUS_UNDETERMINED;
default: