Is the final result of CVX reliable when the Status is failed?

This happens very often for me. The status is all “failed” but CVX gives me a final result. Is this result reliable for using in papers?

Given the information you provide the answer is maybe.

Have you verified whether the solution make sense to you for instance?

We need more info. for instances log information to say something more precise.

Do the optimization cariables contain anything other than nan ?

This is part of the log for example:

Successive approximation method to be employed.
SeDuMi will be called several times to refine the solution.
Original size: 339 variables, 114 equality constraints
16 exponentials add 128 variables, 80 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
8/ 8 | 8.000e+00 9.962e+01 0.000e+00 | Failed
16/ 16 | 8.000e+00 1.867e+01 0.000e+00 | Inaccurate/Solved
8/ 8 | 8.000e+00 2.484e+00 0.000e+00 | Failed
8/ 8 | 8.000e+00s 3.549e-01 0.000e+00 | Inaccurate/Solved
8/ 8 | 8.000e+00s 2.348e-02 0.000e+00 | Failed
0/ 0 | 8.000e+00 0.000e+00 0.000e+00 | Failed
0/ 0 | 8.000e+00 0.000e+00 0.000e+00 | Inaccurate/Solved
0/ 0 | 8.000e+00 0.000e+00 0.000e+00 | Failed

Status: Inaccurate/Solved
Optimal value (cvx_optval): +21.1712

The optimal value makes sense on its own. But when I change the value of some parameters and expect the optimal value to increase it does not work as expected.

The result is not failed. That is the status of an iteration of CVX"s Successive Approximation method. The result is Inaccurate Solved, which might be a valid solution, but not very accurate.

In order to more reliably and accrrately solve the problem:
If you have access to Mosek 9.x, use that with CVX 2.2. II not, follow the directions at CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions .

I see from your posting history that you were aware of CVXQUAD two years ago, so I am a little surprised you were not using it (at least properly) for this problem.

1 Like

Thanks for your reply Mark. Yes I am aware of the CVXQUAD and have used it many times. It is really more reliable and more accurate. However this time I encountered this error when using it:
unrecognized function or variable ‘op_rel_entr_epi_cone’.

And I could not find much information on the internet how to get rid of this error. So, I went back to the unreliable successive approximation method.

First of all, were you using CVX 2.2? If not do so. Do not use CVXQUAD with CVX 3.0beta.

Second of all, you can try my advice at I am not able to solve this . (except update the advice to use CVX 2.2 rather than CVX 2.1).

If you still encounter an error, and you are using CVX 2.1 or CVX 2.2, perhaps you can provide a complete reproducible problem here or at https://github.com/hfawzi/cvxquad/issues

The most reliable and accurate option is to use CVX 2.2 with Mosek 9.x.

1 Like