The problem shows that it has been resolved, but there is a constraint that is not satisfied

(ly) #1

Dear all, I have a doubt.
My problem is solved by sdpt3, an optimal solution is returned,and I use cvx expressions in the objective function and constraints.
I compute cvx expressions using the optimal value of the CVX variables after CVX execution completes, but I found the constraint is not satisfied after I compute the cvx expressions by using the optimized variables,

Is there a problem with my program, or is this a feature of cvx expressions?


In exponential (line 17)
In cvx/log_sum_exp (line 97)
In optimized_Q_5_ADMM (line 487)
Using Pade approximation for exponential
cone with parameters m=3, k=3

Successive approximation method to be employed.
For improved efficiency, SDPT3 is solving the dual problem.
SDPT3 will be called several times to refine the solution.
Original size: 36529 variables, 15163 equality constraints
500 exponentials add 4000 variables, 2500 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
200/200 | 2.106e+00 2.648e-01 0.000e+00 | Solved
200/200 | 4.275e-01 1.152e-02 0.000e+00 | Inaccurate/Solved
198/200 | 5.541e-02 1.916e-04 0.000e+00 | Inaccurate/Solved
172/192 | 8.009e-03 4.009e-06 0.000e+00 | Inaccurate/Solved
13/ 94 | 1.142e-03 8.008e-08 0.000e+00 | Inaccurate/Solved
0/ 9 | 1.632e-04 8.523e-10 0.000e+00 | Inaccurate/Solved
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Inaccurate/Solved
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Inaccurate/Solved

Status: Inaccurate/Solved
Optimal value (cvx_optval): +1.72647e+06

(Mark L. Stone) #2

You haven’t provided enough details for a definitive diagnosis. However,

  1. After CVX has solved or inaccurate/solved, the CVX variables have their optimal values. But CVX expressions do not necessarily.correspond to the optimal values of CVX variables. CVX makes sure the expressions are properly evaluated for purposes of conducting the opttimization and populating cvx_optbval, but the numerical values of CVX expressions after CVX completes do not necessarily correspond to the optimal values of the variables. Therefore, you should recompute CVX expression values using the optimal values of CVX variables if you wish to know the optimal values of CVX expressions.
  1. The solvers employed by CVX numerically solve the optimization problem to within a solver tolerance, to include a feasibility tolerance. Therefore, the constraints might be slightly violated even at the optimum. In your case, this could be exacerbated due to a poorly scaled problem, as evidenced by the optimal objective value being greater than 1e6, which perhaps contributed to Status being Inaccurate/Solved instead of Solved.

Given use of the CVX Successive Approximation method, I recommend you follow the advice 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

(ly) #3

Thanks for your replay very much, Stone.
Sorry,I provide some details for my problem
Firstly , I define a constraint of UAV_Efly (which is cvx expressions)

for m = 1:M
    UAV_Efly(m) <=1*10^7;

Second, inside cvx, the values of UAV_Efly are as follows
UAV_Efly =

1.0e+07 *

1.0000    1.0000

Then, after CVX execution completes, I compute UAV_Efly( cvx expressions ) using the optimal value of the CVX variables, the values are as follows, and they are greater than 1.0e+07, which violated my constraints.
UAV_Efly =

1.0e+07 *

1.0083    1.0093

(Mark L. Stone) #4

It is still not entirely clear because you have not provided a reproducible problem (complete program with all input data). However, this may be die to poor scaling per paragraph 2 in mu post above. Try to rescale the variables (change units) so that numbers appearing in your program and optimal values of variables are within a few orders of magnitude of 1, or exactly zero. Numbers such as 1e7 can cause difficulty in the double precision solvers used by CVX.

Also, try installing CVXQUAD and following the advice in the link in my post above.