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

Summation if binary variables are set

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three 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.
  • Jaromił Najman
    • Gurobi Staff

    I am not sure I understand what you want. Do you mean something like:

    Given binary variables \(b_1,\dots,b_n\)

    \[\begin{align*}
    \sum_{i=1}^n b_i \cdot i \cdot c_i \leq d
    \end{align*}\]

    where \(c_i,d\) are some constants.

    0
  • Mahbubul Alam Palash
    • Gurobi-versary
    • First Comment
    • First Question


    Thanks for replying. Yes, something similar to what you said and I am trying this with the  GRBLinExpr. I hope it will work. Thanks

    0

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