I have the following code which gives unreasonable results. There are two major issues with the results:
- alpha1 can at times be negative (just under zero like -10^(-3)).
- and also sum_alpha_over_users(j,1) is always way below 1. Its value is often around 10^-6.
I am now wondering there could be something wrong with my objective function (given its a log function). I would greatly appreciate if anyone could help me out with my code.
variable alpha1(num_users_per_cell,num_BS_per_cell);%time division variable expression sum_throughput; expression sum_alpha_over_users(num_BS_per_cell,1); sum_throughput = 0; for i=1:num_users_per_cell for j=1:num_BS_per_cell if x(i,j) == 1 sum_throughput = sum_throughput + log(rate(i,1)*alpha1(i,j))/log(10); end end end for j=1:num_BS_per_cell sum_alpha_over_users(j,1) = 0; for i=1:num_users_per_cell sum_alpha_over_users(j,1) = sum_alpha_over_users(j,1) + alpha1(i,j); end end maximize sum_throughput subject to for j=1:num_BS_per_cell sum_alpha_over_users(j,1) <= 1; end for i=1:num_users_per_cell for j=1:num_BS_per_cell 0 <= alpha1(i,j); alpha1(i,j) <= x(i,j); end end