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

Integrating OR operator without losing linearity

回答済み

コメント

3件のコメント

  • 正式なコメント
    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.
  • Ryuta Tamura
    • Gurobi Staff

    Hi,

    By using SOS-1 constraint, it can be solved as MILP. For example, the constraint that the variables x and y cannot be nonzero at the same time can be written as follows:

    model.addSOS(GRB.SOS_TYPE1, [x, y])

    Thanks,
    Ryuta

    1
  • Adam Lakatos
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Ryuta,

    Apologies for the late response, I just got around to trying your suggestion. It worked great, thank you very much. 

    Best,

    Adam

    0

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