# SDPT3 status: Failed Optimal value (cvx_optval): NaN

I am a new user of CVX and try solve the convex optimal problem recently in SDPT3 mode. However, the result is always this as below:
status: Failed
Optimal value (cvx_optval): NaN.
The MATLAB code is as below:

``````clc;

clear all;

gamma = 10e-28;

ok = 0.5;

ck = 1500;

B = 4*10^7;

gnk = 5*10^(-6)/2;

delta = 0.01;

noise = 10^(-9);

kamma = 13.5 * 0.5 * delta;

Nuser = 5;

Nslot = 20;

cvx_solver SDPT3

cvx_begin

variable Iku(Nslot, Nuser) nonnegative

variable Ikd(Nslot, Nuser) nonnegative

variable Ikc(Nslot, Nuser) nonnegative

Iku(9,: ) == 0;

Iku(10,: ) == 0;

Ikc(1,: ) == 0;

Ikc(10,: ) == 0;

Ikd(1,: ) == 0;

Ikd(2,: ) == 0;

k = 1:Nuser;

for n = 1:Nslot

sum(Iku(1:n,k)) >=sum(Ikc(1:n,k));

ok*sum(Ikc(1:n,k)) >=sum(Ikd(1:n,k));

end

sum(Iku(:,k)) == Nuser * 6 * 10^6;

sum(Ikc(:,k)) == Nuser * 6 * 10^6;

sum(Ikd(:,k)) == ok * Nuser * 6 * 10^6;

gamma * ck * sum(sum(pow_pos(Ikc,3)))+sum(sum((power(2,(Ikd/(B*delta)))-1))) * noise * delta/gnk+1000 * kamma * 10 * 100  <=  5 * 10^5;

minimize(gamma * ck * sum(sum(pow_pos(Ikc,3)))+sum(sum((power(2,(Ikd/(B*delta)))-1))) * noise * delta/gnk+1000 * kamma * 10 * 100+sum(sum((power(2,(Iku/(B*delta)))-1))) * noise * delta/gnk)

cvx_end
``````

CVX Warning:
Models involving “log” 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 --------±--------------------------------±-------- 0/299 | 3.500e+00 9.107e-12 9.106e-12 | Failed 0/299 | 1.750e+00 9.107e-12 0.000e+00 | Failed 0/299 | 8.750e-01 9.106e-12 0.000e+00 | Failed

Status: Failed
Optimal value (cvx_optval): NaN

I also tried SEDUMI mode but the result is CVX Warning:
Models involving “log” 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 --------±--------------------------------±-------- 90/ 90 | 8.000e+00 4.211e+00 0.000e+00 | Unbounded 0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Unbounded

Status: Infeasible
Optimal value (cvx_optval): +Inf

Thanks in advance, guys. Hope that this issue can be solved.

1. Improve the scaling. Try to get numbers to be either exactly zero or close to one in magnitude (within a small number of orders of magnitude). Numbers such as 10e-28 and even 4e-7 cause significant, maybe fatal, difficulties for the double precision solvers called by CVX.

2. I haven’t figured out yet how to reformulate `pow_pos` in a DCP-compliant manner such that CVXQUADS’s Pade Apprxoimant will be used instead of CVX’s Successive Approximation Method. 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 If such a reformulation is produced, the reliability of solution will probably be increased. However, the advice in paragraph 1 still holds.

Hello Mark.
I have the same problem now, and I wonder what the meaning of your suggestion 1 is.

Then you will have to be clearer on exactly what your difficulty is.

Note that nowadays, CVX 2.2 + Mosek 9.x can be used in preference to CVXQUAD or CVX’s Successive Approximation method. But good scaling can still matter.