Skip to main content
edited tags
Link
Kuifje
  • 13.8k
  • 1
  • 24
  • 58
Source Link

MIP constraint with sum of decision variables having certain value : $\sum_{i=1}^nx_i = 2 \implies \delta = 1$

I want to formulate a MIP constraint such that : $$\sum_{i=1}^nx_i = 2 \implies \delta = 1$$ $x_i, \delta \in \{0, 1\}$.
My problem is that delta should be one when this sum is exactly 2 and not greater or less than.