I'm trying to model an integer program whose integer variables may have multipe domains? For example, an integer variable x with range [10,30], [62,70]. How to build this constraint? Any ideas are welcomed and appreciated.
2026-03-28 18:43:34.1774723414
how to tackle an integer variable with multipe domains in an integer program
31 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
One possibility is to use a set of binary variables to enumerate the options. So you could write $$x=10z_1 + 11z_2 + \dots + 30z_{21} + 62z_{22} + \dots + 70z_{30}$$ together with $$z_1 + \dots + z_{30} = 1,$$ the $z_i$ being binary.
Another option is to use two integer variables and one binary variable. So $$x=x_1 + x_2,$$ $$10z \le x_1 \le 30z$$ and $$62(1-z) \le x_2 \le 70(1-z),$$ with $x_1$ and $x_2$ integer and $z$ binary