# Resilience Analysis of Traffic Network under Emergencies: A Case Study of Bus Transit Network
## 3 Methodology
### Transport Lines Resilience Analysis Model Based on Resilience Theory
In this study, the trend in bus route indicators is analogous to the signal in an electronic system, while the data fluctuation is analogous to the noise. Thus, the fluctuation of the system performance data is quantified using the signal-to-noise ratio (\(SNR_{dB}\)) and represented by the fluctuation factor \(\sigma\). The role of the \(\sigma\) coefficient is to reduce the error caused by data fluctuations in resilience calculations. \[SNR_{dB}=10 lg\frac{\sum_{t=t_{S}}^{t_{E}}y_{raw}(t)^{2}}{\sum_{t=t_{S}}^{t_{E} }n(t)^{2}} \tag{17}\]  
The numerator is calculated from the original bus route data, and the denominator is the noise data obtained by subtracting the smooth data from the original data, as shown in equation:  
\[n_{(t)}=y_{raw}(t)-y_{s}(t) \tag{18}\]  
Using logical functions to convert \(SNR_{dB}\) is converted to the volatility factor, and the conversion formula is shown in equation:  
\[\sigma=\frac{1}{1+exp[-0.3(SNR_{dB}-10)]} \tag{19}\]  
where \(0\leq\sigma\leq 1\), and the value is 1 when there is no influence from unexpected events. The setting of the function slope (set to \(-0.3\)) and the offset (set to 10) accurately allows observation of data fluctuations. As the data fluctuation increases, \(\sigma\) gradually decreases. Model validation In order to provide a reference for comparison with the model proposed in this study, this section uses the resilience calculation method commonly used in resilience research to calculate the resilience indicators for comparison. The calculation method is as follows:  
\[\theta=\frac{\int_{t_{S}}^{t_{E}}y(t)dt}{(t_{E}-t_{S})y_{N}} \tag{12}\]0  
To simplify the model validation process, we construct the following function \(y(t)\) to make the data exhibit the resilience periodic characteristics of public transportation indicators when encountering sudden events:  
\[y(t)=\left\{ \begin{array}{ll}\frac{m_{1}-l}{exp[r_{1}(t-p_{1})]+1}+l+n&t\in [0,\,50],\,n\in N\big{(}0,\sigma^{2}\big{)}\\ \frac{m_{2}-l}{exp[-r_{2}(t-p_{2})]+1}+l+n&t\in[50,\,100],\,n\in N\big{(}0, \sigma^{2}\big{)}\end{array} \right. \tag{21}\]  
where \(m_{1}\) is the initial value, \(m_{2}\) is the final stable value, \(l\) is the minimum value, \(r_{1}\) and \(r_{2}\) are the slope coefficients for the decrease and increase, respectively, and \(p_{1}\) and \(p_{2}\) are the midpoints for the decrease and increase processes. \(n\) represents data noise that follows a normal distribution with mean 0 and standard deviation \(\sigma\). These parameter variations simulate the changes in the performance of different systems during the resilience cycle, such as the maximum and minimum values, stable values, and rates of decrease and recovery. The ultimate goal is to compare the accuracy of two resilience calculation methods under different parameters. The data generated by the above function with parameters \(m_{1}=50\), \(m_{2}=40\), \(r_{1}=0.3\), \(r_{2}=0.07\), \(p_{1}=40\), \(p_{2}=150\), \(l=20\), and \(\sigma=5\) is shown in Figure 8.  
Because \(r_{1}\) and \(r_{2}\) reflect the data's decline and recovery rates, they represent to some extent the absorption and recovery capacity of the bus route during the resilience period. To verify which model is more sensitive to these two capabilities, the two rates can be taken in the range of (0.05, 0.5), and the resilience values based on the two models can be calculated separately. The calculation results are shown in Figure 9.  
Figure 8: Data of model validation. Observing the results of the model calculations, it can be seen that as \(r_{1}\) decreases and \(r_{2}\) increases, the system resilience gradually improves. This simulates that the improvement of the absorption and recovery capabilities during the absorption and recovery stages in the resilience period can enhance system resilience. However, from the comparison of the data heatmap, the color blocks of the \(R_{l}\) model data are relatively more concentrated, indicating that the \(R_{l}\) model is more sensitive to changes in \(r_{1}\) and \(r_{2}\).