I have a binary variable $y$ and a set of binary variables $x_i$, where $i\in I$. My problem requires that $$\sum\limits_{i\in I}x_i = b.$$ What I want to formulate is the following implication: if $\sum\limits_{i\in \tilde{I}} x_i \leq b-1$ then $y=1$ where $\tilde{I}\subseteq I$, but I can't seem to figure out how. I have been able to find a formulation that says if $\sum\limits_{i\in \tilde{I}}x_i=m$ then $y=0$ by the inequality $\sum\limits_{i\in \tilde{I}}x_i + y \leq m$ but that is not exactly what I want. Any help is greatly appreciated!


1 Answer 1


$x_i \le y$ for $i\in I \setminus \tilde{I}$

  • $\begingroup$ Jesus Christ! Sometimes I really wonder where these brain-farts come from. Thank you very much! $\endgroup$
    – Djames
    Nov 1, 2019 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.