Research Article

An Optimal Joint User Association and Power Allocation Algorithm for Secrecy Information Transmission in Heterogeneous Networks

Algorithm 2

Lagrange dual method based power allocation algorithm.
(1)  Set the maximum number of iterations and the maximum tolerance
(2)  Initialize Lagrange multipliers ,
(3)  repeat
(4)  Calculate the power allocation strategy
     
(5)  Update the Lagrange multipliers:
          ,
           
(6)        if  
                  then
(7)           Convergence = true
(8)         return  
(9)         else
(10)          
(11)        end if
(12)       until Convergence = true or