Log using cvx

Uncategorized
Jul 8, 2014
A

Hi,

I have the following code which gives unreasonable results. There are two major issues with the results:

  1. alpha1 can at times be negative (just under zero like -10^(-3)).
  2. 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.

cvx_begin

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            

cvx_end

M

There’s no way to tell just by looking at the model. I’m going to guess it’s a scaling issue of some sort. Or it could simply be a failure of CVX’s successive approximation method for log/exp functions. Alas we can’t guarantee such functions will work, as the warning says.

A

Dear Ara,I have encountered the same problem as you. Do you find any solution to this problem? Could you please contact me by email: alicia1988@yeah.net