# CVX doesn't converge?

Hi,

I’ve just right an optimization code in matlab with cvx with 185 optimization variables and 165 constraints. It’s a maximization problem for network throughput which is modeled by geometrical programming. When the first loop finished (cvx is in the loop for convergence) all the optimization variables become 1e300 and it doesn’t converge. I don’t know what’s the problem? I would really appreciate anyone who can help me with this problem.

Thanks,

the cvx part of my code is like this but the constraints are not complete:

cvx_begin gp
variable X(N_u,N_ap) nonnegative
variable Y(N_u,N_ap) nonnegative
variable T(N_u,N_ap) nonnegative
variable d(1,N_ap)
variable X_0
variable C(1,N_ap) nonnegative
%Optimization variables definition
minimize(X_0)
subject to
%% Constraint C11
% Constraint C9
Denominator_LHS_Constraint_1=1;
for i=1:N_u
for j=1:N_ap
if Alpha_Constraint_1_X(i,j)~=0
Denominator_LHS_Constraint_1=Denominator_LHS_Constraint_1*(X(i,j)Theta(i)/…
Alpha_Constraint_1_X(i,j))^(Alpha_Constraint_1_X(i,j));
end
if Alpha_Constraint_1_3_term(i,j)~=0
Denominator_LHS_Constraint_1=Denominator_LHS_Constraint_1
(Y(i,j)*C(1,j)/…
(d(1,j)Alpha_Constraint_1_3_term(i,j)))^(Alpha_Constraint_1_3_term(i,j));
end
end
end
if Alpha_Constraint_1_X_0~=0 % for avoid dividing to zero
Denominator_LHS_Constraint_1=Denominator_LHS_Constraint_1
((X_0/Alpha_Constraint_1_X_0)^Alpha_Constraint_1_X_0);
end
(M/Denominator_LHS_Constraint_1) <=1;

``````%% Constraint C12
% C4 constraint in Paper

Constraint_2=cvx(ones(1,N_ap));

for i=1:N_ap
if Alpha_Constraint_2_t_prime(i)~=0
Constraint_2(i)=(t_prime/Alpha_Constraint_2_t_prime(i))^Alpha_Constraint_2_t_prime(i);

end
if Alpha_Constraint_2_d(i)~=0
Constraint_2(i)=Constraint_2(i)*(d(i)/Alpha_Constraint_2_d(i))^(Alpha_Constraint_2_d(i));
end
end
% substitution of the new denominator in the constraint
prod(T,1)./Constraint_2==ones(1,N_ap);

%% Constraint C13
% C1 constraint in Paper.

clear Denominators_LHS_Constraint_4;
flag=ones(Slice_num,1);
B = prod(T,1);
for i=1:Slice_num
for k=1:N_ap
for j=1:N_u
if(USR_Slice(j,i)==1)
if Alpha_Constraint_4_X(j,k,i)~=0
if flag(i,1)
Denominators_LHS_Constraint_4(i,1)=(X(j,k)*d(1,k)*T_s/...
Alpha_Constraint_4_X(j,k,i))^Alpha_Constraint_4_X(j,k,i);
flag(i,1)=0;
else
Denominators_LHS_Constraint_4(i,1)=Denominators_LHS_Constraint_4(i,1)*(X(j,k)*d(1,k)*T_s/...
Alpha_Constraint_4_X(j,k,i))^Alpha_Constraint_4_X(j,k,i);

end
end
if Alpha_Constraint_4_Y(j,k,i)~=0
if flag(i,1)
flag(i,1)=0;
Denominators_LHS_Constraint_4(i,1)=(Y(j,k)*B(1,k)*C(1,k)*T_s/...
(Alpha_Constraint_4_Y(j,k,i)*T(j,k)))^Alpha_Constraint_4_Y(j,k,i);
else
Denominators_LHS_Constraint_4(i,1)=Denominators_LHS_Constraint_4(i,1)*(Y(j,k)*B(1,k)*C(1,k)*T_s/...
(Alpha_Constraint_4_Y(j,k,i)*T(j,k)))^Alpha_Constraint_4_Y(j,k,i);
end
end

end
end
end
end
% substitution of the new denominator in the constraint
RSV*d'./Denominators_LHS_Constraint_4<=ones(Slice_num,1);

%% Constraint C14
% constraint C8
clear Denominator_LHS_Constraint_5;
flag=ones(N_u,N_ap);
for i=1:N_u
for j=1:N_ap
if Alpha_Constraint_5_Y(i,j)~=0
Denominator_LHS_Constraint_5(i,j)= ((Y(i,j)/Alpha_Constraint_5_Y(i,j))^(Alpha_Constraint_5_Y(i,j)));
flag(i,j)=0;
end
if Alpha_Constraint_5_1(i,j)~=0
if flag(i,j)
Denominator_LHS_Constraint_5(i,j)= ((1/Alpha_Constraint_5_1(i,j))^(Alpha_Constraint_5_1(i,j)));
flag(i,j)=0;
else
Denominator_LHS_Constraint_5(i,j)= Denominator_LHS_Constraint_5(i,j)*((1/Alpha_Constraint_5_1(i,j))^(Alpha_Constraint_5_1(i,j)));
end
end
end
end
% substitution of the new denominator in the constraint
T./Denominator_LHS_Constraint_5==ones(N_u,N_ap) % T/(1 + Y) = 1

% Constraint C3
for i=1:N_ap
T_s*sum(X(:,i))/dmax<=1;
end``````