Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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.