# Multiservice-Based Traffic Scheduling for 5G Access Traffic Steering, Switching and Splitting
## 3 Multiservice Type-Based Transmission (MSTT)
Additionally, the constraint in Equation (38) indicates that each service has an opportunity to upload data. To solve the convex optimization problem, the optimal bandwidth-allocation mechanism should satisfy \(\sum\limits_{k=1}^{k=K}B_{i}^{L*}=B^{L}\). The reason is as follows: with \(B_{i}^{L*}\) as the optimal uplink bandwidth-allocation mechanism and \(E_{L}^{*}(\theta_{i})\) as the maximum effective network capacity of the NR, if \(\sum\limits_{k=1}^{k=K}B_{i}^{L}<B^{L}\), the surplus bandwidth remains in the network. Any additional capacity owing to the remaining network bandwidth will reduce the objective function. Thus, the optimal bandwidth-allocation mechanism should satisfy \(\sum\limits_{k=1}^{k=K}B_{i}^{L*}=B^{L}\). Further, the sub-gradient algorithm is used to determine the optimal solution of the optimal bandwidth-allocation mechanism. The Lagrangian function in Equation (35) is expressed as follows:  
\[ \begin{array}{ll}L_{2}\big{(}B_{k}^{L},B_{k}^{W},p,q\big{)}=\mathbb{E}_{ \gamma_{k}^{L}}\Bigg{\{}\prod\limits_{i=k}^{K}\big{(}1+P_{k}^{L*}\gamma_{k}^{ L}\big{)}^{\frac{-\theta_{k}B_{k}^{L}}{\ln 2}}\Bigg{\}}+\mathbb{E}_{\gamma_{k}^{W}} \Bigg{\{}\prod\limits_{i=k}^{K}\big{(}1+P_{k}^{W*}\gamma_{k}^{W}\big{)}^{ \frac{-\theta_{k}B_{k}^{W}}{\ln 2}}\Bigg{\}}\\ \hskip 14.226378 pt+p\bigg{(}\sum\limits_{k=1}^{k=K}B_{i}^{L}\leq B^{L}\bigg{)} +q\bigg{(}\sum\limits_{k=1}^{k=K}B_{i}^{W}-B^{W}\bigg{)},\end{array}  \tag{39}\]  
where \(p\) and \(q\) are the nonnegative Lagrangian multipliers. After obtaining \(L_{2}\) for the partial derivatives, \(B_{k}^{L}\) and \(B_{k}^{W}\), the results are set to 0 to obtain the following:  
\[\left\{ \begin{array}{ll}\frac{\partial L_{2}}{\partial B_{k}^{L}}=-\frac{ \theta_{k}}{\ln 2}\prod\limits_{i=k}^{K}\big{(}1+P_{k}^{L*}\gamma_{k}^{L}\big{)}^{ \frac{-\theta_{k}B_{k}^{L}}{\ln 2}}\ln\big{(}1+P_{k}^{L*}\gamma_{k}^{L}\big{)}=0,\\ \frac{\partial L_{2}}{\partial B_{k}^{W}}=-\frac{\theta_{k}}{\ln 2}\prod\limits_{i=k}^{K} \big{(}1+P_{k}^{W*}\gamma_{k}^{W}\big{)}^{\frac{-\theta_{k}B_{k}^{W}}{\ln 2}}\ln \big{(}1+P_{k}^{W*}\gamma_{k}^{W}\big{)}=0.\end{array} \right. \tag{40}\]  
The pointwise convergence of the lower bound of the Lagrangian function \(L_{2}\) yields the Lagrangian dual function as follows:  
\[D(p,q)=\underset{ \begin{subarray}{c}(B_{k}^{L},B_{K}^{W})\\ 1<i<K\end{subarray} }{\inf}L_{2} \tag{41}\]The sub-gradient method is employed to solve the dual problem, and the Lagrangian multipliers are solved in each iteration using the following:  
\[\left\{ \begin{array}{l}p(s+1)=p(s)+v(s)\frac{\partial L_{3}}{\partial p},\\ q(s+1)=q(s)+v(s)\frac{\partial L_{3}}{\partial q},\end{array} \right. \tag{42}\]  
where \(s\) represents the number of iterations, \(\frac{\partial L_{2}}{\partial p}\) and \(\frac{\partial L_{2}}{\partial q}\) represent gradients, and \(v(s)\) represents the gradient step size for each iteration, \(s\). In summary, Equation (20) is an optimization problem, for maximizing the total effective capacity of users in the system, where the limiting conditions are the bandwidth and the user power. As the two resources do not affect each other, the total optimization problem is decomposed into two sub-problems, as Equations (25) and (35). Equations (28) to (34) detail the process of solving the sub-problem in Equation (25), using the Lagrangian equation method. Equations (39) to (42) detail the solution methods of the sub-problem in Equation (35), using the sub-gradient method. The procedure to solve the optimal bandwidth allocation is presented as Algorithm 1. ```
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 \(\frac{B_{k}^{L}}{p}\), \(B_{k}^{W}\), \(p\), \(q\), and \(\theta_{k},1\leq k\leq K\). 3. Initialize maximum tolerance threshold (\(\varepsilon\)) and \(v(0)\). 4. Calculate gradients \(\frac{\partial L_{2}}{\partial B_{k}^{L}}\) and \(\frac{\partial L_{3}}{\partial B_{k}^{W}}\) according to (39) and (40). 5.