I am facing a problem with a CVX(PY). I want to solve an optimization problem over a variable $x$ of dimension $n$ with the cost function
$$c=\sum^n (x-1)^2$$
and subject to some constraints. This is perfectly convex and hence I am able to solve it using CVX(PY) as long as my constraints are convex.
Now I would like to be able to introduce asymmetry in the cost function. For example, I would like to penalize $x > 1$ more than $x \le 1$. A corresponding cost function could be :
$$c=\begin{cases} \displaystyle\sum (a(x-1))^2 & \text{if } x \le 1\\\\ \displaystyle\sum (b(x-1))^2 & \text{if } x > 1 \end{cases}$$
This cost function remain convex for any $(a,b)$ and continuous. So, up to my understanding, I could use in principle CVX(PY) to solve my problem.
However, CVX(PY) detects non-convex problems whenever I introduce $\min(\cdot)$, $\max(\cdot)$, $\mbox{sign}(\cdot)$ functions which are in general not convex.
Has anyone used a non symmetric cost function with CVX(PY) ? Or has any idea on how to cope with my problem ?
Thank you in advance for any help or hints :)