## 3 Mathematical Formulation
### Generation of the Connection Network  
Drawing from existing methods [4; 9], we construct the connection network with time-delay windows vehicle by vehicle. Figure 2 serves as an illustrative example of a single bus's connection network, corresponding to bus 3 in the breakdown scenario depicted in Figure 1. In this graphical representation, the rectangular nodes correspond to individual trips, whereas the edges symbolize specific buses. The different colors of the rectangular nodes indicate the corresponding bus lines that trips travel along. When breakdowns occur, buses may be either in transit or parked, and the manager needs to determine how to reschedule the buses to minimize the impact of breakdowns. For example, combined with the information from Figure 1, it can be seen that bus 1 is parked at the arrival stop of \(trip_{1}\), and bus 3 is serving \(trip_{2}\) when bus 2 breaks down. Therefore, we introduce \(sd^{b}\) to represent the starting point of a specific bus \(b\), indicating the specific availability time and location from which \(b\) can be deployed. For example, \(sd^{3}\) means that bus 3 is available for rescheduling starting from the arrival stop of \(trip_{2}\) at 7:55. Additionally, \(td^{b}\) is used to denote that \(b\) has completed its service and returned to the depot. A complete schedule of bus \(b\) after disruptions is depicted by a unique link from \(sd^{b}\) to \(td^{b}\). \begin{table}
\begin{tabular}{l l} \hline \hline
**Indices** & **Description** \\ \hline \(i,j,u\) & Trip index, \(i,j=1,2,\ldots,R_{n}\); \(u\) refers to the remainder of the trip currently being performed by the breakdown bus. \\ \(b\) & Bus index, \(b=1,2,\ldots,B_{n}\). \\ \(l\) & Line index, \(l=1,2,\ldots,L_{n}\). \\ \hline \hline
**Parameters** \\ \hline \(t_{i}\) & Travel time of trip \(i\). \\ \(S_{i}\) & \(S_{i}\in\{l|l=1,2,\ldots,L_{n}\}\). The line that trip \(i\) belongs. \\ \(O_{l}\) & Departure stop of line \(l\). \\ \(D_{l}\) & Arrival stop of line \(l\). \\ \(p_{j}^{b}\) & \(p_{j}^{b}\in\{0,1\}\); 1 if trip \(j\) is covered by bus \(b\) in the original schedule, 0 otherwise. \\ \(t_{min}^{i\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,  
We commence by constructing the connection network with all compatible trip pairs based on the remaining trips. Let \(\mathbf{V}_{t}\) denote the nodes corresponding to the trips that depart after disruptions. \(\mathbf{V}_{t}^{b}\subseteq\mathbf{V}_{t}\) is the set of trip nodes that can be performed by \(b\). According to Formula (1), we establish connections between the nodes using directed edges and derive a set of edges \(\mathbf{E}_{t}^{b}=\{(i,j)|\varphi(i,j)=1,i,j\in\mathbf{V}_{t}^{b}\}\) pertaining to deadheads between \((i,j)\), as indicated by the solid edges in Figure 2. Subsequently, the connection network of bus \(b\) without considering delays can be represented by \(G^{b}=(\mathbf{V}^{b},\mathbf{E}^{b})\), where \(\mathbf{V}^{b}=\mathbf{V}_{t}^{b}\cup\{sd^{b},td^{b}\}\) and \(\mathbf{E}^{b}=\mathbf{E}_{t}^{b}\cup(sd^{b}\times\mathbf{V}_{t}^{b})\cup( \mathbf{V}_{t}^{b}\times td^{b})\cup\{(sd^{b},td^{b})\}\). Then, we expand the connection network to further explore which trip could be performed by bus \(b\) with a permissible delay. Let the delay time for trips be denoted as \(d\) minutes. Consider \(W^{b}\) as a copy of \(\mathbf{V}_{t}\), where the nodes are arranged in order of departure time to ensure that all nodes will be visited. The expansion starts by visiting the first node in \(W^{b}\), assuming it to be \(sd^{3}\), and iterating over all nodes \(\{j|\varphi(sd^{3},j)\
eq 1,j\in\mathbf{V}_{t}\}\) that cannot be operated from \(sd^{3}\) without delay. If there exists \(d\leq d_{max}\) such that trip \(j\) can be operated from \(sd^{3}\) after a \(d\)-minute delay in departure time, a copy of trip \(j\), denoted by \(j^{(d)}\) and departing at \(T_{j^{(d)}}=T_{j}+d\), could be reasonably performed following the completion of \(sd^{3}\).