 # Optimal value (cvx_optval) is NaN

(Yu ) #1

I met a challenging problem that is described in matlab code as:

cvx_begin
% cvx_quiet(true)
variable E_k1(K,N_tot)
variable E_k2(K,N_tot)
variable E_k3(K,N_tot)
variable t_k1(K,N_tot)
variable t_k2(K,N_tot)
variable t_k3(K,N_tot)
variable l_u(K,N_tot)
variable l_h(K,N_tot)
variable l_a(K,N_tot)
minimize sum(sum( E_k1 + E_k2 + E_k3 + 1^2pow_pos(l_u,3)+ 1^2pow_pos(l_h,3) ))
subject to

``````    for n=1:N_tot
sum(l_h(:,1:n),2) <= sum(-B0*rel_entr(t_k1(:,1:n),t_k1(:,1:n)+gamma0_bar(:,1:n).*E_k1(:,1:n))/log(2)/1e6,2);
end

l_a <= -B0*rel_entr(t_k2,t_k2+gamma0_bar.*E_k2)/log(2)/1e6;
l_a <= -B0*rel_entr(t_k3,t_k3+gamma1_bar.*E_k3)/log(2)/1e6;

l_u + l_a + l_h >= L_kn_max_arr/1e6;

c_u*l_u <= 2;
c_h*l_h <= 1;
E_k1>=0; E_k1<=t_k1*10;
E_k2>=0; E_k2<=t_k2*10;
E_k3>=0; E_k3<=t_k3*31.62;
l_u>=0; l_h>=0; l_a>=0;
t_k1+t_k2+t_k3<=1;
t_k1>=0; t_k1<=1;
t_k2>=0; t_k2<=1;
t_k3>=0; t_k3<=1;
``````

cvx_end

Where gamma0_bar and gamma1_bar are given constant value whithin (0,1), and B0=1e6. If the variable dimension is small, the problem is well solved. While the dimension of variable gets to KN_tot=330, the detailed result is displayed as follows:

CVX Warning:
Models involving “rel_entr” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

## Cones | Errors | Mov/Act | Centering Exp cone Poly cone | Status --------±--------------------------------±-------- 595/595 | 1.003e+00 3.829e-02 4.386e-09 | Solved 476/477 | 8.000e+00 9.213e+00 1.658e-08 | Solved 523/526 | 8.000e+00 5.462e+01 1.745e-07 | Solved 192/209 | 8.000e+00 1.881e+01 2.009e-08 | Solved 103/141 | 8.000e+00 5.458e+01 1.267e-07 | Solved 154/182 | 8.000e+00 5.297e+01 6.979e-08 | Solved 124/157 | 8.000e+00 5.721e+01 2.896e-07 | Solved 107/138 | 8.000e+00 4.475e+01 1.535e-08 | Solved 78/126 | 8.000e+00 6.038e+01 4.203e-09 | Solved 68/ 99 | 8.000e+00 2.136e+02 3.165e-09 | Solved 40/105 | 8.000e+00 7.442e+05 4.437e-09 | Solved 57/100 | 8.000e+00 2.358e+05 1.862e-09 | Solved 126/132 | 8.000e+00 7.497e+04 1.086e-08 | Solved 88/118 | 8.000e+00 8.173e+06 2.332e-09 | Solved 66/ 70 | 8.000e+00 7.255e+06 3.941e-09 | Solved 55/ 92 | 8.000e+00 2.338e+06 1.043e-08 | Solved 73/105 | 8.000e+00 7.448e+05 8.597e-09 | Solved 49/ 74 | 8.000e+00 2.388e+05 4.619e-09 | Solved 42/ 83 | 8.000e+00 7.527e+04 2.465e-09 | Solved 22/ 52 | 8.000e+00 1.414e+06 4.914e-09 | Solved 21/ 55 | 8.000e+00 4.353e+05 4.422e-09 | Solved 16/ 49 | 8.000e+00 5.176e+04 8.864e-09 | Solved 18/ 60 | 8.000e+00 4.714e+05 7.975e-09 | Solved 34/ 81 | 8.000e+00 2.328e+06 5.535e-09 | Solved 66/ 98 | 8.000e+00 5.941e+06 1.894e-08 | Solved

Status: Failed
Optimal value (cvx_optval): NaN

I do not know why the optimal result cannot be obtained by CVX for a large demension although the processes show “Solved” status. I really hope someone can help me and give me some directions.

(Mark L. Stone) #2
(Yu ) #3

I have solved this problem, thank you so much ! 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