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:
NOT P1 i1 = 0P1 or P2 i1 + i2 >= 1P1 xor P2 i1 + i2 = 1
P1 and P2 i1 = 1, i2 = 1NOT (P1 or P2) i1 = 0, i2 = 0NOT (P1 and P2) i1 + i2 <= 1
P1 -> NOT P2 i1 + i2 <= 1P1 -> P2 i1 <= i2P1 <-> P2 i1 = i2
P1 -> (P2 and P3) i1 <= i2, i1 <= i3P1 -> (P2 or P3) i1 <= i2 + i3(P1 and P2) -> p i1 + i2 <= 2 - 1 + I(P1 and P2 and P3) -> p i1 + i2 + i3 <= 3 - 1 + I