## 3 Methodology
### Construction of the Spatio-Temporal Network
#### 3.3.1 Construction of Train Spatio-Temporal Network  
Based on the operational characteristics of trains, the train travel process is divided into train start, train travel, train dwell, and train end. According to the spatio-temporal network construction rules, the train spatio-temporal network arcs are divided into the train start arc set, train travel arc set, train dwell arc set, and train end arc set. For each train's operational task, a corresponding train sub-network \(G_{i}=(N_{i},A_{i})\) can be established, where \(N_{i}\) is the set of nodes in the train spatio-temporal network that train \(i\) can occupy, and \(A_{i}\) is the set of arcs in the train spatio-temporal network that train \(i\) can occupy. The visual representation of the train sub-spatio-temporal network is shown in Figure 4.  
1. Construction of Spatio-temporal network  
For each train \(i\in I\), its nodes' spatial attributes depend on the stations \(s\in S_{i}\) it passes through, and the temporal attributes are constructed based on the time window \(t\in T\). To ensure the integrity of each path in the train's spatio-temporal network, virtual starting and ending points are introduced. The train arrival and departure times are determined by the scheduled train arrival and departure times. Thus, the set of nodes \(N_{i}\) in the train spatio-temporal network includes the virtual starting point \(\varphi_{i}\), the arrival nodes \(\theta_{i}^{s}\), the station departure nodes \(\rho_{i}^{s}\), and the virtual end point \(\varphi_{i}\), as shown in Table 4. The set of train sub-spatio-temporal network nodes \(N_{i}\) can be expressed as \(N_{i}=\{\varphi_{i},\varphi_{i}\}\cup\left\{\theta_{i}^{\varphi_{i}},\theta_{i }^{\varphi_{i}+1},\dots,\theta_{i}^{d_{i}}\right\}\cup\left\{\rho_{i}^{\varphi _{i}},\rho_{i}^{\varphi_{i}+1},\dots,\rho_{i}^{d_{i}}\right\}\). For any node \((s^{\prime},t^{\prime},i^{\prime})\) and \((s^{\prime},t^{\prime},i^{\prime})\) in the spatio-temporal network, we have \((s,t,i)\), \((s^{\prime},t^{\prime},i^{\prime})\in N\). Figure 4: Train \(i\) spatio-temporal network diagram. (1) Train Start Arcs \(A_{i}^{start}\)  
Train start arcs connect the virtual starting point to the arrival node at the originating station. For any train \(i\in I\), at its originating station \(s^{\prime}=o_{i}\in S_{i}\), there is a train start arc \((s,t,i)=\sigma_{i}\) to the originating station arrival node \((s^{\prime},t^{\prime},i)=\theta_{i}^{o_{i}}\), represented as \((s,t,i)\rightarrow(s^{\prime},t^{\prime},i)\), as shown in Equation (1). \[A_{i}^{start}=\left\{\big{(}s,t,i;s^{\prime},t^{\prime},i\big{)}\big{|}(s,t,i)= \sigma_{i},\big{(}s^{\prime},t^{\prime},i\big{)}=\theta_{i}^{o_{i}}\right\} \tag{1}\]  
(2) Train Travel Arcs \(A_{i}^{travel}\)  
Train travel arcs connect departure nodes to arrival nodes. For any train \(i\in I\), for its passing station \(s\in S_{i}/d_{i}\), there is a train travel arc \((s,t,i)\rightarrow(s^{\prime},t^{\prime},i)\) from the departure node of station \(s\), \(\big{(}s,t^{d}_{i,s^{\prime}},i\big{)}=\rho_{i}^{s}\), to the arrival node of station \(s^{\prime}=s+1\in S_{i}/o_{i}\) (arrival node \((s^{\prime},t^{\prime},i)=\theta_{i}^{o_{i}}\)), as shown in Equation (2). \[A_{i}^{travel}=\left\{\big{(}s,t,i;s^{\prime},t^{\prime},i\big{)}\big{|}(s,t,i)= \rho_{i}^{s},\big{(}s^{\prime},t^{\prime},i\big{)}=\theta_{i}^{o^{\prime}},s \in S_{i}/d_{i},s^{\prime}=s+1\right\} \tag{3}\]  
(3) Train Dwell Arcs \(A_{i}^{dwell}\)  
Train dwell arcs connect arrival nodes to departure nodes. For any train \(i\in I\), at each station \(s\in S_{i}\), there is a train dwell arc from the arrival node at station \(s\), \((s,t,i)=\theta_{i}^{s}\), to the departure node at the same station \((s,t^{\prime},i)=\rho_{i}^{s}\), represented as \((s,t,i)\rightarrow(s^{\prime},t^{\prime},i)\), as shown in Equation (3).