I have a problem with non-linear variables and I have to present a way for linearizing such a situation.
- $\min |x_1| - |x_2-1| \quad \mathrm{s.t.} \quad 3x_1 + 2x_2 \geq 1, \quad x_2 \geq 1$
- $\min -2x_1 + 3.|x_2-10| \quad \mathrm{s.t.} \quad |x_1+2| + |x_2| \leq 5$
Could you also please give me another example with absolute values (same difficulty as this ones)? - statement and solution
(ps) I don't want programming language, it's an exercise to write by hand
For #1, you can replace $|x_2-1|$ with $x_2-1$ because $x_2 \ge 1$. Now introduce $y_1$ to represent $|x_1|$ and two linear constraints $y_1 \ge x_1$ and $y_1 \ge -x_1$ to enforce $y_1 \ge |x_1|$. Minimizing $y_1-(x_2-1)$ will then guarantee that $y_1 = |x_1|$.
For #2, introduce three new variables and six linear constraints.
For some other examples, see https://or.stackexchange.com/questions/tagged/absolute-value