Skip to main content

Can Gurobi always find multiple optimal solutions if they exist?

Answered

Comments

4 comments

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Kiera,

    With reference to the PoolSearchMode docs, what is the value of PoolObjBound at the end of the run?  If you change the objective sense, from min to max, or max to min, do you obtain the same solution?  Can you construct an alternative optimal solution - if you can what happens if you use it as a MIP start?

    - Riley

    0
  • Kiera Dobbs
    First Comment
    First Question

    Hi Riley,

    Thank you for your suggestions! My initial problem was that my assignment variables were still set to be continuous by default instead of binary.

    With that fixed, I can now obtain multiple solutions in the solution pool. However, they're all duplicates of the same optimal solution. Is there a way to get distinct optimal solutions?

    For this particular test instance, all feasible assignments are optimal (the graph is complete and all edge weights are the same). So the PoolObjBound value is the optimal value. When changing from max to min, I do obtain the same solution and all solutions in the pool are the same assignment. I've also tried inputting an alternative optimal solution as a MIP start and the solution pool then only has duplicates of that solution.

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Kiera,

    You should be able to achieve what you want by using the PoolIgnore attribute on variables.

    Let me know if there's anything unclear in that doc page?

    - Riley

    0
  • Kiera Dobbs
    First Comment
    First Question

    Thank you!

    0

Please sign in to leave a comment.