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.
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.