## 2 Construction of the Spatiotemporal Network for Subway Vehicle Maintenance and Scheduling
### The Details of the Designed Network
#### 3.2.3 Objective Function  
In the spatiotemporal network, minimizing the transition time between consecutive scheduling operations enhances vehicle utilization efficiency. The objective function for minimizing total transition time is given as  
\[\min_{f_{1}}=\sum_{train\in N_{train}}\sum_{r\in R}\sum_{i,j\in N_{z}i<j}\left\{ \left[t_{r}^{0}(j)-t_{r}^{d}(i)\right]x_{ij}^{r}\right\}, \tag{6}\]  
where \(\sum\limits_{train\in N_{train}}\) represents the traversal of all trains; \(\sum\limits_{r\in R}\) represents the traversal of all tasks/maintenance operations; \(i\) and \(j\) represent the traversal of tasks \(i\) and \(j\) (with \(i<j\), ensuring only adjacent tasks are considered); \(t_{r}^{0}(j)-t_{r}^{d}(i)\) represents the time interval between the end of task \(i\) and the start of task \(j\); and \(x_{ij}^{r}\) is a binary variable that indicates whether tasks \(i\) and \(j\) are executed consecutively.  
Assume that a train has two maintenance tasks. Task 1: arrival time \(t_{1}^{a}\) = 8:00 a.m., completion time \(t_{1}^{d}\) = 10:00 a.m.; task 2: arrival time \(t_{1}^{a}\) = 11:00 a.m., completion time \(t_{1}^{d}\) = 1:00 p.m. The connection time is given by \(t_{2}^{a}-t_{1}^{d}\) = 11:00 \(-\) 10:00 = 1 h. If the train has multiple maintenance tasks, the time interval for all tasks needs to be calculated similarly and summed.  
To optimize maintenance scheduling, unnecessary maintenance within the allowable mileage range should be minimized. The cost-minimization objective over the evaluation period is defined as  
\[\min_{f_{2}}=\sum_{train\in N_{train}}\sum_{r\in R}\sum_{m\in M}C_{m}y_{im}^{r}, \tag{7}\]  
where \(C_{m}\) represents the unit cost of maintenance mode \(m\), and \(y_{im}^{r}\) represents whether maintenance task \(r\) has chosen maintenance mode \(m\). For example, if a train requires maintenance after 5000 km of operation, the following maintenance options are available: (1) minor repair (cost CNY 2000, task number 1); (2) major repair (cost CNY 5000, task number 2). If, within the statistical period, three minor repairs and one major repair are performed, the total maintenance cost is as follows: total cost \(f_{2}=3\times 2000+1\times 5000=6000+5000=\text{CNY 11,000}\).  
A weighted coefficient approach is adopted to transform the bi-objective function into a single-objective function. The transformed function is formulated as Equation (8). By introducing proportional coefficients \(\omega_{1}\) and \(\omega_{2}\), the balance between the two objectives \(f_{1}\) and \(f_{2}\) is controlled. When \(\omega_{1}\) is small and \(\omega_{2}\) is large, the optimization emphasizes maintenance cost reduction, potentially at the expense of scheduling efficiency. Conversely, when \(\omega_{1}\) is large and \(\omega_{2}\) is small, the optimization prioritizes minimizing the total transition time, possibly increasing maintenance costs. Given this trade-off, minimizing the total transition time is set as the primary objective.  
Penalty factors \(k_{1}\) and \(k_{2}\) are incorporated to ensure feasible solutions by accounting for constraints related to vehicle transport capacity and maintenance feasibility. The final optimization objective is expressed as  
\[\begin{split}\text{min}f&=\omega_{1}f_{1}+\omega _{2}f_{2}+k_{1}+k_{2}\\ k_{1}&=\sum\limits_{day\in Day}\left(\sum\limits_{ train\in N_{train}}\sum\limits_{r\in R}\sum\limits_{i,j\in N_{w},i<j}\left(1-x_{ ij}^{r}\right)-N_{B}\right)\\ k_{2}&=\sum\limits_{day\in Day}\left(\sum\limits_{ train\in N_{train}}\sum\limits_{r\in R}\sum\limits_{i,j\in N_{w},i<j}y_{ij}^{r}-N_{M} \right)\end{split}. \tag{8}\]