## 5 Traffic Models and Utility Functions
### Utility-Based Bandwidth Management  
The proposed idea takes into account the channel link quality, modeled as described in [3, 31, 46, 47] and aims to guarantee a good level of fairness for users belonging to the same service class. Another aim of our proposal is aimed at obtaining a very low outage probability \(\mathrm{P_{outage}}\) (that is the probability associated to the event that instant perceived utility of any served user falls below its lower threshold). As described in [3, 31, 46], the wireless link among a user and its current active AP can be modeled by a k-state Markov chain: the average state-permanence time associated to each state \(m\) is indicated with \(t_{m}\), the degradation ratio of the \(m\)-th state is \(D_{m}\) (with \(0\leq D_{m}<1\), \(\forall\ 1\leq m\leq k\)). If \(r_{i}\) is the amount of bandwidth allocated by the network to user \(i\), the received instant utility is defined on the basis of the belonging service class:  
\[u_{i}=U_{i}-(1-D_{i,m}){*}r_{i}) \tag{6}\]  
while for the specific service class it will be:  
\[u_{MIP,i}=U_{RT}((1-D_{i,m})*r_{i})=\frac{a_{s,k}}{1+\exp(b_{s,k}((1-D_{i,m})*r _{i}-c_{s,k}))^{d_{s,k}}}+\sum_{j=1}^{k-1}a_{s,j} \tag{7}\]  
\[u_{MDP,i}=U_{BE}((1-D_{i,m})*r_{i})=a+b{\cdot}[(1-D_{i,m})*r_{i}]^{q} \tag{8}\]  
It must be outlined that \(D_{i,m}\) is associated to every chain state when the FSMC for ulcer \(i\) is defined, so it is a fixed value. For more details about the FSMC, to see [3, 31, 46]. The implementation of the wireless channel has been carried out according with the standard IEEE 802.11 [46]. In order to guarantee the intra-class fairness level, a normalized gap of the average received utility can be defined for user \(i\) as:  
\[G_{i}=\frac{\left(u_{i,avg}-u_{CLASSi,\min}\right)}{u_{CLASSi,\min}} \tag{9}\]  
where \(u_{i,avg}\) is the average received utility by user \(i\) and \(u_{CLASSi,\min}\) is the minimum allowed utility level foI user \(i\) that belongs to the CLASS service class (NSIS-MIP or NSIS-MDP). The proposed algorithm follows an intra-class fairness criterion, so each value of \(G_{i}\) will be compared only with \(G_{j}\), where users \(i\),\(j\) belong to the same service class. Figure 3 represents the main phases of the proposed reallocation algorithm. When a link degradation occurs to the \(i\)-th used, it will give-up some bandwidth to another user \(j\), with a smaller normalized gap. When the quality of \(i\)'s link becomes better, it will receive some bandwidth from user \(j\), with a larger normalized gap. In this way, the combined instant utility will be maximized. For example, in order to satisfy user \(i\)T \(u_{CLASS\;i,min}\) when its link degrades and to avoid the outage event, the scheme searches for _CLASS-benefactor(s)_ (able to give-up some bandwidth), starting from the user with the largest normalized gap. A deep and complete description of the upgrade/degrade effects on bandwidth reallocations can be found in [31]. In addition, if a user arrives (new user) or departs from the network, the BRS has to take place. For example, if, after a new user arrival, \(r\) bandwidth needs to be collected (from current _CLASS_-users), user \(j\) with largest normalized gap \(G_{j}\) will give up an amount of bandwidth equal to \(\min(\max(0,r_{j}-\frac{r_{j}\min}{1-D_{j\mu}}),r)\), where \(q\) is \(j\)'s link state. The procedure is carried-on until \(r\) has been reached (or all the current users have been searched). If \(r\) is not reached, a second collection round is started but, this time, each chosen user will be dropped out from the network. A user with a totally degraded communication link has to give up a part of its reserved bandwidth in order to maximize the perceived utility of system users (for details, see [31]). As will be seen in next section, an NSIS-MDP user can use free available bandwidth in the current AP (active-NSIS-MDP) or a certain amount of bandwidth equal to \(\min(\max(0,r_{j}-\frac{r_{j}\min}{1-D_{j\mu}}),r)\). Figure 3: Bandwidth reallocation algorithm state flow diagram.