# Optimization of Multi-Day Flexible EMU Routing Plan for High-Speed Rail Networks
## 2 Model Description
### Model Construction
#### 2.2.3. Mathematic Model  
**Objective Function:** In this study, the optimization objective is formulated as a weighted sum of total connection time and empty-running mileage, as shown in Equation (1). This formulation can be interpreted as a scalarization of a multi-objective optimization problem, where the weights \(\alpha_{1}\) and \(\alpha_{2}\) represent the relative importance assigned to each objective. Specifically, minimizing the total connection time reduces the number of EMUs and lowers overall operational costs. In contrast, minimizing empty-running mileage improves EMU utilization efficiency and helps achieve a more balanced distribution of operating mileage among different EMUs. By adjusting the weights \(\alpha_{1}\) and \(\alpha_{2}\), the proposed method can be flexibly adapted to various operational scenarios, thereby enhancing its practical applicability in large-scale high-speed railway networks. \[\min Z=\alpha_{1}Z_{1}+\alpha_{2}Z_{2} \tag{1}\]  
(1) Total Connection Time  
The total connection time \(Z_{1}\) is used as a proxy to reflect the number of EMUs required. Since the train operation schedule is fixed, a circulation plan with a shorter total connection time implies more efficient vehicle turnover and fewer required EMUs. The objective \(Z_{1}\) is given by  
\[Z_{1}=\sum_{v\in V}\sum_{k\in K}t_{ij}\cdot x_{ij}^{v,k},\forall i,j\in \mathcal{D}\cup\mathcal{C},\ i\
eq j \tag{2}\]  
The connection time \(t_{ij}\) between vertices \(i\) and \(j\) is computed as follows:  
\[t_{ij}= \begin{cases}t_{j}^{d}-t_{i}^{a}&\text{if }t_{j}^{d}>t_{i}^{a}\text{ and }s_{i}^{a}=s_{i}^{d}\\ t_{j}^{d}-t_{i}^{a}+1440&\text{if }t_{j}^{d}<t_{i}^{a}\text{ and }s_{i}^{a}=s_{i}^{d}\\ +\infty&\text{otherwise}\end{cases}  \tag{3}\]  
(2) Empty-Running Mileage  
To improve the utilization of EMUs, it is essential to minimize total empty-running mileage. A penalty coefficient, \(\zeta\), is used to convert empty mileage into the same unit as that of connection time. The corresponding objective \(Z_{2}\) is defined in Equation (4):  
\[Z_{2}=\zeta\left(\sum_{v\in V}\sum_{k\in K}\sum_{l\in D}\sum_{j\in\mathbb{C} ^{k}}x_{ij}^{v,k}\cdot F_{ij}+\sum_{v\in V}\sum_{k\in K}\sum_{l\in\mathbb{C} }x_{ij}^{v,k}\cdot F_{ij}\right) \tag{4}\]  
Here, \(F_{ij}\) represents the empty-running distance between vertices \(i\) and \(j\), and \(x_{ij}^{v,k}\) is the binary decision variable indicating whether EMU \(v\) performs the connection from \(i\) to \(j\) on day \(k\). **Constraints:** According to the rules of multi-day EMU flexible routing and maintenance requirements, the following constraints are established:  
(1) Flow Balance Constraints. These constraints ensure that for each EMU, the number of inbound and outbound arcs at each node in the connection network is balanced. They also ensure that each EMU starts and ends at the virtual depot node. \[\sum_{j\in N}x_{ij}^{v,k}-\sum_{j\in N}x_{ji}^{v,k}=0,\quad\forall i\in S\cup D \cup C,\ v\in V,\ k\in K \tag{5}\]\[\sum_{i\in C}x_{ij}^{n,k}=1,\quad\forall v\in V,\;k\in K \tag{6}\] \[\sum_{j\in O}x_{ij}^{n,k}=1,\quad\forall v\in V,\;k\in K \tag{7}\]  
(2) Train Assignment Constraints. Each train task in the operation diagram must be assigned to exactly one EMU of the appropriate type:  
\[\sum_{v\in V}\sum_{i\in N}x_{ij}^{n,k}=1,\quad\forall k\in K,\;j\in C^{k},\;i \
eq j \tag{8}\]  
(3) Depot Departure and Return Constraints. Each EMU must depart from a depot on the first day:  
\[\sum_{j\in C^{1}}x_{ij}^{n,1}=1,\quad\forall i\in D,\;v\in V \tag{9}\]  
Each EMU must return to its previous departure point on the following day:  
\[\sum_{j\in C^{k}}x_{ij}^{n,k}=\sum_{i\in C^{k-1}}x_{ji}^{n,k-1},\quad\forall k <|K|,\;i\in D\cup S,\;v\in V \tag{10}\]  
Finally, each EMU must return to a depot at the end of the planning period:  
\[\sum_{i\in N}x_{ij}^{n,|K|}=1,\quad\forall j\in D,\;v\in V \tag{11}\]  
(4) Cumulative Mileage for Maintenance. Each EMU is required to undergo Level I maintenance either after accumulating a certain mileage or after a fixed operational time.