Skip to main content

Indicator constraint for multiplying two binary variables

Answered

Comments

2 comments

  • Mario Ruthmair
    Gurobi Staff Gurobi Staff

    Hi Charitha,

    Indicator constraints only allow linear constraints. What you could do is to introduce additional variables that model the binary products and use those new variables in your indicator constraint, i.e.:

    f(i, j, k, t) = p(i, j, k, t) * u(i, j, t)
    if x(i, j, k) = 1: sum (over t) f(i, j, k, t) = 1

    Apart from that, would it work to immediately reformulate the indicator constraint to the following?

    sum (over t) f(i, j, k, t) = x(i, j, k)

    Best regards,
    Mario

    0
  • Charitha Heendeniya
    Gurobi-versary
    Collaborator
    Investigator

    Thank you. I think this works for me.

    I also have another question, but since it is not directly a follow-up to this thread, I posted it here

    Appreciate if you could have a look at it as well. 

    Best,

    Charitha

    0

Please sign in to leave a comment.