Skip to main content

Solution to unbounded problems

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • 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

Post is closed for comments.