Note that the unconstrained situation can be written as: $$0\leq y_1+y_2+y_3\leq 3$$ However, we can easily adjust this to accommodate your requirement: $$x\leq y_1+y_2+y_3 \leq 32x$$ if \(x\in [0,1]\) then you need to define a new variable \(z\in \{0,1\}\) and add constraints \(zx\geq0\) and \(z<x+1\) then you can write the above constraint using \(z\) instead of \(x\) answered 19 May '15, 09:32 eupraxis and what if x is a continuous variables? What can you do then?
(19 May '15, 12:18)
opt3
@opt3: That's a different question. You've asked for a constraint on a set of binary variables.
(19 May '15, 12:19)
eupraxis
