Question about solution pool
AnsweredHi,
I am trying to use solution pool to obtain `n` best solutions by setting the PoolSearchMode = 2. I have some binary and some continuous variables in my model. Assuming, there exist at least `n` solutions, is it guaranteed that no two solutions present in the solution pool will have exactly the same set of binary decision values? Thanks. [I am using Gurobi 10.0.1]
-
From the Solution Pool > Subtleties and Limitations section of the documentation:
[...] we define two solutions as being equivalent if
- in the presolved space, the integer variables and continuous variables participating in SOS and bilinear constraints assume the same values, or
- in the original model space, all variables assume the same values.
A solution will be discarded if it is equivalent to another solution that is already in the pool.
So, it could happen that the solution pool contains two solutions whose binary variables in the original model space take on the same values.
0 -
So, if I understand correctly, there could be two solutions in the solution pool for which all the binary variables take the same values, but some of the continuous variables may take slightly different values. Is there a way to avoid this "duplication"? I want each solution to be different in the space of binary variables.
0 -
Two ideas come to mind:
- Solve the model as usual with PoolSearchMode=2 and PoolSolutions=\(n\), then check afterwards if there actually is any undesirable duplication. To account for the possibility of duplication, you could increase the value of the PoolSolutions parameter to a value greater than \( n \).
- Disable presolve by setting the Presolve parameter to 0. Disabling presolve should ensure all binary variables exist in the "presolved" model space, though this will likely impact performance.
0
Please sign in to leave a comment.
Comments
3 comments