Stopping criteria for PoolSearchMode
AnsweredI'm trying to understand the behaviour of the PoolSearchMode parameter. I have a MIP that I'm solving with PoolSearchMode=1, TimeLimit=30, and PoolSolutions=1000.
On the log I'm seeing that Gurobi finds and optimal solution at around 3 seconds and then it starts completing the solution pool. Then, the solver hits the time limit and stops with status 9, however, SolCount is 1000, and I can use Xn to access the 1000 solutions. All 1000 solutions are distinct and feasible.
According to the documentation of PoolSearchMode, as I'm not looking for any guarantees on the quality of the solutions in the pool, shouldn't the solve terminate when the solver first finds the 1000 solutions I'm asking for? If I increase the time limit the solver eventually terminates, but if I set PoolSearchMode=2 I observe the exact same behaviour. Shouldn't the solver terminate earlier if PoolSearchMode=1? Could you please clarify the stopping criteria when PoolSearchMode=1?
What’s the easiest way to have gurobi terminate after first finding PoolSolutions (and finding the optimal solution)?
Thanks!

Hi Oscar,
You are basically right, if the gap is below the value set by the MIPGap parameter and the desired number of different solutions is found (PoolSolutions), then the solver should terminate.
There are, however, some additional subtleties: The solutions have to differ in the values for the integer variables to count as "different", the continuous variables are ignored here. This could be one reason why your solve takes longer.
Best regards,
Mario0 
If you want have more control over the termination, you could use the MIPSOL callback to check and count solutions, and the current MIP gap, and then call abort() to cancel the process.
0
Please sign in to leave a comment.
Comments
2 comments