Skip to main content

MIQP Model taking forever to compute

Answered

Comments

3 comments

  • Maliheh Aramon
    Gurobi Staff Gurobi Staff

    Hi, 

    The model numerics are not great mainly because the coefficient matrix spans over a wide range of 7 orders of magnitude. However, using Gurobi version 11.0.3 and NoRelHeurTime=60, the gap is around 8.4% in 2 minutes. Do you want to solve the model to optimality? 

    You can consider experimenting with different combinations of the parameters below:

    Best regards,

    Maliheh

    0
  • Gaurav Malik
    Collaborator
    Curious

    Hello Maliheh, 

     

    Thanks for the reply. The coefficient matrix only starts from 9e-6 which is almost 1e-5. Do you still think that it is a serious issue?
    I have already experimented with NoRelHeurTime parameter. It does help in finding good feasible solutions but the optimality is not proved. 
    MIPFocus=2 also doesn't change a lot. 

    I will try the other parameters.

    The optimality gap of 8% does not really tell anything in this case. I will be needing something more like 0.1%. Is there anything more that can be done?

    Thanks in advance!

    Regards

    Gaurav 

    0
  • Maliheh Aramon
    Gurobi Staff Gurobi Staff

    The coefficient matrix only starts from 9e-6 which is almost 1e-5. Do you still think that it is a serious issue?

    As explained in the Gurobi Numerical Guidelines section "Advanced User Scaling," we ideally prefer the matrix coefficient range to be within six orders of magnitude or less, specifically between 1e-3 and 1e6. There is no warning message in the log indicating that this is causing a numerical issue. However, better model numerics typically lead to better performance.

    Is there anything more that can be done?

    Based on the runs I conducted, the bottleneck in closing the gap appears to be slow progress in improving the best bound. The parameters previously shared focus on model strengthening and generating cutting planes more aggressively. You can add the parameters VarBranch=3 and BranchDir=1|-1 to the previous list to experiment with.

    Other suggestions include:

    • Define the tightest possible lower and upper bounds for all variables participating in the bilinear terms.
    • Consider potential reformulation ideas, if possible, to reduce the number of bilinear terms.

    Maliheh

    0

Please sign in to leave a comment.