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

how to formulate a "if- then" with Non-binary variable as condition

回答済み

コメント

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

    You can define an auxiliary variable \(x = x_1 + 2 x_2 + x_3\) and then follow the instructions in How do I model conditional statements in Gurobi? to model if \(x\geq 2\) then \(z=1\).

    1
  • Xinyi Xie
    • Gurobi-versary
    • First Comment
    • First Question

    thank you

    0

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