Skip to main content

Question about solution pool

Answered

Comments

3 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    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
  • Tushar Rathi
    Gurobi-versary
    Conversationalist
    First Question

    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
  • Eli Towle
    Gurobi Staff Gurobi Staff

    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.