More Boolean Conditions
After you have defined binary indicator variables for your constraints, you can use them to create all kinds of Boolean conditions in your models. Here are few examples with the corresponding equations on the binary variables:
(P1 or P2) -> p i1 <= i, i2 <= I P1 and (P2 or P3) i1 = 1, i2 + i3 >= 1 P1 or (P2 and P3) i1 + i2 >= 1, i1 + i3 >= 1 P1 or P2 or P3 i1 + i2 + i3 >= 1 P1 xor P2 xor P3 i1 + i2 + i3 = 1 ATLEAST[k] i1 + i2 + i3 >= k EXACTLY[k] i1 + i2 + i3 = k ATMOST[k] i1 + i2 + i3 <= k p <-> P1 or P2 or P3 i1 + i2 + i3 >= i, i >= i1, i >= i2, i >= i3
p <-> P1 and P2 and P3 i1 + i2 + i3 <= 3 - 1 + i,
i <= i1, i <= i2, i <= i3