Skip to main content
. 2022 Apr 25;22(9):3285. doi: 10.3390/s22093285
Algorithm 1. Optimal bandwidth allocation using the sub-gradient method.
1. Declare, instantiate, and initialize s = 0 as a counter of the number of iterations s according to (35).
2. Input the initial values of BkL, BkW, p, q, and θk,1≤k≤K.
3. Initialize maximum tolerance threshold (ε) and v(0).
4. Calculate gradients ∂L2∂BkL and ∂L2∂BkW according to (39) and (40).
5. Solve ∂L2∂BkL=0 and ∂L2∂BkW=0 then calculate current optimal values BkL∗(s−1) and BkW∗(s−1) based on PL∗ and PW∗, as obtained from the optimal power-allocation mechanism described by (34).
6. Calculate the current optimal effective network capacity, Ei∗(s−1).
7. Increment the counter for the next iteration of the algorithm: s=s+1.
8. Continue solving ∂L2∂BkL=0 and ∂L2∂BkW=0 and obtaining current optimal values BiL∗(s) and BiW∗(s) according to optimal power allocations PL∗ and PW∗.
9. Calculate Ei∗(s).
10. Update p and q according to the iteration formula in (42).
11. Loop until |E∗(s)−E∗(s−1)|≤ε.
12. End.