Skip to main content

solver takes ages to close GAP

Answered

Comments

4 comments

  • Donovan Aguilar
    Gurobi-versary
    First Comment
    First Question

    Thanks for your answer Ed. I tried the parameters that you and Jonasz suggested and the solver took around 2.5 times longer than before.

    So I decided to reformulate some bits on my model and now it takes around 7-8 hours to solve with a Gap  <0.40% (below 0.40%) which is enough for my purposes.

    Thank you both for you answers,

    Donovan

    1
  • Jonasz Staszek
    Community Moderator Community Moderator
    Gurobi-versary
    Thought Leader
    First Question

    Hi Donovan,

    to my judgment, you used many of the available parameters which could improve the performance. You could also play with the Cuts parameter to let Gurobi add them more aggressively (e.g. setting it to 2 or 3).

    You can also try using Gurobi's parameter tuning tool - perhaps the automated search will yield better parameter choices.

    I noticed that presolve process reduces your problem drastically (80% of constraints and 90% of variables are removed). Additionally, the cuts that Gurobi adds are quite numerous. Perhaps you could find a way to strengthen the model formulation? This will almost certainly help in finding high-quality solutions. Perhaps the information about the types of cuts that Gurobi added will be beneficial to guide your search for a stronger formulation.

    Additionally, you can look up some other threats that consider similar questions (such as this, this, and this). Maybe these will give you further ideas.

    Best regards
    Jonasz

    0
  • Donovan Aguilar
    Gurobi-versary
    First Comment
    First Question

    Thanks for answering Jonasz. My model has a very high number of parameters with values = 0 that later are part of constraints and variables, perhaps that is the reason why the pre-solver removes a high percentage of constraints and variables. I will try the CUTS parameter and see what happens with that, later if I do not see any improvement I will try the tuning tool. 

    Thanks again,

    Donovan

    0
  • Ed Klotz
    Gurobi Staff Gurobi Staff

    Looking at the log file you provided, Gurobi spends over an hour during the root node cut loop, yet the progress in the best bound is pretty modest.   And all the added cuts may add run time to the node LPs in the tree search as well.     So you might try setting the Cuts parameter to 0 and see if the gain you get from  improved node throughput exceeds any loss in progress in the best bound.    Also, you could try setting the presolve parameter to 2, which may further reduce the problem size and tighten the formulation. 

     

    Ed

    0

Please sign in to leave a comment.