Skip to main content
1 of 4
YukiJ
  • 2k
  • 14
  • 39

If I understand your question correctly then you want to model that if $$a_1+a_2+a_3\geq 1$$ then it follows that $$b_1+b_2+b_3\geq 1.$$ Since $A \Rightarrow B$ is equivalent to $\neg B \lor A$ we want to model $$\sum_{i=1}^3 b_i < 1 \lor \sum_{i=1}^3 a_i \geq 1.$$ We can replace $\sum_{i=1}^3 b_i < 1$ with $\sum_{i=1}^3 b_i =0$ because the $b_i$ are binary and obtain $$\sum_{i=1}^3 b_i = 0 \lor \sum_{i=1}^3 a_i \geq 1.$$ This can be written as a single constraint in the following way:

$$\sum_{i=1}^3 b_i \geq \sum_{i=1}^3 a_i $$

Now, if any of the $a_i$ is true then the constraint forces at least of of the $b_i$ to be true as well. On the other hand, if all the $a_i$ are 0 anything can happen to the $b_i$.

YukiJ
  • 2k
  • 14
  • 39