Thank you so much for your response. Please accept my apologies for the delay. I have been quite busy lately.
In my model, I have some integer variables that I believe need to be solved using MOSEK. Therefore, I have been attempting to obtain an MOSEK license for my CVX. Unfortunately, I have not been able to resolve this issue yet, and I am planning to reach out to MOSEK for assistance.
I attempted to convert this constraint to a convex format using DC approximation. However, when I ran the code, I encountered the following error:
Error using cvx/log
Disciplined convex programming error:
Illegal operation: log( {convex} ).
I recall using DC approximation several years ago to address the non-convexity of a problem. In this code, I also used the logarithm, as shown below. Unfortunately, I cannot remember the specific method I used to resolve this error. I would appreciate any assistance you could provide.
cvx_begin quiet
% cvx_solver MOSEK
variable p2(numuser,numcodebook,numBS) nonnegative
expression Rate(numuser,numcodebook,numBS)
% expression Rate_m(numuser,numcodebook,numBS)
expression max_p(numBS,1)
m=[];
n=[];
z=[];
for num_bs=1:numBS
[m1,n1]=find(s(:,:,num_bs));
m=[m m1'];
n=[n n1'];
z=[z num_bs*ones(1,length(m1))];
end
size_vec=length(m);
for i=1:size_vec
i1=1:size_vec;
i1(i)=[];
for j=1:size_vec
for f=1:size_vec
f1=1:size_vec;
f1(f)=[];
I=sum(sum(p2(m(i1),n(j),z(f1)),1).*g1(m(i),n(j),z(f1)));
I_pre=sum(sum(p(m(i1),n(j),z(f1)),1).*g1(m(i),n(j),z(f1)));
Rate(m(i),n(j),z(f))=s(m(i),n(j),z(f)).*(log(I+p2(m(i),n(j),z(f)).*g1(m(i),n(j),z(f))+var_noise)/log(2)-log(I_pre+var_noise)/log(2)-(I-I_pre)/(I_pre+var_noise));
% Rate_m(m(i),n(j),z(f))=s(m(i),n(j),z(f)).*(log(I+p2(m(i),n(j),z(f)).*g1(m(i),n(j),z(f))+var_noise)/log(2)-log(I_pre+var_noise)/log(2)-(I-I_pre)/(I_pre+var_noise));
end
end
end
% for j=1:numcodebook
% for f=1:numBS
% f1=1:numBS;
% f1(f)=[];
% I=sum(sum(p2(:,j,f1).*g1(:,j,f1),3));
% I_pre=sum(sum(p(:,j,f1).*g1(:,j,f1),3));
% Rate(:,j,f)=s(:,j,f).*(log(sum(sum(p2(:,j,:).*g1(:,j,:),3)))/log(2)-log(I_pre+var_noise)/log(2)-1/(I_pre+var_noise)*(I-I_pre));
% end
% end
obj=sum(sum(sum(Rate)));% objective function equation 5
maximize (obj)
subject to
%% fronthaul limitation
% sum(sum(Rate_m,1),2)>=-Rmax;
%% maximum power constraint
for ff=1:numBS
max_p(ff)=sum(sum(s(:,:,ff).*p2(:,:,ff),2));
end
max_p<=Pmax;
%%
sum(sum(Rate,2),3)>=Rmin;
cvx_end