ampl / mp

An open-source library for mathematical programming
https://mp.ampl.com
Other
229 stars 42 forks source link

Split solve_result? #146

Open glebbelov opened 3 years ago

glebbelov commented 3 years ago

The solve_result returned by a solver is currently a mix of the following information kinds: solution status, termination reason, possibly error code, some extra solution info, and a list of any extra information returned via suffixes, see, e.g., https://www.gurobi.com/documentation/9.1/ampl-gurobi/results.html. Packing it all into one number makes it hard to represent all possible combinations: e.g., solution can be suboptimal but stopped due to time limit.

A possible simplification is to split the result code. The current code keeps the solution status (optimal/feasible/feasible with tolerance/infeasible etc), while other categories are reported in new problem suffixes.

glebbelov commented 3 years ago

It was decided to provide the split codes as additional information in problem suffixes, for compatibility.