Skip to content

Commit

Permalink
InfOrUnb: hints in solve_message and docs #243
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Sep 16, 2024
1 parent 737c0d3 commit a095247
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
24 changes: 12 additions & 12 deletions doc/source/features-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,18 @@ MP details the solve result codes as follows:
.. code-block:: ampl
ampl: shell "mosek -!";
Solve result table for MOSEK 10.0.43
0- 99 solved: optimal for an optimization problem, feasible for a satisfaction problem
100-199 solved? solution candidate returned but error likely
150 solved? MP solution check failed (option sol:chk:fail)
200-299 infeasible
300-349 unbounded, feasible solution returned
350-399 unbounded, no feasible solution returned
400-449 limit, feasible: stopped, e.g., on iterations or Ctrl-C
450-469 limit, problem is either infeasible or unbounded
470-499 limit, no solution returned
500-999 failure, no solution returned
550 failure: numeric issue, no feasible solution
Solve result table for MOSEK 10.2.0
0- 99 solved: optimal for an optimization problem, feasible for a satisfaction problem
100-199 solved? solution candidate returned but error likely
150 solved? MP solution check failed (option sol:chk:fail)
200-299 infeasible
300-349 unbounded, feasible solution returned
350-399 unbounded, no feasible solution returned
400-449 limit, feasible: stopped, e.g., on iterations or Ctrl-C
450-469 limit, problem is either infeasible or unbounded. Disable dual reductions or run IIS finder for definitive answer.
470-499 limit, no solution returned
500-999 failure, no solution returned
550 failure: numeric issue, no feasible solution
Individual solvers may add more specific values in the corresponding ranges.
To list solver-specific codes, use command-line switch ``-!`` as above,
Expand Down
4 changes: 3 additions & 1 deletion solvers/copt/coptbackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ std::pair<int, std::string> CoptBackend::GetSolveResult() {
case COPT_MIPSTATUS_INFEASIBLE:
return { sol::INFEASIBLE, "infeasible problem" };
case COPT_MIPSTATUS_INF_OR_UNB:
return { sol::INF_OR_UNB, "infeasible or unbounded problem" };
return { sol::INF_OR_UNB, "infeasible or unbounded problem. "
"Disable dual reductions "
"or run IIS finder for definitive answer." };
case COPT_MIPSTATUS_UNBOUNDED:
if (solstatus)
return { sol::UNBOUNDED_FEAS, "unbounded problem, feasible solution" };
Expand Down
4 changes: 3 additions & 1 deletion solvers/cplex/cplexbackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,9 @@ std::pair<int, std::string> CplexBackend::GetSolveResult() {
case CPX_STAT_INForUNBD:
case CPXMIP_INForUNBD:
case CPX_STAT_MULTIOBJ_INForUNBD:
return { sol::LIMIT_INF_UNB, "infeasible or unbounded problem" };
return { sol::LIMIT_INF_UNB, "infeasible or unbounded problem. "
"Disable dual reductions "
"or run IIS finder for definitive answer." };
case CPX_STAT_UNBOUNDED:
case CPXMIP_UNBOUNDED:
case CPX_STAT_MULTIOBJ_UNBOUNDED:
Expand Down
4 changes: 3 additions & 1 deletion solvers/gurobi/gurobibackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,9 @@ std::pair<int, std::string> GurobiBackend::GetSolveResult() {
case GRB_INFEASIBLE:
return { sol::INFEASIBLE, "infeasible problem" };
case GRB_INF_OR_UNBD:
return { sol::LIMIT_INF_UNB, "infeasible or unbounded problem" };
return { sol::LIMIT_INF_UNB, "infeasible or unbounded problem. "
"Set dualreductions=0 "
"or iis=1 for definitive answer." };
case GRB_UNBOUNDED:
if (has_sol)
return { sol::UNBOUNDED_FEAS, "unbounded problem, feasible solution" };
Expand Down
4 changes: 3 additions & 1 deletion solvers/highsmp/highsmpbackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ std::pair<int, std::string> HighsBackend::GetSolveResult() {
return { sol::UNBOUNDED_FEAS, "unbounded problem, feasible solution" };
return { sol::UNBOUNDED_NO_FEAS, "unbounded problem, no solution" };
case kHighsModelStatusUnboundedOrInfeasible:
return { sol::LIMIT_INF_UNB, "unbounded or infeasible" };
return { sol::LIMIT_INF_UNB, "unbounded or infeasible. "
"Disable dual reductions "
"or run IIS finder for definitive answer." };
case kHighsModelStatusModelError:
case kHighsModelStatusLoadError:
if (kHighsSolutionStatusInfeasible == primal_solution_status) // HiGHS 7
Expand Down
4 changes: 3 additions & 1 deletion src/solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,9 @@ SolveResultRegistry::SolveResultRegistry()
"limit, feasible: "
"stopped, e.g., on iterations or Ctrl-C " },
{ sol::LIMIT_INF_UNB, sol::LIMIT_INF_UNB_LAST,
"limit, problem is either infeasible or unbounded " },
"limit, problem is either infeasible or unbounded. "
"Disable dual reductions "
"or run IIS finder for definitive answer." },
{ sol::LIMIT_NO_FEAS, sol::LIMIT_NO_FEAS_LAST,
"limit, no solution returned " },
{ sol::FAILURE, sol::FAILURE_LAST,
Expand Down

0 comments on commit a095247

Please sign in to comment.