Is it a convex problem? Could it be solved by cvx?


var_y is a vector with dim (NumVar,1)
matrix_a is a matrix with dim (NumKey,NumVar)
each of vec_1, vec_2, vec_3 and vec_4 is a vector with dim (NumKey,1)

variable var_x(NumVar,1)
minimize( norm(var_x - var_y) )
subject to
-ones(NumVar,1) <= var_x <= ones(NumVar,1)
0.99 <= sum(max(var_x,0)) <= 1.01
0.99 <= sum(max(-var_x,0))<= 1.01
vec_1 <= matrix_a * max(var_x,0) <= vec_2
vec_3 <= matrix_a * max(-var_x,0) <= vec_4

Many thanks!

(Mark L. Stone) #2

This is non-convex. Why isn't CVX accepting my model? READ THIS FIRST!

0.99 <= sum(max(var_x,0)) and 0.99 <= sum(max(-var_x,0) are both non-convex.

Depending on matrix_a , unless it is all zeros, at least one side, and maybe both sides of the last two constraints are non-convex.


Thank you very much!