Variable selection in mixed linear integer programming or mixed integer programming with convex constraints and objective

64 Views Asked by At

I have a binary variable $b\in\{0,1\}$ and three real variables $x,y,z$.

If $b=0$ then I want $x=y$ and if $b=1$ then I want $x=z$.

  1. Is this possible with mixed linear integer programming?

  2. Is this possible at least with mixed integer programming with convex constraints and objective?

1

There are 1 best solutions below

4
On

You need just 4 constraints and a sufficiently large constant $M$: $$x \geq y - bM$$ $$x \leq y + bM$$ $$x \geq z - (1-b)M$$ $$x \leq z + (1-b)M$$