# Adaptive Emergency Call Service for Disaster Management
## 4 Adaptive Multi-Hop Emergency Call Protocol: 5G-SOS
### 5G-SOS Adaptive Parameters
#### 4.1.1 Waiting Time for Relaying, \(T_{r}\)  
The role of the waiting time \(T_{r}\) is to define an order between the relay devices in a fully distributed way. A short \(T_{r}\) means that the relay device is suitable for relaying the emergency call. When the \(T_{r}\) is long, the device relays the call only if necessary, i.e., the neighbor relaying is not sufficient. In other words, UEs with a low \(SoC\), out of coverage, low RSSI signal, or with poor localization accuracy wait longer before deciding to relay the received emergency call. Therefore, longer \(T_{r}\) allows the UE to wait for the decisions of more suitable devices. To prevent a very long waiting time, a maximum waiting time \(T_{\max}\) is introduced. In M-HELP [9], the waiting time is computed as (3):  
\[T_{r}^{M-HELP}=\min\,\bigg{(}T_{\max},\frac{1}{\text{LocAcc}_{r}+\delta}\times \frac{1}{\text{Ic}_{r}+\delta}\times\frac{\text{SoC}_{\max}}{\min\,\big{(} \text{SoC}_{r},\text{SoC}_{\max}\big{)}}\bigg{)}, \tag{3}\]  
where the coverage state, localization accuracy, and residual energy of \(r\) is given, respectively, by \(\text{Ic}_{r}\), \(\text{LocAcc}_{r}\) and \(\text{SoC}_{r}\). In the M-HELP protocol, \(T_{\max}\) was fixed to a specific value. However, it is clear that the value of \(T_{\max}\) should be adapted according to many factors such as the observed emergency call rate and the UE density. That is why the computation of the \(T_{r}\) value is adjusted as follows:  
\[ \begin{split} T_{r}^{\text{5}-\text{SOS}}&=\min \,\bigg{(}T_{\max}(n_{k},n_{c}),\\ &\frac{\text{RSSI}_{\text{tx}}}{\text{RSSI}_{\text{r}}}\times \frac{1}{\text{LocAcc}_{r}+\delta}\times\frac{1}{\text{Ic}_{r}+\delta}\times \frac{\text{SoC}_{\max}}{\min\,\big{(}\text{SoC}_{r},\text{SoC}_{\max}\big{)} }\bigg{)}.\end{split}  \tag{4}\]  
The parameter \(T_{\max}\) is now expressed by a modified Rosenbrock [40; 41] function. Moreover, Rosenbrock function is used often as a test problem for optimization algorithms. Further, Rosenbrock function is used in this work seeing that it has a slope with the same behavior to \(T_{\max}(n_{c},n_{k})\) given in Table 3. The Rosenbrock function given in (5) is modeled to increase the sensitivity of protocol to the real-time local factors such as the amount of emergency requests and neighborhood congestion detected in the previous minute. \[T_{\max}(n_{c},n_{k})=\min(\max((a-n_{c})^{2}+b\times(n_{k}-n_{c} ^{2})^{2},0),u_{b}), \tag{5}\]  
where \(n_{c}\) represents the total number of received emergency requests, including multiple receptions during the last minute. \(n_{c}\) is used to measure the level of congestion in the neighboring environment in the past minute. Further, \(n_{k}\) measures the total number of different emergency call requests received in the previous minute. In addition, \(a\) and \(b\) are two parameters that govern the shape of the Rosenbrock \(T_{\max}\) function in (5). A low number of distinct emergency calls \(n_{k}\) with a high congestion level \(n_{c}\) expresses a low emergency load but with many relaying opportunities for each emergency request due to the network density. In this case, a high \(T_{\max}\) value allows to better select the relevant relays. However, if both \(n_{k}\) and \(n_{c}\) are low, the \(T_{\max}\) value is decreased since there are not enough relay alternatives, i.e., a weakly dense network. Finally, when \(n_{k}\) is high, a lower \(T_{\max}\) is preferable in order to quickly handle the newly received emergency requests. Further, if the number of neighboring relaying devices is less and such devices have a low battery level, they will be assigned a relatively shorter \(T_{\max}(n_{c},n_{k})\) by 5G-SOS based on the low neighborhood congestion. The expected adaptive behavior of \(T_{\max}\) according to \(n_{c}\) and \(n_{k}\) is summarized in Table 3. The curve of the original Rosenbrock function, \(f\), is given in Figure 4. When \(x\) increases while \(y\) is fixed, \(f(x,y)\) increases. However, when \(y\) is increased, while keeping \(x\) fixed, \(f(x,y)\) decreases gradually.