Hello,
I tried reading the previous responses to people with the same problem, but it did not help me a lot. I believe the problem is convex (maximizing a concave function subject to linear constraints) so I don’t think that is a problem here.
The code:
> cvx_begin
> cvx_solver mosek
> variable pUL(5,30)
> expression objective
> ULUtility=cvx(zeros(5,30));
> for j=1:5
> for sc=1:30
> if round(W(i,j,sc))==1
> ULUtility(i,sc)=((10/log(10))*log(pUL(i,sc)*BS_antenna_gain*UE_antenna_gain*X(Mobile_user(I).ID,t)./(A*(sigma_2+(pDL1(j,sc)/SIC)))))/(pUL(i,sc)*UE_antenna_gain*UE_antenna_gain*Y(Mobile_user(J).ID,t)./D);
> else
> ULUtility(i,sc)=0;
> end
> end
> end
> objective=sum(sum(ULUtility));
> maximize (objective)
> subject to
> sum(pUL(i,:))<=0.25;
> for sc=1:N_sc
> if sum(W(i,:,sc))==1
> pUL(i,sc)>=0.001;
> end
> end
> pUL(i,isc)>=0.01;
> cvx_end
eh it’s not clean but all the non-optimization values in this equation are defined. The problem is obviously with the Objective (sum of ULUtility). But idek