Skip to main content

Understanding log warnings for MIP problem

Answered

Comments

7 comments

  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Amal,

    The large matrix and RHS coefficients in your model appear to be causing numerical issues within the solution process. The other warnings are symptoms of such numerical issues.

    Ideally, all ranges should have a width of 1e4 or less, and we should definitely worry when any of them is bigger than 1e8. In your model the matrix coefficient and RHS ranges of [1e+00, 1e+11] and [5e+00, 1e+14] are significantly larger than this rule of thumb. For more information, you can read our Guidelines for Numerical Issues. I recommend re-formulating/re-scaling your model to avoid such large ranges and solving it again.

    Best regards,

    -Dan

     

    0
  • Amal Nammouchi
    Gurobi-versary
    First Question
    Conversationalist

    Hi Dan,

    thank you for your answer.

    what does it mean if the model is achieving an optimal objective value even though those warnings exist? that's what I find it difficult to understand.

    Also, I tried to change some parameters as mentioned in the documentation but still faced the same warnings. I then thought of decreasing the big M value which is part of my model, and no longer had the warnings, the result though seem a little bit confusing as if it's no longer optimising for that value of M. Any insights of how I can maintain small range while using the big M value in my model?

     

    Thank you

     

    0
  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Amal,

    As discussed in the Guidelines for Numerical Issues (see here), Gurobi relies on floating-point numbers for representing data and performing computations. Floating-point numbers are amenable to computation on standard computer hardware, but only store a finite approximation to each number. This necessitates the use of numerical tolerances. For example, a solution is considered feasible even if it violates some constraints by a very small amount (which is controlled by the parameter FeasibilityTol with a default value of 1e-6).

    So how could a solution that violates this tolerance be returned? Before solving a MIP, Gurobi applies a presolve routine to compute an equivalent model with reduced size and improved numerical properties – the presolved model is then solved, and the solution is translated back to the original model. In some cases, a solution satisfies the numerical tolerances for the presolved model, but when translated back to the original formulation, the violations may be larger, resulting in warning messages such as those you have encountered. This is often the result of numerical issues, which can be due to large coefficients.

    This behavior may be resolved by reformulating your model to avoid having a very large “big M.” To do this, you could try using your knowledge of the problem to choose an M as small as possible, while still having a correct model. Or you may find it helpful to scale some variables and constraints by changing the units (e.g., instead of a variable representing the number of units produced, use a variable representing thousands of units produced). Another option could be to use the Gurobi indicator constraint as an alternative to big-M.

    I hope this helps,

    -Dan

    0
  • Amal Nammouchi
    Gurobi-versary
    First Question
    Conversationalist

    Thank you Dan for your answer. I am looking into the different explanation and suggestions you provided. 

    Another question that is bugging me is that in my case the objective range is equal to 1. Do you have a possible explanation for that? with my little knowledge, I think it should be an interval . Thank you

     Objective range  [1e+00, 1e+00]

    0
  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Amal,

    Sure, this statistic reports the range of the absolute values of the nonzero coefficients.

     Objective range  [1e+00, 1e+00]

    So the above range indicates that the objective coefficients had values of 1, 0, or -1.

    -Dan

    0
  • Gabriel Pimenta
    Gurobi-versary
    First Comment
    First Question

    Dan Steffy, I'm having the same problem mentioned above "Warning: 1 variables dropped from basis." Can you clarify what it means?

    0
  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Gabriel,

    Warning: ... variables dropped from basis.

    The above warning is typically a sign that the solver is experiencing numerical difficulties. It occurs when a basis encountered in the simplex algorithm is detected to be singular, and the solver remedies this by dropping some variables from the basis and forming a different basis. This may be done by replacing some structural variables in the basis with slack variables.

    If you are experiencing the above warning message, please consult the Guidelines for Numerical Issues or the suggestions earlier in this discussion for guidance on improving the numerical properties of your model.

     

    0

Please sign in to leave a comment.