Skip to main content

Problems very similar to each other requiring much much different amount of time to be solved



1 comment

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Daniele,

    I do not understand why the time required for finding a solution after the first n iterations is much larger than the first n iterations themselves despite the problems being very similar to each other.

    It is possible that by reducing the size of your feasible set, the optimization direction shifts into a region where the continuous relaxation is weak meaning that the optimal solution might have been found quite some time ago and the solver is struggling in moving the dual bound to provide a proof of optimality. You should look whether your formulation can be strengthened. Our tech talk on weak and strong MIP formulations might be helpful in this case.

    Do you need the proof of optimality in every iteration? If not, then you could check in a callback whether the solution value changed during the last X seconds and terminate early.

    I was also wondering if there was a way to let Gurobi explicitly know that the solution found at the previous iteration basically represents a lower bound (I am minimizing the o.f.) for the next problem since as I said any two subsequent problems only differ from the right hand side of a constraint which is increasing as the iterations go by.

    You could try adding a constraint stating objective >= previous solution value after each iteration. We discuss adding an objective lower bound in How do I pass an objective bound to Gurobi?

    Best regards, 


Please sign in to leave a comment.