1 | initial version |
Hello, @Sim! I don't know about Gurobi, so perhaps its behaviour could be different, but at least with GLPK, you have the following possibilities:
M
has a solution: The instruction M.solve()
should show you the optimum value of the objective function. Additionally, you can write M.get_values(x)
, where x
is the family of variables of the MILP, in order to get the values that produce the optimum.M
is infeasible: Sage should show you the message "MIPSolverException: GLPK: Problem has no feasible solution
".print
statement with a message such as "Time constraint exceeded!"Concerning the option "terminated by some external factor", it is not clear to me what you mean by "external factor". However, any event I could think of that could fit this description, should be rare enough to not have to worry about it. (Perhaps you could elaborate on this or present a couple of hypothetical examples.)
I hope this helps!