mcg said: “Of course, please do remember that log, exp, rel_entr, the exponential cone, etc. all depend on CVX’s experimental successive approximation method. Using CVX with these functions is less reliable.”

What is the meaning of less reliable? if it is solved by CVX, the solution may not be right?

If the cvx_status is ‘Failed’, I have the piece of code run again, is it possible to get a possible solution after running enough times?

Using Mosek and CVX default solver, I get different results. By comparing the results, I find Mosek has given a more accurate result. I think there is space for modification of CVX. I like the coding style of CVX

That is a very fair question. What it means is that CVX is less likely to converge to a solution. That is, you’re more likely to see cvx_solver as Failed and cvx_optval as NaN.

However, if it does offer a solution—that is, if it returns cvx_status as Solved—then the result will be just as reliable as a solution to problems that do not use exp/log/entropy.

Keep in mind that no numerical solver is perfect. Even for models that do not involve exp/log/entropy, there are going to be times that the solver simply cannot find a solution. And of course, when it does offer a solution, it is actually only claiming that the constraints are satisfied to within a predefined numerical tolerance. Whenever creating or solving optimizaiton models, it is the responsibility of the modeler to scrutinize the results and make sure that they are satisfactory for the application.

But CVX’s successive approximation method for exp/log/entropy is a heuristic that extends the capabilities of the existing solvers. So it seems right that I frequently warn people of that fact.

I don’t think running multiple times is likely to improve performance, but depending on the exact approach of the solver, it is possible. Trying different solvers is a valuable strategy.