The problem is described as follows: considering $n$ variables which are continuous and bounded such that $$L_i \le x_i \le U_i\quad \forall i=1,2,\dots,n.$$
How can i define a set of mixed integer linear inequalities such that the feasible solution will be
$$y = \max(x_1,x_2,\dots,x_n).$$
I am not certain of my approach but this is what i have so far
constraint 1: $y \ge x_i$;
constraint 2: $y \ge x_i + (U_i-L_i)w$;
where $w\in\{0,1\}$