I am using CVX for solving this problem:
Minimize sum((x-y)'M(x-y)) + c *sum(cost)
Subject to
-
(x-z)'M(x-z) – (x-y)'M(x-y) >= 1- cost
-
cost>=0
-
M >= 0
M is a positive semidefinite matrix, but CVX solution violates constraint #3. (M is not positive in solution)
Would you please let me know can CVX solve this problem? Or witch packages can solve it?
With regards,
RRF