Skip to main content

How to model the indicator function in Gurobi

Answered

Comments

1 comment

  • Tobias Achterberg
    Gurobi Staff Gurobi Staff

    Yes, using an indicator is the right way to go. And it is very easy, you just need to invert the direction of the indicator. Instead of

    f_r > 0 -> i_r = 1

    you would enforce

    i_r = 0 -> f_r <= 0

    This is mathematically equivalent, and it fits to how indicators in Gurobi are defined.

    0

Please sign in to leave a comment.