Skip to main content

Is it normal for the gap to decrease very slowly when solving large-scale MILP models?

Answered

Comments

2 comments

  • 玉鑫 张
    • First Comment
    • First Question

    可以看到,找到可行解后,gap长期是100%,不太清楚这种情况是否正常

    As you can see, after finding a feasible solution, the gap remains at 100% for a long time. I'm not sure if this is normal.

    0
  • Riley Clement
    • Gurobi Staff

    Hi 玉鑫 张 ,

    This can be normal, it all depends on the model.

    Firstly though, I think you are setting way too many parameters.  When we make parameter recommendations for customers, based on their models, we are generally trying to keep the number to 2 or 3 parameters.  Choosing parameters should really be backed by a lot of experimental evidence, see “How can I make accurate comparisons?

    The other thing to note is this line: Presolved model has 3503 SOS constraint(s)

    The SOS constraints, which are not linearized during presolve, represent a large chunk of information that is missing from the linear relaxation, which means the dual bound produced from solving the linear relaxation is very likely weak.  You have directly defined some SOS constraints, but they will also be produced from the PWL constraints.  Sometimes SOS constraints are not linearized when the user has not provided bounds on their variables, or perhaps used weak bounds.  I think it would be worth trying to identify if bounds on variables could be tightened, and see if this helps with the number of SOS that remain after presolve.

    I would also test the effect of PreSOS1BigM and PreSOS2BigM, that is set these to large numbers (1e10 is the max) - use default values for all other parameters - and see whether the SOS constraints are linearized.  Note that setting these parameters to large values can introduce numerical issues.

    - Riley

    0

Please sign in to leave a comment.