I’ve got some trouble when using cvxquad to solve the SCA problem which include rel_entr arguments, which runs with results:
failed
optival: NaN
here is my code
cvx_begin
variable u_optimal(N+1,2);
variable L;
expression Rkup(K,N);
expression Rklow(K,N);
expression Qk(K,N);
for k=1:K
for n=1:N
W(n,:)=u(n,:)-Vk(k,:);
Qk(k,n)=h^2+norm(W(n,:))^2-2*W(n,:)*u(n,:)'+2*u_optimal(n,:)*W(n,:)';
Rkup(k,n)=(rel_entr(Qk(k,n)+rou,Qk(k,n)) + rel_entr(Qk(k,n),Qk(k,n)+rou))/rou;
Bk(k,n)=(B*rou)/(log(2)*(h*h+norm(W(n,:))^2)*(rou+ h*h+norm(W(n,:))^2));
Rklow(k,n)=B*log(1+(rou/(h^2+norm(W(n,:))^2)))/log(2)-Bk(k,n)*((u_optimal(n,:)-Vk(k,:))*(u_optimal(n,:)-Vk(k,:))'-norm(W(n,:))^2);
end
end
maximize L;
subject to
0<=u_optimal(2:N,:)<=1000;
0<=u_optimal(1,:)<=1;
999<=u_optimal(N+1,:)<=1000;
for o=2:(N+1)
norm(u_optimal(o,:)-u_optimal(o-1,:))<=Vmax;%%%constraint 3
end
for kk=1:K
for j=1:N
sum(Ck*Tk(kk,j:N).*Rkup(kk,j:N))<=(N-j)*Fk+1000; %%constraint 8
end
end
sum((sum(Tk.*Rklow)))>=L;%%constraint 15
L>=0;%%P3.1
cvx_end
I don’t really understand the problem I have encountered, are there someone knowing the possible problems!
thanks ahead!