# Why is this problem still Failed after using CVXQUAD?

function Q=subprob3(ps,pu,q,num)
k=0.5772;
gamma0=10e9;
phi=0.1;
ps_max=10^(3.6);
dSD=300;
dSE=sqrt(240000);
wD=[300;0];
wE=[200;200];
H=100;
for i=1:num
c(i)=exp(-k)gamma0dSD^(-phi)ps(i);
d(i)=gamma0/(norm(q(i,:)’-wD,2)^2+H^2);
e(i)=gamma0
dSE^(-phi)ps(i);
f(i)=gamma0/(norm(q(i,:)’-wE,2)^2+H^2);
end
for i=1:num
l(i)=norm(q(i,:)’-wD,2)^2+H^2;
m(i)=norm(q(i,:)’-wE,2)^2+H^2;
F(i)=gamma0
e(i)pu(i)/(log(2)(m(i)+gamma0
pu(i))((e(i)+1)m(i)+gamma0pu(i)));
end
cvx_begin
variables L(num) M(num) T(num,2)
expression J(num)
for j=1:num
J(j)= pow_pos(norm(q(j,:),2),2)-2
(q(j,:)’-wD)’*T(j,:)’-norm(wD,2)^2;
end
minimize(sum_func(c,F,pu,L,M,num))
subject to
L+J-H^2<=0;
for k=1:num
pow_pos(norm(T(k,:)’-wE,2),2)+H^2-M(k)<=0;
end
pow_pos(norm(T(1,:)’-[-100;100],2),2)<=2.25;
for k=1:num-1
pow_pos(norm(T(k+1,:)’-T(k,:)’,2),2)<=2.25;
end
T(num,:)==[500,100];
cvx_end
for i=1:num
for j=1:2
Q(i,j)=T(i,j);
end
end
end

function result=sum_func(c,F,pu,l,m,num)
gamma0=10e9;
result=0;
for i=1:num
result=result+F(i)m(i)-log(1+c(i)-gamma0(c(i)+1e-10)*(pu(i)+1e-10)inv_pos(gamma0pu(i)+l(i)));
end

The following is the test part, you can just run it.

clear all
N=410;
Q(1,:)=[-100,100];
for i=2:N
Q(i,:)=Q(i-1,:)+[600/(N-1),0];
end
pu=10ones(N,1);
ps=1000
ones(N,1);
Q=subprob3(ps,pu,Q,N);

The scaling of the input data is terrible. Try to change units so that non-zero numbers are within a small number of orders of magnitude of 1. That will improve chance of success. If you are able to use CVX 2.2. with Mosek 9.x, the chance of success will further improve 9but you should still improve scaling).

Perhaps you will show us the solver and CVX output?

## Cones | Errors | Mov/Act | Centering Exp cone Poly cone | Status --------±--------------------------------±-------- 0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Failed 0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Failed 0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Failed

Status: Failed
Optimal value (cvx_optval): NaN

Besides, i think maybe it’s not about the magnitude. If i add some zeros to “pu” and “ps” in the front of the array, this can be solved. It’s weired.

CVXQUAD"s Pade Approximant was not employed. CVX’s unreliable Successive Approximation was used. You need to follow the instructions 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 .

What if i continue using SCA? Can you find out what’s wrong with these “Failed” output?

CVX’s Successive Approximation is unreliable. And large input numbers exacerbate that.

Okay, i’ll think over. Thank you.