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

And the log information during the simulation is shown as below:

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.

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: 2807 variables, 1169 equality constraints
300 exponentials add 2400 variables, 1500 equality constraints

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 :slight_smile: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.

Successive approximation method to be employed.
For improved efficiency, SeDuMi is solving the dual problem.
SeDuMi will be called several times to refine the solution.
Original size: 837 variables, 341 equality constraints
90 exponentials add 720 variables, 450 equality constraints

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.

I have the same problem about scaling matters. eg. one of my constraints is sum(R3) <= 10e-15 and I made it be sum(R3)/10e-15 <= 1, it doesn’t work.I want to know the details how to solve the normalized problem, or is there any references could be recommend? Thank you

Try changing the units used in the problem. For instance, use picowatts instead of watts. Or kilometers instead of nanometers

You can also read 8.2 Addressing numerical issues — MOSEK Optimizer API for C 10.0.46

Thanks.If I changed one of the constraints units, I should also change the other constraints units even the whole system model, right?

You need to make changes to units and the model in a coordinated way which is correct and consistent.