メインコンテンツへスキップ

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

回答済み

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • 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

投稿コメントは受け付けていません。