How to deal with an issue using Cvx!

If you experience an issue using Cvx, then it is suggested to follow the recommendations:

  • Do not use quiet
  • Do not use cvx_precision
  • Do use CVX version 2.2
  • Share the log output including error messages
  • Share your code (not as a gif)
  • Sequential convex programming algorithms are often unstable so consider using something else.
  • Do not use CVXQUAD unless you really have to

For infeasible problems, follow the advice, except for section 1, in

which also applies to CVX.

And for unbounded models, follow the advice in https://yalmip.github.io/debuggingunbounded , which also applies to CVX.

4 Likes

False claims of convexity (this forum is littered with them). Please carefully read before posting a request for help.

Input data scaling: Check your input data for bad numerical scaling. All non-zero input data should be within s small number of orders of magnitude of 1; otherwise, the solver may encounter numerical difficulties or unreliability. Change the units used in order to accomplish this

Solvers called by CVX use double precision: Solvers only satisfy constraints to within a feasibility tolerance (don’'t freak out when a variable constrained to be nonnegative has optimal value -1e-9). If you really need nonnegativity, use a constraint such as x >= 1e-5. Integer or binary declarations on variables are only satisfied to within an integrality tolerance. The problem is only solved to optimality within an optimality tolerance.