Skip to main content

is MIPSOL callback called only on new incumbent or on all integer solutions?

Answered

Comments

5 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Pedro,

    It is the case as described in the documentation, i.e., the MIPSOL callback is called whenever a new incumbent is found. A new incumbent is a solution that improves the primal bound.

    But if MIPSOL is only activated for new incumbent, the final solution pool might contain solutions with subtours.

    If your lazy constraints eliminate solutions with subtours then the final solution pool will not contain these solutions, because they are cutoff by the respective lazy constraint(s).

    Best regards, 
    Jaromił

    0
  • Pedro Castellucci
    First Comment
    Gurobi-versary
    First Question

    Hi Jaromil, 

     

    I appreciate the quick response. But it is still fuzzy to me. I will try to elucidate with an example. 

    Let us say the solver has registered an incumbent with value 100 for a minimization problem. Later, in the optimization, it found a solution with value 105 (with subtours, i.e, not feasible). This 105 solution is not a new incumbent (105 > 100), so MIPSOL *will not* be triggered (right?). Since I did not have a change to add a lazy constraint, there is nothing to tell the solver it is not a valid solution and I am assuming it would (wrongfully) be added to the solution pool.

     

    Cheers, 

    Pedro

     

     

     

     

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Pedro,

    I do not understand your last sentence

    Since I did not have a change to add a lazy constraint, there is nothing to tell the solver it is not a valid solution and I am assuming it would (wrongfully) be added to the solution pool.

    The new solution \(x_{new}\) with value 105 is worse than the old solution \(x_{old}\) with value 100. Thus, it will not be saved in the solution pool, independent of what the lazy constraints do.

    Best regards, 
    Jaromił

    0
  • Pedro Castellucci
    First Comment
    Gurobi-versary
    First Question

    Hi Jaromil, 

     

    I see! So maybe my issue is with the policy of adding solutions to the solution pool. I was under the impression that it saved up to 'PoolSolutions' regardless of the order the solutions were found. 

    So, let us say I warm-start the solver with a solution that ends up being an optimal one. In this case, regardless of how many solutions were found during execution, will the solution pool only contain 1 solution? Would this behavior be the same even if I change the 'PoolSearchMode' parameter?

     

    I appreciate your patience.

    Cheers, 

    Pedro

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Pedro,

    So, let us say I warm-start the solver with a solution that ends up being an optimal one. In this case, regardless of how many solutions were found during execution, will the solution pool only contain 1 solution?

    Yes.

    Would this behavior be the same even if I change the 'PoolSearchMode' parameter?

    The behavior will not change. The PoolSearchMode parameter controls the additional behavior after an optimal solution has been found.

    Best regards, 
    Jaromił

    1

Please sign in to leave a comment.