Skip to main content

Improving solving (gap closing) time

Answered

Comments

3 comments

  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Koen,

    First of all, great job on the steps you have already taken to speed up the solution time for your model!

    VRPTW are often complex problems to solve. One direction could be to play with the most important parameters that impact the performance of MIP models. I would start with trying different values of Method, Presolve, Cuts, and Heuristics parameters.

    You can also try the NoRelHeuistic by setting the NoRelHeurTime parameter. This heuristic can often find good solutions before the root relaxation is solved.

    Regarding

    However, the lb of the matrix range and objective range are slightly negative, whereas I expected a lb of 0 everywhere. I haven't been able to determine the cause of this yet.

    Not sure if I understand this. The lower bounds on the matrix and objective range are positive in the log (3e-01 and 4e-01, respectively).

    I set the IntegralityFocus parameter to 1 because, in some cases, a binary decision variable approached 0.999..., which didn't affect the objective value in the solution but did affect reading the variables afterward.

    As explained in the article Why does Gurobi sometimes return non-integral values for integer variables?, in a feasible solution, integer variables can take values that deviate from an exact integer value within a tolerance. If the only issue with solutions with binary variables taking a value of 0.999.. is in reading them after optimization is finished, I would suggest handling it via rounding the values once the optimization run is complete instead of setting the IntegralityFocus parameter to 1. Setting IntegralityFocus to 1 can sometimes have a negative impact on solve times.

    Best regards,

    Simran

    0
  • Koen Timmermans
    Gurobi-versary
    Conversationalist
    Curious

    Dear Simran,

    Thank you for the fast and elaborate answer!

    VRPTW are often complex problems to solve. One direction could be to play with the most important parameters that impact the performance of MIP models. I would start with trying different values of MethodPresolveCuts, and Heuristics parameters.

    I forgot to mention that I have already tried the Heuristics parameter, next to the MIPFocus parameter. It didn't really make a difference. Are the Method, Presolve, and Cuts parameters all included in the Parameter Tuning Tool? If that is the case, I might as well just let that run for a couple of hours, to see if it can come up with a set of parameter settings that improves the solution time. Or is it better to try the parameters that you've mentioned one at a time by setting them manually?

    You can also try the NoRelHeuistic by setting the NoRelHeurTime parameter. This heuristic can often find good solutions before the root relaxation is solved.

    Interesting! I will try that as well!

    And regarding

    Not sure if I understand this. The lower bounds on the matrix and objective range are positive in the log (3e-01 and 4e-01, respectively).

    You're totally right! The minus signs were messing with me... ;) I would have expected a lb of 0 nonetheless, but since it is indeed positive, and near zero, I will just accept it.

    And on this

    As explained in the article Why does Gurobi sometimes return non-integral values for integer variables?, in a feasible solution, integer variables can take values that deviate from an exact integer value within a tolerance. If the only issue with solutions with binary variables taking a value of 0.999.. is in reading them after optimization is finished, I would suggest handling it via rounding the values once the optimization run is complete instead of setting the IntegralityFocus parameter to 1. Setting IntegralityFocus to 1 can sometimes have a negative impact on solve times.

    Yes, I believe that the issue was only in reading them after optimization is finished. Luckily it seems that setting the IntegralityFocus parameter doesn't make much of a difference in terms of solving time in my case. But rouding the values when reading the binary variables would be a better option, if there are indeed no problems in the solving itself. I will give it a try.

    Best regards,

    Koen Timmermans

    0
  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Koen,

    The Gurobi parameter tuning tool will consider all parameters while tuning the model, not just a subset. For this reason, it is more likely to find a significant improvement if you let it run for a longer time.

    If you have computing resources, you could let the tuner run for an extended amount of time while doing manual parameter testing in parallel.

    Best regards,

    Simran

    0

Please sign in to leave a comment.