Optimal value (cvx_optval): +Inf Status: Infeasible

When I finished writing the code and running it, I found that cvx had no results, and his status is Infeasible, i dont know why, can you help me?

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: 91 variables, 24 equality constraints
4 exponentials add 32 variables, 20 equality constraints

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

Status: Infeasible
Optimal value (cvx_optval): +Inf
here is my source code

clear all;
clc;

%%

B = 20 ; %
L = 150; %
p = 100 ; %
sigma = sqrt(10*10^-14)*10^3; %
b = 5 ; % xita n =5
d = 1 ; %yita n =1
derta = 2 ; %derta n =2
N = 2; %
Kn = 2; %
F = 100;%F 100GHz
D = 1 ;%D 1000Megacycles=1GHz
fl = 0.7 ; %fl=0.7GHz
lamda = 100;
e = zeros(N,Kn); %
e_ele = log2(1+p/sigma); %
e = e+e_ele;

fai = bBe_ele - dertaB - dB*e_ele;

%%
%
rou = 0.4;
a = zeros(2,2,100);
c = zeros(2,2,100);
sigma = zeros(2,2,100); %
omega = zeros(2,2,100);
sigma(:,:,1) =[0.3 0.5; -0.3 -0.5] ;
omega(:,:,1) =[0.5 0.7; -0.5 -0.7] ;
a(:,:,1)=[1 0 ;0 0]; %
c(:,:,1)=[1 0 ;0 0];

for t=1:1

cvx_begin
% Step1
variable a_copy(2,2,100) nonnegative %
variable s(2,2,100) nonnegative %s
variable c_copy(2,2,100) nonnegative %
s(:,:,1)==[1 0 ;0 0];
y=0;
for j=1:2
for i=1:2
y=y-log(1+s(i,j,1)fai+c_copy(i,j,1)lamdaF/D)+sigma(i,j,t)a_copy(i,j,1)+rou/2(a_copy(i,j,1)-a(i,j,t))^2+omega(i,j,t)c(i,j,1)+rou/2(c_copy(i,j,1)-c(i,j,t))^2;
end
end
%
minimize(y);
subject to
%%
sum(s,1) <= min(1,L/(B * e_ele) ) ;
%%
sum( c_copy(:slight_smile: ) <= 1;
%%
c_copy
F/D - a_copy*fl/D >=0;
%%
0 <= a_copy <= 1
0 <= s <= 1
0 <= c_copy <= 1
%%
a_copy >= s ;
a_copy >= c_copy ;
cvx_end

end

First, change units to improve the scaling so that non-zero numbers are closer to one in magnitude.

Second use CVX 2.2 with Mosek 9.x if available to you, otherwise follow the advice 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

Third, if the problem is still reported infeasible, follow the advice at Debugging infeasible models - YALMIP , all of which except for section 1 also applies to CVX.

The third suggestion link is dead. Could you please resend this link?

Besides, I don’t know if the form of the loop is going to affect the result of the solver? Does it make it easier for the solver to find the best solution by using matrix or vector representation instead?

I changed the units based on your suggestion and also used the standard rel_entr and inv_pos directives. Maybe my expression is complicated, and I have the same trouble with Infeasible status and NAN variables.

The / at the end of the link can no longer be used. I just edited that previous post to update the link. This should work

1 Like