A weighted L1 minimization linear programming with varying operating regions

29 Views Asked by At

I want to minimize the difference between a variable and a constant in my system using LP. $$ \min |x_1 - b|$$ I found that this can be formulated as an LP using: $$ \min t \\s.t. \hspace{0,2cm} t \geq x_1-b\\ \hspace{1.6cm}t \geq -(x_1-b)$$

As I want to penalize one part more or sometimes a certain deviation at one side is no problem I want to broaden my problem too: example of what I want

The formulation of the splitting (left figure) has been done as follow: $$\min \hspace{0.5cm}a_1*\max(0,x_1 - b)+ a_2*\max(0, b - x_1)$$ which can be formulated as follow: $$ \min a_1*t_1 + a_2*t_2 \\ \\s.t. \hspace{1cm} t_1 \geq ( x_1 - b) \\ t_1 \geq 0 \\ \hspace{1.8cm} t_2 \geq( -x_1 + b) \\ t_2 \geq 0$$

But when I try to go to the right side of the figure I get infeasibility issues. My question is: " how do I formulate this problem in order to get a feasible solution?" I tried this: $$ \min a_1*t_1 + a_2*t_2 \\ \\s.t. \hspace{1cm} t_1 \geq ( x_1 - b) - slack_1 \\ t_1 \geq 0 \\ \hspace{2.3cm}t_2 \geq( -x_1 + b) - slack_2\\ t_2 \geq 0$$

1

There are 1 best solutions below

0
On

Your formulation without slacks looks correct. For any value of $x_1$, taking $t_1=\max(x_1-b,0)$ and $t_2=\max(b-x_1,0)$ is feasible.

An alternative formulation is to minimize $a_1 t_1 + a_2 t_2$ subject to \begin{align} x_1 - b &= t_1 - t_2 \\ t_1 &\ge 0 \\ t_2 &\ge 0 \end{align}