Constraint violation

I am using CVX for solving this problem:

Minimize sum((x-y)'M(x-y)) + c *sum(cost)

Subject to

  1. (x-z)'M(x-z) – (x-y)'M(x-y) >= 1- cost

  2. cost>=0

  3. 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

You should post the exact model you’re using. Often people fail to properly specify semidefinite constraints. And even so, slight violations are to be expected from the numerical solvers.