Skip to main content

How to model constraint to send only when facility is open?

Answered

Comments

1 comment

  • Riley Clement
    • Gurobi Staff

    Hi Tanmoy,

    If select[s, r] is a binary variable, then it can be no larger than 1.  Consequently a constraint 

    deploy[s, o, r] <= select[s, r]

    would mean that deploy[s, o, r] could also not be larger than 1 as you have discovered.  If you were to instead use the constraint

    deploy[s, o, r] <= M*select[s, r]

    For some constant value M, then it would allow deploy[s, o, r] to have a value up to M whenever select[s, r].  I will leave it to you to decide what your M values should be, but my advice is not to make them any larger than they need to be.

    - Riley

    0

Please sign in to leave a comment.