We solved the CVX optimization problem with the CVX tool.
The variables in the optimization problem are all continuous. Mosek solver was successfully utilized. The CVX claimed that the problem has been solved and print that “Status: Solved”
However, we found that the objective function value claimed by the CVX tool (shown in the red box)
is different from the one (shown in the green box) obtained by substituting the resulting solutions into the objective function.
It is weird. Could you plz explain this to us? Thanks so much!
You haven’t shown the entirety of what you have done, so I can not determine conclusively what is going on.
However, after CVX conclusion with optimal solution, only CVVX variables are guaranteed to have their optimal values. CVX expressions (other than CVX variables) do not necessarily have their optimal values, and must be recomputed after CVX conclusion using CVX variables. Nevertheless, CVX expressions are still used correctly inside the optimization problem, but their values after CVX conclusion are not necessarily their final “optimal” values used inside the optimization problem.
Thanks so much for your fast reply and explanation. It helps us a lot.
I think we got your point.
Just for a double-check. Could you plz look at the attached picture, wherein the question is presented.