1 comment

• Gurobi Staff

If any feasible point has been determined by Gurobi before the problem is declared unbounded, then you can access this arbitrary feasible point via the X attribute. Note that it is possible that Gurobi finds a model to be unbounded before even finding a single feasible point. Then, no solution is available.

You should always check the SolCount attribute before trying to access feasible solutions.

if model.SolCount > 0:  # do something with the solution(s)

Best regards,
Jaromił