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,1kK.
3. Initialize maximum tolerance threshold (ε) and v(0).
4. Calculate gradients L2BkL and L2BkW according to (39) and (40).
5. Solve L2BkL=0 and L2BkW=0 then calculate current optimal values BkL(s1) and BkW(s1) 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(s1).
7. Increment the counter for the next iteration of the algorithm: s=s+1.
8. Continue solving L2BkL=0 and L2BkW=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(s1)|ε.
12. End.