function [User, Cells, wsr, Per_BS_Bkhaul, num_sched_user] = LP_Projection(User,Cells,Num_Cell,Total_Scd_User,Total_BS,Per_BS_Coop,Per_BS_ServAnt,Per_BS_ServUsr,BS)

wgt_wsr = zeros(Total_Scd_User,1);
usr_idx = 0;
for iCell = 1:Num_Cell
    for ik = 1:length(Cells(iCell).Scheduled_User)
        k = Cells(iCell).Scheduled_User(ik);
        usr_idx = usr_idx + 1;
        wgt_wsr(usr_idx) = User(iCell,k).wgt_wsr;
        
    end
end

Per_BS_Bkhaul = zeros(Num_Cell,Total_BS);

%fprintf( 'call cvx solver \n');
cvx_begin quiet
variable R(Total_Scd_User,1); %rate

minimize( - wgt_wsr' * R );
subject to

R >= zeros(Total_Scd_User,1);

for m = 1:Num_Cell
    for l = 1:Total_BS
        
        if ~isempty(Per_BS_ServUsr(m,l).index)   %~isempty(Per_BS_Coop(m,l).Coop_Matrix) && ~isempty(Per_BS_ServAnt(m,l).index)
            
            sum(R(Per_BS_ServUsr(m,l).index)) <= BS(m,l).total_bkhaul_budget;
            
        end
        
    end
end

usr_idx = 0;
for l = 1:Num_Cell
    for ik = 1:length(Cells(l).Scheduled_User)
        usr_idx = usr_idx + 1;
        k = Cells(l).Scheduled_User(ik);
        
        R(usr_idx) <= User(l,k).inst_rate;
        
    end
end

cvx_end

cvx_status

wsr = - cvx_optval;

%assign rate to the users
usr_idx = 0;
num_sched_user = 0;
for l = 1:Num_Cell
    user_index_to_delete = [];
    for ik = 1:length(Cells(l).Scheduled_User)
        k = Cells(l).Scheduled_User(ik);
        usr_idx = usr_idx + 1;
        User(l,k).inst_rate = R(usr_idx);
        
        if R(usr_idx) > 1e-2 
            num_sched_user = num_sched_user + 1;
        else
            user_index_to_delete = [user_index_to_delete ik];
        end
        
    end
    Cells(l).Scheduled_User(user_index_to_delete) = [];
end


for m = 1:Num_Cell
    for l = 1:Total_BS
        
        if ~isempty(Per_BS_ServUsr(m,l).index)   %~isempty(Per_BS_Coop(m,l).Coop_Matrix) && ~isempty(Per_BS_ServAnt(m,l).index)
            
           Per_BS_Bkhaul(m,l) = sum(R(Per_BS_ServUsr(m,l).index));
            
        end
        
    end
end