Optimization: Absolut value function

111 Views Asked by At

I want to find the minimum of the following function, using a linear solver in Matlab:

f = sum(((P * x - d)+|P * x - d|))*0.5*p)

x (dimension [ix1]) is binary, P (dimension [nxi]),d and p are always positive.

In other words:

if P*x => d

f = (P*x-d)*p

if P*x < d

f = 0

Is it possible to solve this problem with a linear Solver in Matlab (like linprog or cplexlp)?

1

There are 1 best solutions below

3
On BEST ANSWER

Minimizing $\max\{Ax+b,0\}$ is equivalent to minimizing $t$ under the simultaneous constraints $t\geq Ax+b$ and $t\geq 0$, so it is linear. See for instance https://docs.mosek.com/modeling-cookbook/linear.html#maximum