Seeking Clarification on Distinguishing "Time limit, without a feasible solution" and "Time limit, feasible solution" in solve_result

Dear Ampl Google Group members,

I have encountered an issue while using Ampl and would appreciate some guidance and advice. I have familiarized myself with the solve_result codes, where the numerical values interpret different outcomes. However, when I attempt to set a time limit, I come across two scenarios: “Time limit, without a feasible solution” and “Time limit, feasible solution,” and both of them display “limit” as their solve_result. This has left me somewhat puzzled.

As per my understanding, the numerical interpretations are as follows:

  • 0-99: Optimal solution found
  • 100-199: Solution found, possibly optimal, but errors might exist
  • 200-299: Infeasible constraints cannot be satisfied
  • 300-399: Unbounded objective, can be improved without limit
  • 400-499: Solve terminated due to a user-set limit (e.g., iterations)
  • 500-599: Solve terminated due to an error condition in the solver

However, when setting a time limit, I am unable to distinguish between “Time limit, without a feasible solution” and “Time limit, feasible solution” as both of their solve_results are “limit.” I would like to know if there is a way to more accurately differentiate these two scenarios so that I can take appropriate actions to improve my model.

If anyone can provide suggestions or sample code on how to address this issue, I would greatly appreciate it.

Thank you for your assistance!

Best regards,

AMPL also provides a builtin numerical parameter solve_result_num, which can be used to distinguish different cases of solve_result. To use this feature, execute

display solve_result_num;

to get the solve_result_num value. Then look up that value in the table at, where the two occurrences of xxx are replaced by the name of the solver that you’re using. (The table is toward the end.)

Values of solve_result_num are different for each solver, so you need to look them up for each solver that is giving this result. If you can’t find the file according to the instructions above, then reply for more help.