How can I linearize this inequality?

229 Views Asked by At

Is there a way to linearize this inequality? maybe by separing this inequality into three? I have an optimization model where one of the restrictions is the following, which makes the model a non-linear model. $$|x_1| + |x_2| + |x_3| \leq 2$$

1

There are 1 best solutions below

0
On BEST ANSWER

I'm not entirely sure what you mean by linearize but I will interpret this to mean write the constraint as a linear inequality so the optimization problem you're solving can be seen as a linear program.

Introduce the variables $x_i^+,x_i^-$ where $x_i^+ = max(x_i,0)$, $x_i^- = max(-x_i,0)$. Then $x_i = x_i^+ - x_i^-$ and the given constraint becomes

$x_1^+ + x_1^- + x_2^+ + x_2^- + x_3^+ + x_3^- \leq 2$

Now you can work entirely in the $x_i^+,x_i^-$ coordinates and then use $x_i = x_i^+ - x_i^-$ once you are done your optimization to find the values of your original variables.