Bug report: Different settings of MIPFocus result in different number of solutions
AnsweredDuring the experiments, we find a possible bug with details as follows:
We construct a model in the C++ API and set the PoolSearchMode=2 to compute the number of solutions. With different values of MIPFocus, the numbers of solutions returned by the solver are different. When we set MIPFocus = 1, the number of solutions is 648; when MIPFocus = 3, the number of solutions is 3. We read the reference for the MIPFocus and believe the value of MIPFocus should not affect the number.
We have prepared a minimal example to reproduce the possible bug, please find it in the link https://github.com/hukaisdu/gurobi_bug_report. To use the code, just use the Makefile after correctly setting the GUROBI_HOME. The version of our gurobi is Gurobi Optimizer version 9.1.1 build v9.1.1rc0 (linux64). We can produce the bug in different Linux platforms.
Could you please help to check the reason for this?
-
Hi Kai,
Setting a different value for parameter MIPFocus usually significantly changes the solution path of the branch-and-bound algorithm in Gurobi. With MIPFocus=1, Gurobi focuses on finding good feasible solutions by built-in heuristics. So the chance is very high that you get a lot of solutions with this setting. On the other hand, MIPFocus=3 focuses mostly on improving the dual bound to prove optimality. In this setting it is quite common that not too many primal solutions appear.
Together with PoolSearchMode you might be interested in setting parameter PoolSolutions to define a target on the number of solutions you want to have in your pool. Did you set any other parameters related to the solution pool?
Best regards,
Mario0 -
Hi Kai,
It seems that you are right, there is something strange going on. We are investigating this case currently at Gurobi. Thanks for pointing us to this!
Best regards,
Mario0 -
Hi Mario,
Thanks for your comments. I did not set other parameters except the PoolSearchMode or MIPFocus (or Thread). However, when I additionally set another value of Seed, the results became normal. In other words, only when the Seed was set as default, we can observe the bug.
Best,
Kai
0 -
Hi Kai,
Yes, this is also what we observed, for some Seed values there are much less solutions than expected, for others it works normally. We are still on this and keep you updated.
Best regards,
Mario0 -
Hi Kai,
You got already an answer in your support ticket, here is an update on that issue for the community: This is indeed a bug in version 9.1.2 and it will be fixed in the next release later this year.
Best regards,
Mario0 -
Hi Mario,
Thanks for your assistance very much. LoL
Best,
Kai0 -
Hi Kai,
Gurobi 9.5 was recently released. Included in this release is a fix for the bug you observed in the number of solutions found when using PoolSearchMode=2 and MIPFocus=3.
We hope this fix works well for you. Thanks for reporting this bug and please let us know if you see any other issues in the future.
Best regards,
Maliheh
0
Please sign in to leave a comment.
Comments
7 comments