Skip to main content

Solution to unbounded problems

Answered

Comments

1 comment

  • Jaromił Najman
    Gurobi Staff 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ł

    0

Please sign in to leave a comment.