Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

2 January 2026

21 Pages

Optimization and Solution of Shunting Plan Formulation Model for EMU Depot Considering Maintenance Capacity

,
,
,
and
Signal and Communication Research Institute, China Academy of Railway Sciences, Beijing 100081, China
*
Author to whom correspondence should be addressed.

Abstract

In this paper, we take the longitudinal two-stage and two-yard EMU (Electric Multiple Unit) depot as an example and discusses the optimization challenges of the first-level maintenance shunting operation plan under the background of limited maintenance capacity. A multi-objective programming is constructed, which adopts the lexicographic ordering method and aims to minimize the occupancy time of key line areas and the number of train storage times. In order to enhance the flexibility and solution efficiency of the shunting operation plan, we design an efficient three-stage strategy algorithm. Specifically, in the first stage, the genetic and mutation rules are integrated, and the fast iterative advantage of the genetic algorithm is utilized to solve the time decision variables in the optimization problem. In the second stage, the allocation of track occupancy variables is further solved. The third stage focuses on the optimized allocation of maintenance team variables to ensure the scientific scheduling of maintenance resources. Finally, a validation experiment was conducted using the maintenance tasks of 19 EMU sets as the test scenario. The results indicate that when the number of maintenance teams is set to 4, an optimal balance between maintenance efficiency and operational cost is achieved, the occupancy duration of key line zones reaches 3034 min (the theoretical optimum), the number of maintenance teams is reduced by 33.33% compared to the initial 6 teams, and the number of storage operations is optimized to 27 times. Additionally, the algorithm’s solution time remains under 50 s, demonstrating significantly improved computational efficiency. Comparative experiments with baseline algorithms show that the proposed method reduces the occupancy duration of key line zones by up to 0.49%, decreases the number of storage operations by 14 times, and advances the maximum completion time by 20 min. In summary, the proposed method provides solid theoretical support for the formulation of maintenance plans and shunting schedules in EMU depots. Particularly in complex scenarios with limited maintenance capacity, it offers innovative and robust decision-making foundations, demonstrating significant practical guidance value.

1. Introduction

With the rapid expansion of high-speed railways, the growing fleet of EMUs has heightened the complexity and significance of depot shunting operations. Traditional manual planning methods are inefficient and struggle to scale with the rising maintenance demands. Moreover, current approaches often neglect maintenance capacity constraints, leading to suboptimal team allocation and reduced efficiency. To address these issues, this paper develops a lexicographic multi-objective programming model under maintenance capacity constraints. The model optimizes shunting plans, allocates maintenance teams effectively, enhances coordination between personnel and EMUs, and ensures both operational safety and resource efficiency.
Scholars worldwide have conducted in-depth research on the shunting operation plan of EMU depots. International research primarily addresses train unit shunting. For instance, Jacobsen et al. introduced a spatiotemporal network model for train maintenance workflows [1]. Mohammad et al. developed an agent-based model to enhance shunting quality [2]. Pieter Knop et al. formulated a mathematical model for freight shunting in Kijfhoek, Netherlands, solved via simulated annealing algorithm [3]. Kamenga et al. proposed an algorithm for generalized train shunting with microscopic track optimization [4]. Veronica et al. applied a spatiotemporal network method to port railway shunting [5]. Van Bavel et al. tackled the train unit shunting problem (TUSP) using a hybrid evolutionary algorithm with a novel recombination technique [6].
In contrast, domestic research has predominantly focused on fixed-formation EMUs (typically 8 or 16 trains). For instance, Wang et al. introduced a track connectivity graph and applied an ant colony algorithm to resolve route conflicts, establishing a model aimed at minimizing critical line area occupancy time [7]. Guo et al. investigated shunting operations across various EMU depot layouts and formulated a 0-1 integer programming model to optimize these operations [8]. Han et al. developed a nonlinear integer model for flexible sequencing of first-level maintenance tasks, targeting the minimization of the latest completion time. Their improved genetic algorithm enhanced line utilization, reduced completion times, and improved both maintenance efficiency and depot operational capacity [9]. In 2022, Shi et al. tackled flexible storage and track occupancy issues by establishing a two-level lexicographic goal programming model, enabling integrated scheduling of all depot operations [10]. Hu et al. formulated an optimization model to reduce the number of track occupancies during shunting and employed a simulated annealing algorithm to accelerate post-entry warehousing operations [11]. Another study by Shi et al. constructed a 0–1 integer linear programming model to minimize total critical line area occupancy time, solving it both directly with CPLEX and via a tailored genetic algorithm [12]. Fei et al. approached driver scheduling by building a spatiotemporal network, reformulating it as a minimum-cost multi-commodity network flow problem, and applying a Lagrangian relaxation heuristic [13]. Yu et al. explored multi-agent system (MAS) theory, proposing an organizational framework and a train operation scheduling agent structure equipped with a learning mechanism [14]. In 2023, He et al. conducted research on three types of shunting and service scheduling problems, introducing a model and algorithm that effectively avoid conflicts and generate maintenance plans applicable to all three scenarios, thereby improving maintenance efficiency [15]. Zhang et al. established a mixed-integer programming model incorporating shunting operations and proposed an improved genetic algorithm to balance track occupancy buffer time [16]. Liu et al. focused on shunting operation planning for stub-end EMU depots, considering multiple operational modes and performance indicators. They developed a mixed-integer linear programming (MILP) model and an enhanced simulated annealing algorithm to efficiently solve large-scale instances [17]. Shi et al. addressed the rescheduling of train shunting and service (SSS) plans following disruptions, designing a two-layer spatiotemporal network to describe EMU movements within the depot and a heuristic algorithm capable of recovering feasible plans within 180 s, ensuring operational continuity and stability [18].
From another perspective, the train scheduling problem in EMU depots can be analogized to the Job Shop Scheduling Problem (JSSP)—where EMUs correspond to workpieces to be processed, various tracks correspond to processing machines, and dynamic events such as machine failures and task changes extend it to the Dynamic Job Shop Scheduling Problem (DJSSP) [19]. Zhao et al. [20], who proposed a dual-layer action Q-learning algorithm combined with a genetic algorithm to generate initial solutions, effectively addressing rescheduling under machine failures. Zheng et al. [21] designed a Q-learning multi-objective grey wolf optimizer (QMOMGWO) to avoid local optima, though it suffers from insufficient multi-objective balance and high complexity. and Yin et al. [22] introduced a multi-stage grey wolf optimization algorithm to enhance solution flexibility, yet it remains sensitive to initial parameters and requires optimization for large-scale scenarios. Although these studies provide theoretical and methodological references, the scheduling problem in EMU depots differs fundamentally from JSSP due to additional constraints: train route conflict constraints, flexibility in task execution sequences, entry and exit time constraints, and maintenance capacity limitations. These unique constraints significantly increase the complexity of the problem, necessitating the development of dedicated optimization models and efficient algorithms tailored to this specific context.
In summary, scholars have conducted extensive and in-depth research in the field of EMU shunting operation planning, yielding fruitful results. Most studies address multiple constraints such as track occupancy, flexible train storage, and parallel routing. By constructing optimization models aimed at minimizing key line zone occupancy, shunting moves, or delay times, and integrating intelligent optimization techniques like genetic algorithms and ant colony algorithms, they have improved solution efficiency. However, collaborative planning of maintenance and shunting under capacity constraints remains underexplored. In practical operations, the number of maintenance teams is a critical factor influencing shunting plans. An excessive number of teams may lead to resource idleness and waste, while an insufficient number can constrain both maintenance and shunting efficiency. Under limited maintenance capacity, determining how to optimally allocate teams to maximize maintenance efficiency remains a critical and pressing challenge.
Based on this, this paper takes a two-level, two-yard tandem EMU depot as the research object and focuses on optimizing the first-level maintenance shunting operation plan under maintenance capacity constraints. First, an innovative lexicographic multi-objective programming model is constructed, with minimizing key line zone occupancy time as the primary objective and minimizing storage operations as the secondary objective. Subsequently, a three-step strategic solution algorithm is designed to achieve flexible phased planning of shunting operations, effectively improving track utilization and maintenance efficiency. The actual operational plan of an EMU depot is used as a test case, with the number of maintenance teams set as a dynamic parameter for validation, the results show that when the number of teams is four, an optimal balance between maintenance efficiency and cost is achieved. Comparative experiments with two baseline algorithms demonstrate that the proposed method outperforms in key metrics such as key line zone occupancy, number of shunting moves, planning time, and maximum completion time, validating the superiority of the model and algorithm.

2. Mathematical Model

2.1. Problem Description

This paper focuses on optimizing the two-level two-yard end-type longitudinal track layout, whose spatial configuration is illustrated in Figure 1. The layout employs a longitudinal design featuring an entrance/exit at the west end, maintenance track groups at the east end, and a central area integrating washing tracks and storage tracks, forming a process-oriented operational zone with functional partitioning. In typical operational scenarios, trains entering from the entrance/exit must complete two core tasks-washing and maintenance-with the sequence dynamically adjustable based on real-time resource availability: when washing or maintenance tracks are idle, trains can directly enter the corresponding tracks for operations; if the relevant tracks are occupied, trains must first be shunted to storage tracks for waiting until the target tracks become available for secondary shunting. If the maintenance task is prioritized, the train set proceeds directly to the maintenance line via the entry/exit straight tracks; otherwise, it enters the washing line for cleaning operations. To enhance overall track utilization, reduce shunting frequency, and lower labor costs, this study establishes a path-optimization-based operational model with the core objective of enabling trains to efficiently complete assigned tasks and depart on schedule.
Figure 1. Layout of the stock road of the EMUs.
We abstract the entire operational process of trains within the EMU depot into a path network (as shown in Figure 2), revealing that the complete path from entry to exit may involve up to five track nodes and six route options, specifically a five-segment path: storage track → washing track → storage track → maintenance track → storage track (where the first two storage tracks serve as temporary waiting points, which can be skipped when washing/maintenance resources become available). In addition, we only consider a single route, with the route passing through throat B for shunting operations. The study proposes a dual-objective optimization strategy aiming to minimize the occupation time of critical track sections and reduce shunting moves, leveraging intelligent scheduling algorithms to achieve an operational mode characterized by “minimized storage time and accelerated turnover” for EMUs.
Figure 2. EMU Operation path diagram.
When the EMU depot is carrying out shunting operations, it is often restricted by the insufficient maintenance capacity. Specifically, if the number of maintenance teams is insufficient, even if there is no conflict in the routes and the maintenance tracks are idle, the maintenance work cannot be carried out in a timely manner. Conversely, if there are excessive maintenance teams, it will result in a situation where some teams have no maintenance tasks to execute. In previous literature, this key factor of maintenance capacity was rarely mentioned or considered. We take it into account for the first time. On this basis, by considering key parameters comprehensively, such as the infrastructure data of the EMU depot, the operation plan of the EMU, the first-level maintenance plan and the time standards of various operations, an optimization model for the shunting operation plan of the EMU depot is constructed. This model improves the utilization rate of key maintenance equipment by adjusting the operation process sequence of the EMU flexibly, the occupation situation of tracks and throats, and the specific time of shunting operations. It effectively prevents route conflicts of the EMU in the throat area, thus comprehensively enhancing the maintenance operation efficiency of the EMU depot. Ultimately, we strive to obtain an optimal operation sequence of the EMU and the corresponding arrangements for tracks and routes, ensuring that while all first-level maintenance operations of the EMU are completed, the total occupation time of the key line area of the EMU is minimized and the number of storage times is also minimized.

2.2. Definition of Parameters and Variables

Refer to Table 1 and Table 2 for the sets, indices, parameters and decision variables involved in the model.
Table 1. Definition of mathematical symbols for static parameters.
Table 2. Definition of mathematical symbols for decision variables.

2.3. Model Construction

2.3.1. The First-Priority Model

Due to the relatively scarce number of core equipment such as maintenance facilities and train washing facilities, these constraints have emerged as the primary limiting factors governing EMU depot maintenance throughput capacity. Therefore, after the EMU completes the operations in the key line area, it should be quickly transferred to the storage yard to wait. Our primary goal is to minimize the total occupation time of the EMU in the key line area. However, when the total occupation time of the key line area reaches the optimum, it may not necessarily be the result of the optimal shunting operation plan, that is, there may be multiple optimal solutions. Therefore, on the basis of the first-priority model, we attempt to find the solution with the least number of storage times in this paper. Consequently, minimizing the number of storage times is established as the secondary objective function, thereby formulating the lexicographic multi-objective optimization framework presented in this study.
Specifically, the objective function of the first-priority model is shown in the following formula:
min f z i , t i m , e i n , y i h n , r i j = ∑ i ∈ I ( t i 5 − t i 4 ) + ( t i 3 − t i 2 )
The optimization model has five types of constraint conditions, which are track occupancy constraints, operation time standard constraints, route conflict constraints, maintenance team conflict constraints, and basic constraints. Next, we will give detailed mathematical expressions for each constraint condition one by one for in-depth analysis and elaboration.
(1)
Track Occupation Constraints
∑ h ∈ H M y i h 2 = z i ∀ i ∈ I
∑ h ∈ H W y i h 2 = 1 − z i ∀ i ∈ I
∑ h ∈ H W y i h 4 = z i ∀ i ∈ I
∑ h ∈ H M y i h 4 = 1 − z i ∀ i ∈ I
∑ h ∈ H S ∪ 0 y i h 2 + y i h 4 = 0 ∀ i ∈ I
∑ h ∈ H S ∪ 0 y i h n = 1 ∀ i ∈ I , n ∈ 1 , 3 , 5
∑ h ∈ H M ∪ H W y i h n = 0 ∀ i ∈ I , n ∈ 1 , 3 , 5
t i ′ n ′ + 1 ≤ t i n + R ( 2 − y i h n − y i ′ h n ′ ) o r t i n + 1 ≤ t i ′ n ′ + R ( 2 − y i h n − y i ′ h n ′ ) ∀ i , i ′ ∈ I , i ≠ i ′ , h ∈ H M ∪ H W , n , n ′ ∈ { 2 , 4 }
t i ′ n ′ + 1 ≤ t i n + R ( 2 − y i h n − y i ′ h n ′ ) o r t i n + 1 ≤ t i ′ n ′ + R ( 2 − y i h n − y i ′ h n ′ ) ∀ i , i ′ ∈ I , i ≠ i ′ , h ∈ H S , n , n ′ ∈ { 1 , 3 , 5 }
m a x { 0 , 1 − R y i 0 n } ≤ t i n + 1 − t i n ≤ R ( 1 − y i 0 n ) , ∀ i ∈ I , n ∈ { 1 , 3 , 5 }
Constraints (2)–(6) represent the track occupancy situations of maintenance and washing operations. Constraints (7) and (8) represent the occupancy situations of storage tracks. Constraints (9) and (10) represent the time sequence relationship of two different train units occupying the same track. Constraint (11) specifies that if the train set is not parked at the depot, its dwelling interval is 0; otherwise, the dwelling interval exceeds the minimum required minutes (1 min).
(2)
Operation Time Standard Constraints
t i 3 − t i 2 ≥ o i M z i + o i W ( 1 − z i ) , ∀ i ∈ I
t i 5 − t i 4 ≥ o i W z i + o i M ( 1 − z i ) , ∀ i ∈ I
Constraints (12) and (13) indicate that the actual durations of maintenance operations and cleaning operations should be no less than the minimum operation time standards.
(3)
Route conflict constraints
t i m ≥ t i ′ m ′ + g a p o r t i m ≤ t i ′ m ′ − g a p , ∀ i , i ′ ∈ I , i ≠ i ′ , m , m ′ ∈ { 1 , 2 , 3 , 4 , 5 , 6 }
The staggered time between two routes must exceed the gap (route execution time). Constraint (14) stipulates that EMU i ′ either executes the route before or after EMU i.
(4)
Constraints of Maintenance Team Conflicts
r ij + r i ′ j ≤ 1 , W h e n e i n ≤ e i ′ n ′ ≤ e i n + o i M o r e i n ≤ e i ′ n ′ + o i ′ M ≤ e i n + o i M o r e i ′ n ′ ≤ e i n ≤ e i ′ n ′ + o i ′ M o r e i ′ n ′ ≤ e i n + o i M ≤ e i ′ n ′ + o i ′ M i , i ′ ∈ I , n , n ′ ∈ 2 , 4 , j ∈ J
Constraint (15) indicates that only one maintenance team is assigned to one train unit. On the same track, the maintenance time of two EMUs cannot overlap, so there is the following constraint:
e i n + o i M ≤ e i ′ n o r e i ′ n + o i ′ M ≤ e i n , ∀ i , i ′ ∈ I , n , n ′ ∈ 2 , 4
On the track, the time of entering the track should be no greater than the start time of maintenance, and the end time of maintenance should be no greater than the time of leaving the maintenance track. Therefore, the following constraint is obtained:
z i t i 2 + ( 1 − z i ) t i 4 ≤ z i e i 2 + ( 1 − z i ) e i 4 , i ∈ I z i ( e i 2 + o i M ) + ( 1 − z i ) ( e i 4 + o i M ) ≤ z i t i 3 + 1 − z i t i 5 , i ∈ I
Meanwhile, we know that for the same train unit, at most one maintenance team is assigned, that is
∑ j ∈ J r i j = 1 , i ∈ I
(5)
Basic Constraints
In addition, some basic constraints are also needed. For example, the number of tracks used should not be greater than the total number of tracks. A maintenance team can maintain at most one EMU (Electric Multiple Unit) at the same time, that is, one maintenance team cannot maintain two EMUs simultaneously; the number of train units undergoing maintenance at the same time should not be greater than the number of maintenance teams. We will put these several constraints in the algorithm as penalty terms and make them zero through iteration.
At this point, the first-priority objective function and constraints have been fully constructed. Based on the model structure and variable characteristics, this model belongs to a MILP problem, incorporating both 0–1 binary decision variables and ordinary integer decision variables. The total number of decision variables is determined by the number of train sets, the types and quantities of tracks (including maintenance, washing, and storage tracks), and the number of maintenance teams. Taking a specific scenario as an example: with 19 train sets, 6 maintenance tracks, 2 washing tracks, and 15 storage tracks, the total number of decision variables is calculated as follows: 19 + 19 × 4 + 19 × 2 + 19 × 5 × (6 + 2 + 15) + 19 × 6 = 2432 variables, with a total of 1786 constraints. This model represents a typical large-scale MILP problem. If solved using a traditionally implemented branch-and-bound method, the theoretical time complexity is as high as O 2432 . Even with algorithmic optimizations, the actual solving time could range from several days to several weeks, potentially failing to converge within a reasonable timeframe. While commercial optimization solvers such as CLP (Coin-or Linear Programming), equipped with core technologies like efficient preprocessing, can reduce the solving time for problems of this scale to tens of minutes or several hours, this still falls short of meeting the real-time requirements for on-site train scheduling applications.

2.3.2. The Second-Priority Model

When minimizing the occupancy time of the critical line area f * through the first-priority objective function, the model may yield multiple optimal solutions. To further enhance scheduling efficiency, we perform secondary optimization based on these optimal solutions, with the second-priority objective of minimizing the number of storage operations and reducing shunting costs. The final model logic is constructed as follows,
min g = ∑ i ∈ I s i g n ( t i 4 − t i 3 > 0 ) + s i g n ( t i 2 − t i 1 > 0 ) s . t . ∑ i ∈ I ( ( t i 5 − t i 4 ) + ( t i 3 − t i 2 ) ) ≤ f *
where s i g n . denotes the sign function. s i g n ( t i 2 − t i 1 > 0 ) = 1 t i 2 − t i 1 > 0 0 t i 2 − t i 1 = 0 indicates that if a train set is stored upon entering the depot instead of proceeding directly to maintenance or washing tracks, the sign function takes the value 1, recording one storage operation; otherwise, it takes the value 0. s i g n ( t i 4 − t i 3 > 0 ) = 1 t i 4 − t i 3 > 0 0 t i 4 − t i 3 = 0 indicates that if a train set undergoes storage before washing or maintenance operations, the sign function takes the value 1, recording one storage operation; otherwise, it takes the value 0, and no storage operation is recorded. The model’s constraints ensure that, under the condition that the first-priority objective (minimizing the occupancy time of the critical line area) is optimized, the second-priority objective (minimizing the number of storage operations) is achieved.

3. Algorithm

In the case where the scale of model parameters is small, we can directly use commercial solvers to obtain exact solutions. However, when the model scale becomes large, it is difficult for commercial solvers to provide high-quality feasible solutions within a limited time. Therefore, this paper adopts a three-step optimization strategy for solution z i , t i m , e i n , i ∈ I , m ∈ { 2 , 3 , 4 , 5 } , n ∈ { 2 , 4 } .Among them, in the first step, we use the classic genetic algorithm to solve the decision variables, which include the value of the first-priority objective function: the total occupation time of the critical line area, and the value of the second-priority objective function: the number of storage times. In the second step, after obtaining the optimal solution in the first step, under the constraints in the optimization problem, we obtain y i h n , i ∈ I , h ∈ H , n ∈ { 1 , 2 , 3 , 4 , 5 } ,that is, allocate tracks to EMUs. In the third step, we solve r i j , i ∈ I , j ∈ H P , that is, allocate maintenance teams to EMUs, so as to further improve the maintenance capacity of shunting operations. For clarity of presentation, the method proposed in this paper is denoted as GA-MC (Genetic Algorithm with Maintenance Capacity Consideration).

3.1. The First Step Strategy-Genetic Algorithm

3.1.1. Chromosome Encoding

In this subsection, we conduct chromosome encoding. Let the chromosome be
θ = ( z i , t i m , z i e i n + ( 1 − z i ) e i n ) , i ∈ I , m ∈ { 2 , 3 , 4 , 5 } , n ∈ { 2 , 4 }
z i is the process code, whose length is equal to the number of EMUs and indicates whether to carry out maintenance first. t i m represents the start and end code of the staying time on the track, which includes the start and end times of each EMU staying on different tracks after entering the depot. The staying time on the track can be obtained by calculating the difference. In addition, considering the constraints of maintenance capacity, we know that the starting time of an EMU staying on the track may not be the starting time of maintenance. Therefore, in the encoding process, we have added the starting time of maintenance, that is, z i e i n + ( 1 − z i ) e i n represents the starting code of the maintenance time, which depends on z i .

3.1.2. Population Initialization

After the chromosome encoding mechanism is determined, in this section, under the condition of satisfying the constraints of Formulas (12)–(14), K individuals are generated to form an initialized population θ 1 , θ 2 , … , θ K . The generation rules are as follows: Since it is assumed that all tracks in the EMU depot are idle before the start of this shift, in order to minimize the total number of storage times as much as possible, the EMUs are sorted according to the entry time into the depot. For the first H M groups of EMUs in each individual, they directly enter the maintenance shed without storage. For the H M + 1 , … , H M + H W Trainsets in each individual, they directly enter the washing track without storage. That is z i = 1 , i = 1 , 2 , … , H M , z i = 0 , i = H M + 1 , … , H M + H W , t i 2 = t i 1 , t i 4 = t i 3 . In addition, as the objective function is to minimize the occupation duration of the critical line area, the start and end time of maintenance is set as the starting time when the EMU stays on the maintenance track, that is t i m = z i e i n + ( 1 − z i ) e i n , i ∈ I .

3.1.3. Feasibility Test

The key factors determining whether a shunting plan is feasible lie in the absence of conflicts in tracks, routes, and maintenance teams during the overlapping time. From the perspective of the optimization problem, any solution that fails to meet the constraint conditions is an infeasible solution. Therefore, the strategy for testing whether an individual is a feasible solution. Therefore, the strategy for testing whether an individual is a feasible solution in this section is as follows: Calculate the number of maintenance tracks used H M ′ , the number of train washing tracks used H W ′ , the number of washing tracks used H S ′ , the number of maintenance teams H P ′ , and the number of route executions during the overlapping time L ′ . When H M ′ > H M ′ H W ′ > H W ′ , H S ′ > H S ′ , H P ′ > H P ′ , L ′ > 1 , the individual is infeasible. It is worth noting that during the calculation process, we allow the existence of infeasible plans. For infeasible plans, individuals are updated through crossover and mutation operations so that they may search for feasible solutions or local optimal solutions.

3.1.4. Construction of Fitness Function

Since infeasible solutions are retained, when constructing the fitness function, we take into account not only the value of the objective function but also the factors of track, maintenance team and route conflicts as penalty terms. Thus, the fitness function is constructed as follows:
F = 1 f + λ M L M + λ W L W + λ S L S + λ P L P + λ L
Among them, L M = max 0 , | H M | ′ − | H M | , L W = max 0 , | H W | ′ − | H W | , L S = max 0 , | H S | ′ − | H S | , L P = max 0 , | H P | ′ − | H P | , L = max 0 , L ′ − 1 and λ M , λ W , λ S , λ P , λ are the penalty coefficients respectively.

3.1.5. Updating the Population

We adopt the classic tournament selection operator and roulette wheel selection operator [23], and set a certain number of elite individuals not to participate in the selection and crossover. The crossover operator employs single-point crossover and two-point crossover. For the mutation operator, for each EMU, when the generated random number is less than the mutation probability, the process code of this EMU will be changed, and the start and end time codes for staying on each track as well as the starting time code for track maintenance will be regenerated. The above steps are iterated in a loop until the maximum number of iterations is met, and then the optimal feasible solution θ * is output.

3.2. The Second-Step Strategy

3.2.1. Track Allocation

Based on the optimal feasible solution θ * , this section solves y i h n , i ∈ I , h ∈ H , n ∈ { 1 , 2 , 3 , 4 , 5 } , which is to allocate tracks for trainsets. The specific allocation strategy is: for each trainset, search for the idle tracks for the corresponding operations according to the start-end times of occupying the maintenance track, the start-end times of the washing track, the start-end times of the storage track, and arrange the idle tracks in sequence. The specific process is shown in Algorithm 1.
Algorithm 1 The process of track allocation
Input:  z i , t i m , i ∈ I , m ∈ { 2 , 3 , 4 , 5 }
Output:  y i h n * , i ∈ I , h ∈ H , n ∈ { 1 , 2 , 3 , 4 , 5 }
Initialization.
Set y i h n = 0 for all i ∈ I , h ∈ H , n ∈ { 1 , 2 , 3 , 4 , 5 } .
Initialize Q M = O H M   ×   T e − T s , Q W = O H W   ×   T e − T s , Q S = O H S   ×   T e − T s , where O is the zero matrix.
Track allocation procedure.
For i = 1 to | I | , perform the following operations:
● If the Electric Multiple Unit (EMU) i is parked for the first time, retrieve the rows s of matrix Q S whose values are 0 within the interval [ t i 1 , t i 2 ] , and assign them to EMU i by setting y i s 1 = 1 .
● If the Electric Multiple Unit (EMU) i is parked for the third time, retrieve the rows s of matrix Q S whose values are 0 within the interval [ t i 3 , t i 4 ] , and assign them to EMU i by setting y i s 3 = 1 .
● If the Electric Multiple Unit (EMU) i is parked for the fifth time, retrieve the rows s of matrix Q S whose values are 0 within the interval [ t i 5 , t i 6 ] , and assign them to EMU i by setting y i s 5 = 1 .
● If z i = 1 , retrieve the rows m of matrix Q M whose values are 0 within the interval [ t i 2 , t i 3 ] , and assign them to EMU i by setting y i m 2 = 1 . Then retrieve the rows w of matrix Q W whose values are 0 within the interval [ t i 4 , t i 5 ] , and assign them to EMU i by setting y i w 4 = 1 .
● Otherwise, retrieve the rows m of matrix Q M whose values are 0 within the interval [ t i 4 , t i 5 ] , and assign them to EMU i by setting y i m 4 = 1 . Then retrieve the rows w of matrix Q W whose values are 0 within the interval [ t i 2 , t i 3 ] , and assign them to EMU i by setting y i w 2 = 1 .
Output.
Return the final track allocation result y i h n * .

3.2.2. Allocation of Maintenance Teams

In the previous two steps, θ * and y i h n * , i ∈ I , h ∈ H , n ∈ { 1 , 2 , 3 , 4 , 5 } were obtained. In this section, the remaining variable r i j , i ∈ I , j ∈ J is to be solved, which means allocating maintenance teams for each trainset. The specific strategy is to retrieve the idle maintenance teams according to the start and end times of maintenance and arrange the maintenance teams in sequence. The specific process is shown in Algorithm 2.
Algorithm 2 The process of allocating maintenance teams
Input:  z i , e i n , O i M , i ∈ I , n ∈ { 2 , 4 }
Output:  r i j * , i ∈ I , j ∈ H P
Initialization.
Set r i j = 0 for all i ∈ I , j ∈ H P .
Initialize the maintenance team occupation matrix: Q P = ( O ) | H P |   ×   T i m e , where O denotes the zero matrix.
Maintenance team allocation procedure.
For i = 1 to | I | , perform the following operations:
● If z i = 1 , retrieve the rows p of matrix Q P whose values are 0 within the interval [ e i 2 , e i 2 + O i M ] , and assign them to EMU i by setting r i p = 1 .
● Otherwise, retrieve the rows p of matrix Q P whose values are 0 within the interval [ e i 4 , e i 4 + O i M ] , and assign them to EMU i by setting r i p = 1 .
Output.
Return the final maintenance team allocation result r i j * .

4. Case Analysis

4.1. Parameter Settings

The layout of the EMU depot is illustrated in Figure 1. The depot consists of six maintenance lines (M1–M6), two washing lines (W1 and W2), and fifteen storage lines (S1–S15). The operation plan is based on data from 19 EMUs reported in [10]. Standardized operation times are assigned according to different levels of first-level maintenance tasks. Specifically, sewage suction requires 30 min, electrified and non-electrified operations require 120 min, and joint inspection tasks require either 150 min or 180 min. The route execution gap is set to 5 min and, as only a single route is considered, this gap is included in the standard operation time. The experimental data are summarized in Table 3. The shift starts at 18:00 and ends at 11:45 the next day; for computational convenience, these times are converted to minutes, with the start and end times defined as 0 and 1065 min, respectively. To evaluate the impact of maintenance capacity on shunting operations, the number of maintenance teams is varied within {3, 4, 5, 6}. The optimization problem is solved under different parameter settings, and the results are analyzed to reveal the relationship between maintenance team capacity and shunting operations.
Table 3. Operation Plan of the EMU Depot.
In the first-step strategy of the algorithm, the penalty coefficients λ M , λ W , λ S , λ P , λ are set to 3000, 3000, 2000, and 1000, respectively. This study systematically employs the controlled variable method to evaluate the impact of different population sizes (50, 100, 150, 200) and mutation rates (0.01, 0.03, 0.05, 0.07) on the algorithm’s solution accuracy and convergence speed. Experimental results indicate that when the population size K = 100, the number of elite individuals per generation is 1, the mutation rate is 0.05, and the maximum number of iterations iter = 500, the algorithm achieves an optimal balance between solution accuracy and convergence speed. Additionally, the code was executed on a computer equipped with a 12th Gen Intel(R) Core(TM) i5-12450H processor, an NVIDIA GeForce RTX 3050 Laptop GPU, and 16GB of RAM.

4.2. Experimental Results and Analysis Considering Maintenance Capacity

By using the improved genetic algorithm, the optimal solution of the first-priority model after 500 iterations is obtained as 3040 min, along with the optimal solution of the second-priority, we obtain the minimum number of storage times. The iteration process is shown in Figure 3.
Figure 3. Schematic diagram of the algorithm convergence process under different maintenance team numbers. (a) Iterative diagram of the fitness function for the maintenance crew of 3; (b) Iterative diagram of the fitness function for the maintenance crew of 4; (c) Iterative diagram of the fitness function for the maintenance crew of 5; (d) Iterative diagram of the fitness function for the maintenance crew of 6.
It can be found from Figure 3 that at the initial stage of the iterative solution, the value of the objective function decreases rapidly. As the number of iterations increases, the decrease of the objective function value slows down. When the iteration reaches a certain level, the value of the objective function remains unchanged, that is, the optimal solution is obtained.
Table 4 presents the solution results for team quantities of 3, 4, 5, and 6 respectively. As shown in the table, regardless of the number of maintenance teams, the first-priority objective function consistently achieves the theoretical optimum, i.e., a total critical line zone occupancy time of 3040 min. Further optimization of the second priority yields the minimum number of storage operations, as detailed in the third column of Table 4. Moreover, under all four parameter configurations, the algorithm runtime remains under 50 s.
Table 4. Optimization problem solving results.
The trainsets allocation situations under different numbers of maintenance teams are shown in Table 5, Table 6, Table 7 and Table 8. With reference to the findings presented in Table 4, the following conclusions can be drawn:
Table 5. Shift distribution when the number of maintenance shifts is 3.
Table 6. Shift distribution when the number of maintenance shifts is 4.
Table 7. Shift distribution when the number of maintenance shifts is 5.
Table 8. Shift distribution when the number of maintenance shifts is 6.
(1)
When the number of maintenance teams is limited to three, maintenance capacity becomes insufficient. In most cases, maintenance tracks remain idle while teams are fully occupied. As a result, trainsets must be parked to wait after entering the depot, significantly increasing both the number of parking events and shunting costs. The total number of parking events rises to 43. Furthermore, trainsets D18 and D19 experience delays of up to 65 min. Although suboptimal scheduling causes some maintenance tasks to be completed later than the corresponding departure times, it allows for the reuse of storage tracks, ensuring that all trainsets can still be accommodated.
(2)
When the number of maintenance teams increases to four, the performance of maintenance and shunting operations improves significantly. Most EMUs complete first-level maintenance relatively early, and the total number of parking events decreases to 29. However, early maintenance completion requires trainsets to be assigned to storage tracks well before departure, resulting in low storage track reuse. Consequently, trainsets D4 and D8 cannot be allocated.
(3)
When the number of maintenance teams is 5, we found that the number of times the trainsets are parked before waiting for maintenance decreased from 9 times (when the number of teams was four) to 7 times. However, the number of times the trainsets are parked before being washed increased from 1 to 5 times. The reason is that when trainsets enter the depot in a relatively concentrated manner and there are a sufficient number of maintenance teams, the trainsets can undergo maintenance more quickly. However, since there are only two washing lines, the trainsets that have completed maintenance need to be parked and wait. As a result, the final number of parking times has actually increased to 31 times. The same problem is that there are three trainsets that cannot be allocated to the storage tracks.
(4)
When the number of maintenance teams is 6, the maintenance capacity is not limited. The waiting time before maintenance is reduced from 7 times to 3 times, and the waiting time before washing remains 5 times. The total number of storage times is 27, and the shunting cost reaches the minimum. Finally, 5 EMUs remained unallocated to the storage tracks.
Although the first-level and second-level objective functions reach the optimum and the shunting cost is the lowest when there is a sufficient number of teams, its labor cost is the highest. Considering both aspects comprehensively, we found that when the number of maintenance teams is four, the cost is the lowest and the maintenance and shunting operation plans are the optimum.
In addition, the complete track occupancy information is presented in Table A1, Table A2, Table A3 and Table A4. The occupancy of each EMU at each time is denoted as “EMU number, [start time, end time]”, where arrows indicate the temporal sequence of occupancies. It can be concluded that the more efficiently the first-level maintenance and cleaning tasks are completed, the tighter the allocation of storage tracks becomes, and in some cases, it may even be infeasible to allocate all trainsets. Specifically, under a single-line scenario, when all trainsets complete their tasks before the earliest departure time of the shift, 19 trainsets cannot be accommodated by only 15 storage tracks. Feasibility is ensured only when some trainsets depart the depot before others complete their tasks, thereby allowing storage tracks to be reused. The calculation results in Table A1, Table A2, Table A3 and Table A4 are plotted onto a Gantt chart for the occupancy of maintenance equipment in the EMU depot, as shown in Figure 4.
Figure 4. Gantt chart of shunting schedule under different number of maintenance teams. (a) Gantt Chart for Shunting Schedule of 3 Maintenance Teams; (b) Gantt Chart for Shunting Schedule of 4 Maintenance Teams; (c) Gantt Chart for Shunting Schedule of 5 Maintenance Teams; (d) Gantt Chart for Shunting Schedule of 6 Maintenance Teams.

4.3. Experimental Results and Analysis with Baseline Methods

To further validate the superiority of the proposed model and algorithm, this paper compares them with two traditional priority scheduling methods: the Earliest Due Date (EDD) algorithm, which prioritizes trains based on their scheduled departure times from the depot, arranging them from earliest to latest to allocate resources such as maintenance lines and cleaning lines first to trains with earlier departure times; and the Shortest Residence Time First (SRT) algorithm, which prioritizes trains with the shortest planned residence time in the depot to avoid delays for short-stay trains caused by waiting. In addition, to comprehensively evaluate the algorithm’s performance, the following evaluation metrics are introduced alongside critical line zone occupancy time and the number of storage operations:
(1)
Maximum Completion Time: The completion time of the last train set.
(2)
Scheduling Time: The algorithm’s solving duration (in minutes).
(3)
Gap Rate (GR): G R = T actual − T optimal T optimal × 100 % , where T actual is the actual total occupancy time of the critical line zone, and T optimal is the theoretical optimal total occupancy time of the critical line zone.
Table 9 presents the experimental comparison results of various metrics under the condition of a fixed and sufficient number of maintenance teams. A comparison of the experimental results between the two traditional scheduling methods, EDD (Earliest Due Date) and SRT (Shortest Residence Time), and the optimization method proposed in this paper (GA-MC) reveals that the proposed method achieves comprehensive optimization across four core evaluation metrics: critical line zone occupancy time, number of storage operations, maximum completion time, and gap rate. This fully validates the effectiveness and practicality of the proposed model and algorithm, demonstrating its better alignment with the actual needs of intelligent maintenance and scheduling optimization in EMU depots. The specific track occupancy tables are provided in Table 10 and Table 11.
Table 9. Experimental comparison results of various metrics under the condition of sufficient maintenance teams.
Table 10. Track Occupancy Table for the EDD Method.
Table 11. Track Occupancy Table for the SRT Method.
Critical Line Zone Occupancy Time: EDD (3055 min) > SRT (3050 min) > GA-MC (3040 min). The proposed method reduces the occupancy time by 15 min (0.49%) compared to EDD and by 10 min (0.33%) compared to SRT. The critical line zone is a core resource in depot scheduling, and minimizing its occupancy time directly enhances resource utilization. This result validates the optimization effect of the first-priority objective (minimizing critical line zone occupancy time) in the proposed model. Through multi-objective collaborative optimization logic, the occupancy duration of core resources is further compressed while ensuring operational continuity.
Number of Storage Operations (Cost Control Metric): EDD (41 times) > SRT (30 times) > GA-MC (27 times). The number of storage operations is directly positively correlated with shunting costs (storage requires additional shunting operations and occupies storage track resources). The proposed method reduces storage operations by 34.1% (14 times) compared to EDD and by 10% (3 times) compared to SRT, fully achieving the second-priority objective (minimizing storage operations and reducing shunting costs). This advantage stems from the precise definition and statistical tracking of storage scenarios using the sign function in the model. Through secondary optimization, the optimal scheduling plan is selected, avoiding unnecessary storage operations and significantly reducing actual operational costs.
Maximum Completion Time (Overall Scheduling Efficiency Metric): EDD (5:00 = 300 min) > SRT (5:40 = 340 min) > GA-MC (4:40 = 280 min). The proposed method reduces the maximum completion time by 20 min compared to EDD and by 60 min (17.6%) compared to SRT. The maximum completion time reflects the total duration of the entire scheduling plan, directly impacting the operational turnover efficiency of the depot. By optimizing task sequences and resource allocation, the proposed method avoids issues such as track idleness and operational waiting, achieving efficient closed-loop scheduling. This contributes to enhancing the depot’s daily maintenance capacity and train turnover efficiency.
Gap Rate: EDD (0.49%) > SRT (0.33%) > GA-MC (0%). The gap rate refers to the proportion of idle gaps in core resources (tracks, operational time) within the scheduling plan. A lower gap rate indicates higher resource utilization. The proposed method achieves a 0% gap rate, indicating compact task and non-redundant resource allocation in the scheduling plan. This maximizes the utilization efficiency of critical line zones and tracks, avoids resource waste, and further validates the reasonableness of the model constraints and the optimization precision of the algorithm.

5. Conclusions

This study focuses on a longitudinal two-stage and two-yard EMU depot as an example, addressing the optimization of first-level maintenance shunting operation plans under maintenance capacity constraints. A lexicographic multi-objective programming model is constructed, with minimizing critical line zone occupancy time as the primary objective and minimizing the number of storage operations as the secondary objective. A three-step phased solution algorithm is proposed to enable flexible planning of shunting operations, effectively improving track utilization and maintenance efficiency. To validate the method’s effectiveness, the actual operational plan of an EMU depot on a given day is used as a test case, with the number of maintenance teams set as a dynamic parameter for multiple solution runs. An in-depth analysis of team allocation and track occupancy patterns is conducted. Experimental results show that, in a scenario involving maintenance tasks for 19 train sets, optimal maintenance efficiency and cost are achieved when the number of maintenance teams is 4, representing a 33.33% reduction from the initial 6 teams. The proposed multi-objective optimization strategy further refines the shunting plan, reducing the number of storage operations to 27, a 3.6% improvement compared to literature [12]. Additionally, when the number of teams is 6, the proposed method significantly outperforms two baseline algorithms across all core metrics, providing both solid theoretical support for EMU depot maintenance planning and a practical solution for real-world shunting optimization, demonstrating substantial practical value.
Future research will focus on the following directions: considering train set occupancy states to develop robust optimization models that enhance resource utilization, investigating parallel routing planning and resource coordination for EMU maintenance, exploring dynamic maintenance scheduling strategies based on stochastic train arrivals to improve the model’s engineering applicability, and developing intelligent scheduling methods based on deep learning or reinforcement learning to further enhance scheduling efficiency, flexibility, and intelligence.

Author Contributions

Conceptualization, H.Z.; methodology, H.Z., Q.L. and B.L.; validation, Y.L. and X.Z.; writing—original draft preparation, Y.L. and X.Z.; supervision, Q.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the Scientific and Technical Research Fund of China Academy of Railway Sciences Corporation Limited under Grant 2023YJ083, in part by the State Key Laboratory of Advanced Rail Autonomous Operation (Project No.RAO 2026K13), Beijing Jiaotong University.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author.

Acknowledgments

The authors thank the reviewers and editors for their contributions to this article.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Table A1. Occupation of the stock track when the number of maintenance teams is 3.
Table A2. Occupation of the stock track when the number of maintenance teams is 4.
Table A3. Occupation of the stock track when the number of maintenance teams is 5.
Table A4. Occupation of the stock track when the number of maintenance teams is 6.

References

  1. Jacobsen, P.M.; Pisinger, D. Train shunting at aworkshop area. Flex. Serv. Manuf. J. 2011, 23, 156–180. [Google Scholar] [CrossRef] [Scilit]
  2. Tamannaei, M.; Saffarzadeh, M.; Jamili, A.; Seyedabrishami, S. A Novel Train Rescheduling Approach in Double-Track Railways: Optimization Model and Solution Method Based on Simulated Annealing Algorithm. Int. J. Civ. Eng. 2016, 14, 139–150. [Google Scholar] [CrossRef] [Scilit]
  3. Knops, P. Optimising Train Shunting Operations at Kijfhoek. Bachelor’s Thesis, Utrecht University, Utrecht, The Netherlands, 2020. [Google Scholar]
  4. Kamenga, F.; Pellegrini, P.; Rodriguez, J.; Merabet, B. Solution algorithms for the generalized train unit shunting problem. EURO J. Transp. Logist. 2021, 10, 100042. [Google Scholar] [CrossRef] [Scilit]
  5. Asta, V. Port Rail Shunting Optimization Problems. Ph.D. Thesis, University of Genova, Genova, Italy, 2021. [Google Scholar]
  6. van Bavel, N.C.L. The Application of a Hybrid Evolutionary Algorithm to the Train Unit Shunting Problem. Master’s Thesis, Eindhoven University of Technology, Eindhoven, The Netherlands, 2022. [Google Scholar]
  7. Wang, Z.K.; Shi, T.Y.; Zhang, W.J.; Wang, H. Model and algorithm for optimized formulation ofscheduled shunting operation plans of electric multipleunits depots. J. China Railw. Soc. 2013, 35, 1–9. (In Chinese) [Google Scholar]
  8. Guo, X.; Song, R.; Li, H.; Chen, S.; Liu, X. Optimization of shunting operation plan of electric multiple unitrunning shed. China Railw. Sci. 2016, 37, 117–123. (In Chinese) [Google Scholar]
  9. Han, B.; Zhao, P.; Li, D. Research onthe model and algorithm of the flexible operation sequencefor the first-level maintenance in the EMU depot. J. Beijing Jiaotong Univ. 2021, 45, 8–15. (In Chinese) [Google Scholar]
  10. Shi, J.; Li, H.; Cao, H.; Zheng, Y. Shunting operation planning at EMU depots considering train fexible storage and position occupation. China Railw. Sci. 2022, 43, 152–162. (In Chinese) [Google Scholar]
  11. Hu, Z.; Lei, Z.; Shu, Z. Optimization of shunting operation plan at electric multiple units depot considering train position proper occupancy. J. Southwest Jiaotong Univ. 2022, 57, 65–73. [Google Scholar]
  12. Shi, J.; Li, H.; He, S. Optimizing shunting schedule of electrical multiple units depot with typical layout. J. Beijing Jiaotong Univ. 2022, 46, 1–9. (In Chinese) [Google Scholar]
  13. Peng, F.; Fan, X.; Wang, P.; Sheng, M. A Time-Space Network-Based Optimization Method for Scheduling Depot Drivers. Sustainability 2022, 14, 14431. [Google Scholar] [CrossRef] [Scilit]
  14. Yu, T. Quality Analysis of Railroad Train Shunting Operation Plan Using the Intelligent Body Model. Adv. Multimed. 2022, 2022, 4441369. [Google Scholar] [CrossRef] [Scilit]
  15. He, M. Research on the First-Level Repair Operation PLAN and Optimization of the End Type EMU. Ph.D. Thesis, Wuhan University of Science and Technology, Wuhan, China, 2023. [Google Scholar] [CrossRef]
  16. Zhang, Y.; Hu, R.; Zeng, Q.; Wang, Y.; Liu, Y.; Huang, S. Optimal Train Platforming with Shunting Operations for Multidirectional Passenger Stations: A Case Study of Guangzhou Station. Mathematics 2023, 11, 3136. [Google Scholar] [CrossRef] [Scilit]
  17. Liu, Y.; Tang, Q.; He, M. Multi-objective optimization method for motor train shunting operation plan based on enhanced simulated annealing algorithm. Railw. Transp. Econ. 2024, 46, 10–19. [Google Scholar]
  18. Shi, J.; Li, H.; Wang, D.; Vansteenwegen, P. Reschedule the Shunting and Service Scheduling Plan After Disturbances at a Chinese High-Speed Railway Depot. IEEE Access 2024, 12, 3368807. [Google Scholar] [CrossRef] [Scilit]
  19. Shahrabi, J.; Adibi, M.A.; Mahootchi, M. A reinforcement learning approach to parameter estimation in dynamic job shop scheduling. Comput. Ind. Eng. 2017, 110, 75–82. [Google Scholar] [CrossRef] [Scilit]
  20. Zhao, M.; Li, X.; Gao, L.; Wang, L.; Xiao, M. An improved Q-learning based rescheduling method for flexible job-shops with machine failures. In Proceedings of the 2019 IEEE 15th International Conference on Automation Science and Engineering (CASE), Vancouver, BC, Canada, 22–26 August 2019; IEEE: New York, NY, USA, 2019; pp. 331–337. [Google Scholar]
  21. Zheng, J.; Chen, S. A Q-learning multi-objective grey wolf optimizer for the distributed hybrid flowshop scheduling problem. Eng. Optim. 2025, 57, 2609–2628. [Google Scholar] [CrossRef] [Scilit]
  22. Yin, J.; Liu, L.; Zhang, S.; Deng, G. A Q-Learning-Based Multi-Phase Grey Wolf Optimization Algorithm for Distributed No-Wait Job Shop Problem. Concurr. Comput. Pract. Exp. 2025, 37, e70272. [Google Scholar] [CrossRef] [Scilit]
  23. Jin, X. Genetic Algorithm and Its Applications. Ph.D. Thesis, Southwest Jiaotong University, Chengdu, China, 1996. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.