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

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. yes; 2. you do not need nonlinear constraints – LinAlg Feb 16 at 22:37
• @LinAlg What is the program? – T.... Feb 16 at 22:38

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$$
• Well can we avoid $M$? – T.... Feb 16 at 22:42