I want to optimize:
and write as:
cvx_begin
variable Vu(M)
for i=1:M
Vu_sum=Vu_sum+k*Vu(i)*Vu(i)*(1-bet0(i))*G(i)
end
expressions Vu_n(1,2) pj_n(1,2) Vuk_n(1,2)
minimize Vu_sum
subject to
0<=Vu;
for i=1:M
LABLE——bet0(i)*G(i)/Vs+(1-bet0(i))*G(i)/Cth0(i)+(1- bet0(i))*G(i)*inv_pos(Vu(i))<=Treq
end
for j=1:N
for i=1:M
if n_random(i)==j
LABEL—— bet0(i)*G(i)/Vs+(1-bet0(i))*G(i)/Cth0(i)+(1-bet0(i))*G(i)*inv_pos(Vu(i))<=Treq
pj_n(j)=pj_n(j)+pj0(i);
Vu_n(j)=Vu_n(j)+Vu(i);
Vuk_n(j)=Vuk_n(j)+k.*pow_p(Vu(j),3);
end
end
end
for j=1:N
Vu_n(j)<=Vu_max;
Vuk_n(j)+pj_n(j)<=pmax;
end
cvx_end
(The optimization variable is a matrix of m columns, representing the calculation rate of m users. N is the base station matching m users, and n_random in the code is the matching result)
my problem is :In the constraint, the same statement at the LABLE is placed in different positions, and the number of cycles is the same, but why are the results different? Does the sequence of CVX constraints affect the results?Is it related to the input parameter value?