ampl / amplpy

Python API for AMPL

Home Page:https://amplpy.ampl.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get solve_exitcode

poroale opened this issue · comments

I can display the exitcode after the optimization using ampl.display("solve_exitcode"), but is there some method that allows me to get the exitcode? After I've called ampl.solve() I would like to know if the solution I found was optimal/feasible/infeasible. I'm mainly interested in the result codes provided by the Gurobi solver: http://www.gurobi.com/documentation/7.5/ampl-gurobi/results.html.

After digging the documentation a bit more thoroughly I the needed method at https://ampl.com/api/nightly/python/classes/objective.html?highlight=exitcode#amplpy.Objective.exitcode.