Skip to main content

Any good practice for using bigM?

Answered

Comments

2 comments

  • Richard Oberdieck
    Gurobi Staff Gurobi Staff

    Hi Yongning,

    in general, I can recommend to you this blog post by Paul Rubin on the subject, it covers a lot of important aspects.

    Beyond that, you could try to "calculate" your tightest big-M for a given model. So suppose you use a big-M formulation

    such as this:

    ```

    t <= y*M

    ```

     

    Then, you could find out what the largest value is that `t` can attain. You can do this by solving the model with the objective function:

     

    ```

    max. t

    ```

     

    This will then return to you the biggest value that the variable t can have, and consequently the smallest value that M can have. This of course only works for this particular model; if your data changes, this value may change. However, it can (a) give you an indication on how "good" your big-M value is and (b) inspire you to find ways to tighten the formulation.

     

    Hope this helps.

    Best

    Richard

     

     

    0
  • 永宁 赵
    Gurobi-versary
    First Comment
    First Question

    Many thanks, Richard. That's quite informative and useful.

    0

Please sign in to leave a comment.