## 3 Mathematical Model  
### Constraints related to train operation  
In terms of the operation interval, we consider the tracking interval and the departure-arrival interval. For the planned trains on Line A, they need to meet the following constraints:  
\[a_{i,j}-a_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{1}\]  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]  
\[a_{i,j}-d_{i-1,j}\geq l_{a}^{p},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{3}\]  
At the same time, the planned trains on Line B also need to consider the operation interval; therefore, we obtain:  
\[a_{i,j}-a_{i-1,j}\geq l_{b}^{h},\ i,i-1\in\mathbf{N}^{B},j\in\mathbf{S}^{B}. \tag{4}\]  
\[d_{i,j}-d_{i-1,j}\geq l_{b}^{h},\ i,i-1\in\mathbf{N}^{B},j\in\mathbf{S}^{B}. \tag{5}\]  
\[a_{i,j}-d_{i-1,j}\geq l_{b}^{p},\ i,i-1\in\mathbf{N}^{B},j\in\mathbf{S}^{B}. \tag{6}\]  
The cross-line backup train also requires consideration of the operation interval, which means that the tracking interval and the departure-arrival interval between the backup train and the planned train should meet the corresponding safety requirements. Specifically, for \(i,i-1\in\mathbf{N}^{A},j\in\mathbf{S}_{1}^{A}\), if cross-line backup train \(l\) is located after train \(i-1\), before train \(i\) (i.e., between train \(i-1\) and train \(i\), and \(z_{l,i-1}^{a}=1\)), we obtain:  
\[a_{l,j}-a_{i-1,j}\geq l_{a}^{h}. \tag{7}\]  
\[a_{i,j}-a_{l,j}\geq l_{a}^{h}. \tag{8}\]  
\[d_{l,j}-d_{i-1,j}\geq l_{a}^{h}. \tag{9}\]  
\[d_{i,j}-d_{l,j}\geq l_{a}^{h}. \tag{10}\]  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]0  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]1Similarly, for \(i,i-1\in\mathbf{N}^{B}\),\(j\in\mathbf{S}_{l}^{B}\), when cross-line backup train \(l\) is located between train \(i-1\) and train \(i\) (i.e., \(z_{l,i-1}^{B}=1\)), we obtain:  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]2  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]3  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]4  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]5  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]6  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]7  
In terms of dwelling time, when a planned train on Line A and Line B is operating normally, its dwelling time should not be less than the corresponding minimum dwelling time; therefore, we obtain:  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]8  
\[d_{i,j}-d_{i-1,j}\geq l_{a}^{h},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{2}\]9  
Similarly, when adding a cross-line backup train to operate on Line A, its dwelling time should meet the corresponding constraints. However, the backup train needs to consider the additional dwelling time at the previous station of the cross-line station to provide convenience for other passengers not going to Line B. At this point, we obtain:  
\[a_{i,j}-d_{i-1,j}\geq l_{a}^{p},\ i,i-1\in\mathbf{N}^{A},\ j\in\mathbf{S}^{A}. \tag{3}\]0  
where \(\text{sign}\Big{(}j,\max\Big{(}\mathbf{S}_{l}^{A}\Big{)}\Big{)}\) is used to indicate whether \(j\) is equal to \(\max\Big{(}\mathbf{S}_{l}^{A}\Big{)}\). If \(j=\max\Big{(}\mathbf{S}_{l}^{A}\Big{)}\), the symbol is equal to 1, otherwise 0.