I want to know how I should formulate the following constraints in my MIP problem?
$$x= x_1 z_1+ \dots +x_n z_n \text{ and } y_1 \le y \le y_n \text{ and } z_1+\dots+z_n=1$$
OR
$$y= y_1 w_1+\dots+y_n w_n \text{ and } x_1 \le x \le x_n \text{ and } w_1+\dots+w_n=1$$
$x$ and $y$ are continuous variables. $z_1,\dots,z_n$ and $w_1,\dots,w_n$ are binary decision variables. $x_1,\dots,x_n$ and $y_1,\dots,y_n$ are parameters.
The usual big-M approach is to introduce a binary variable $t$ as in @prubin's formulation and then impose the following constraints: \begin{align} x_{\min} \le x &\le x_{\max} \tag{1} \\ y_{\min} \le y &\le y_{\max} \tag{2} \\ \left(x_{\min} - \sum_i x_i\right) t \le x - \sum_i x_i z_i &\le x_{\max} \cdot t \tag{3} \\ -t \le \sum_i z_i - 1 &\le (n-1) t \tag{4} \\ \left(y_{\min} - \sum_i y_i\right) (1-t) \le y - \sum_i y_i w_i &\le y_{\max}(1-t) \tag{5} \\ -(1-t) \le \sum_i w_i - 1 &\le (n-1) (1-t) \tag{6} \end{align}
Constraints $(1)$ and $(2)$ are valid for both sides of the desired disjunction. Constraints $(3)$ and $(4)$ enforce $$t=0 \implies \left(x = \sum_i x_i z_i \land \sum_i z_i = 1\right).$$ Constraints $(5)$ and $(6)$ enforce $$t=1 \implies \left(y = \sum_i y_i w_i \land \sum_i w_i = 1\right).$$