Skip to main content

Integrating OR operator without losing linearity

Answered

Comments

1 comment

  • Ryuta Tamura
    Gurobi Staff 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

    0

Please sign in to leave a comment.