Reformulate an optimization problem with absolute values as a linear program

1k Views Asked by At

Reformulate the following optimization problem as a linear program.

$$\begin{array}{ll} \text{minimize} & 2 x_1 + 3 |x_2-10|\\ \text{subject to} & |x_1+2|+|x_2|\leq 5\end{array}$$

First, I tried the following. If $y=x_1+2=y^+-y^-$, then $|x_1+2|=y^++y^-$, where $y^+, y^-\geq 0$. Now, if $z=x_2-10=z^+-z^-$, then $|x_2-10|=z^++z^-$, $z^+, z^- \geq 0$.

But the problem appear when I try to express $|x_2|$ in terms of $z^+, z^-$, because I get an inequality of $|x_2|$ and not an equality, i.e, $|x_2|=|z^+-z^-+10|\leq |z^+-z^-|+10= z^++z^-+10$.

Could you give me a suggestion?

1

There are 1 best solutions below

2
On

Just do the same trick a third time:

If $w = x_2 = w^+ - w^-$ then $|x_2| = w^+ + w^-$, $w^+, w^- \ge 0$. Or even simpler just use $x_2 = x_2^+ - x_2^-$, then $|x_2| = x_2^+ + x_2^-$, $x_2^+, x_2^- \ge 0$.

In other words, each absolute value term gets its own decomposition into positive and negative parts, even if some of the absolute value terms share a decision variable.