{'fraction_non_alphanumeric': 0.02694271128757799, 'fraction_numerical': 0.008714484607848193, 'mean_word_length': 4.569643882825962, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimized Train Path Selection Method for Daily Freight Train Scheduling

Train timetables are usually established far in advance of operations and are based on forecasted demands. However, due to changes in actual freight traffic, railways need to determine the actual operation of trains arising in daily operations through train path selection, i.e., selecting a portion of the timetable for these trains to execute. To improve current freight train scheduling in daily operations, this paper suggests taking into account the car flow transfer between consecutive trains and shipment delivery time requirements. A train path selection optimization model is developed to minimize the total travel time of freight trains while seeking minimum penalties for shipment delivery delays. A tabu search algorithm is designed to solve this problem. The effectiveness of the proposed model and algorithm is demonstrated by numerical experiments on instances built on real data from the Menghua railway, a rail freight corridor. The results show that, compared to current practice, this optimization method can achieve a reduction in total train travel time and ensure the punctual delivery of shipments.


I. INTRODUCTION
During the last two decades, the high-speed railway has been ushering in rapid development with massive construction of passenger-dedicated lines. Therefore, considerable track capacities have been released in existing lines, providing favorable conditions for developing freight transportation. This motivates this paper to seek optimization methods for freight train scheduling, which is a crucial operating decision. An improved train schedule can not only decrease operation costs but also enhance customer service.
However, as different national freight rail transportation systems have their own characteristics regarding management structure and operation conditions, the planning and executing process of freight train timetables varies from one country to another. In this paper, we primarily address the train scheduling problem of Chinese freight railway.
The associate editor coordinating the review of this manuscript and approving it for publication was Jesus Felez .
The train timetable, which is designed with predicted demands and is usually updated once or twice every year, is referred to as the basic timetable. The basic timetable is a feasible timetable, which means track capacity restrictions are satisfied and there are no conflicts between scheduled train services. However, due to changes in actual demand, the actual operation of freight trains may not be identical to that scheduled in the basic timetable. Trains could be delayed or canceled if there is a lack of sufficient car flow.
To compensate for changes, Chinese railways develop a timetable to be implemented daily according to real traffic. This timetable is referred to as the actual timetable. Accordingly, the day on which the actual timetable is to be carried out is referred to as the implementing day. Train timetabling is known to be complicated and systematic work because it is very time-consuming and involves coordination between multiple railway departments. It is thus impossible to develop an actual timetable from the very beginning every day. In practice, the actual timetable is usually generated from the basic timetable through train path selection; that is, freight trains are assigned to the train paths in the basic timetable to formulate the actual timetable.
It is observed that the train path selection method currently used by the Chinese railways does not exploit optimality to the fullest extent. Typically, operators select the train paths with the nearest departure times for trains after the trains are generated, whereas fewer considerations are given to the car flows that are contained in trains, where each car flow represents a transportation request and consists of a certain number of cars. As a result, two key problems can be anticipated. First, if the interval time between two consecutive trains (referred to as the connecting time) is too short for car flows to transfer, the departure train will be delayed to incorporate these car flows, as shown in Figure 1 (a). Second, if car flows arrive at their destinations too late, the delivery of the shipments to the customers will also be delayed, as shown in Figure 1 (b). A reasonable train schedule based on train path selection is shown in Figure 1 (c).
Hence, we address a train scheduling problem in which train paths in the basic timetable are selected to formulate an actual timetable for freight trains to actually execute on the implementing day. In addition, we take into account the car flow transfer between consecutive trains as well as the shipment delivery time requirement. An important prerequisite that supports this paper in optimizing train path selection is that the trains determined to operate on the implementing day are known. These trains are given by the origin and destination station of each train, the car flows that each train contains, and the departure time window for each train at the origin. These can be derived from the car flows that are set to be released during the implementing day by calculating the distribution of the car flows among the networks. Therefore, this prerequisite is reasonable and achievable (it is also a future research direction of this paper). The main contributions of this paper are as follows: 1) This study takes a step forward in freight train scheduling based on train path selection. The proposed method considers car flow transfer between consecutive trains and the shipment delivery time requirement.
2) A 0-1 integer programming model is proposed to minimize the total travel time of trains and the total delay penalty of car flows that considers both carriers and shippers. 3) A tabu search algorithm is developed that extends the applicability of the proposed optimization method for large-scale problems. 4) Experiments on real-world instances of the Menghua railway indicate the effectiveness of the proposed algorithm to generate the actual timetable. The benefits of the optimization method are demonstrated through comparison to the traditional approach. The rest of this paper is organized as follows: Section II presents a review of the relevant literature. Section III formally describes the problem. In Section IV, the mathematical optimization model for this problem is proposed, followed by the design of the tabu search algorithm in Section V. Section VI presents the results of computational experiments on a real-world freight corridor. Finally, conclusions and future work are given in Section VII.

II. RELATED WORKS
An enormous number of studies have been performed on train scheduling and timetabling problems. At least three main research lines can be identified in this context: the train scheduling and rescheduling problem, the periodic and nonperiodic timetabling problem, and the passenger train and freight train timetabling problem. Train scheduling is an offline problem that determines the arrival and departure times for trains at each station before the schedule is executed, e.g., [1]- [4]. With a planned schedule, rescheduling is a real-time problem that aims to determine detailed train movements and timetables to minimize train deviations, e.g., [5], [6]. Periodic timetabling requires that most or all train paths repeat in time with a certain period (e.g., one hour), e.g., [7], [8]. However, as trains usually share tracks with over-taken trains from other tracks and it becomes difficult to obtain effective periodic schedules when dealing with such interruptions or conflicts, a non-periodic timetable becomes more appropriate, e.g., [9], [10]. Because railways provide both passenger and freight services, there are naturally passenger train and freight train timetabling problems, e.g., [11]- [13]. These research lines are viewed from different perspectives but are not truly independent from each other. For example, passenger train scheduling is usually a periodic timetabling problem.
This study falls into the category of nonperiodic freight train scheduling problems, in which a schedule is planned for freight trains and can be different in different periods of the day. Since trains are confined to tracks, many works also take track configuration into account. Barrena et al. [12], Higgins et al. [14], Zhou and Zhong [15], and Ke et al. [16] studied single-track timetabling. Kang et al. [2], Carey [17], and Barrena et al. [18] considered double-track lines. Triple tracks and more complex configurations were examined in Lee and Chen [19] and Mu and Dessouky [20]. In this paper, the train path selection method can be applied to both single and multiple tracks. The application scenario is determined only by the type of the basic timetable, since the planning of the basic timetable considers the track configuration.
Many papers do not distinguish passenger and freight trains and consider freight train timetabling implicitly in their problem formulation. Brännlundet al. [21] presented an integer programming model to schedule a set of trains containing passenger and freight trains to obtain a profit-maximizing timetable while not violating track capacity constraints. Caprara et al. [22] proposed an integer linear programming model based on a directed multigraph in which nodes correspond to departures and arrivals at certain station at a given time instant. A Lagrangian relaxation solution approach that is embedded within a heuristic algorithm to allow a considerable speed-up is adopted. To obtain feasible schedules with guaranteed optimality, Zhou and Zhong [15] developed a generalized resource-constrained project scheduling formulation that considers segment and station headway capacities as limited resources, and they solved it with a branch-andbound solution procedure. Lee and Chen [19] presented a heuristic that optimizes train pathing and timetabling collaboratively. The heuristic generates an initial solution with a simple rule and then uses a four-step process to derive the solution iteratively.
There are only a few efforts in the literature that aim exclusively to solve the freight train timetabling problem. Mu and Dessouky [20] introduced two mathematical formulations to cope with the rapidly increasing freight demand for railway transportation. Both formulations are mixed-integer programming models, and the difference between them is whether the route of each train is given. They presented several heuristics that can significantly reduce the solution time of the exact method carried out by CPLEX yet produce a satisfactory solution quality. In addition, because of the priority of passenger trains, it is usually the case that when it is time to schedule freight trains, a number of passenger trains have already been scheduled. Freight train paths need to be slotted or inserted among the prescribed passenger train paths while keeping them unchanged. Cacchiani et al. [23] presented an integer linear programming formulation with the aim of introducing as many new freight trains as possible to a prescribed timetable to achieve the best profit. Ke et al. [16] proposed a two-stage solution for this problem. In the first stage, an initial timetable is built, and all conflicts are then detected and reordered to generate a feasible timetable. In the second stage, the feasible timetable is optimized to minimize the average train traveling time and single-train traveling time by adjusting the departure and stop time of freight trains.
Kuo et al. [24] presented a freight train scheduling methodology consisting of a train path selection model, which is, to the authors' knowledge, most similar to the approach studied in this paper. To apply the train path selection model, accompanying solution tools of track capacity allocation and modification are introduced to produce an initial feasible timetable with no conflicts between trains and near-maximum capacity. The train path selection model selects a portion of the initial timetable and seeks to minimize operating costs and delays in delivery compared to the scheduled arrival time. The model is a binary integer program, and a column generationbased approach is proposed to solve it.
In summary, most existing studies on freight train scheduling focus on constraints related to the trains themselves, such as headway time, acceleration and deceleration time, and departure time window, while neglecting the car flows contained in freight trains. Kuo et al. [24] considered shipments with respect to the delivery time, whereas the car flow transfer between consecutive trains was overlooked. As already mentioned, delays of trains and shipment delivery would be incurred with these omissions.

III. PROBLEM DESCRIPTION
A physical railway network provides freight service. The planning horizon is one day, i.e., the implementing day, which is denoted as day o and is discretized in time units (e.g., in minutes). However, the complete time horizon may be more than one day, because we need to consider the possible trains that depart one day (or several days) before o and arrive on day o as well as the trains that depart on day o and arrive one day (or several days) later. Even so, we only focus on the operations arising during day o.
A set of freight trains T = {1, 2, . . . ,j} that will first depart on day o is given. For each train j, the origin station o j , the destination station d j , the departure time window W j early , W j late at the origin station, and the contained car are also given. It is assumed that the trains are all single-block trains, meaning that the contained cars will only be reclassified at the destinations of the trains.
The routes in the physical network for these trains, defined as a series of stations and the sections connecting these stations, have been prearranged. The specific routes in stations are not considered in this study. The stations S = {1, 2, . . . ,s} VOLUME 8, 2020  Figure 2, where a car flow is represented by its origin and destination station.
The set of car flows is . . , j i k carrying flow i on day o and the stipulated arrival time window of car flow i are known. m j i k is defined as the destination station of the last train j i k . Therefore, the arrival time window is specified as the latest time Q i of car flow i arriving at m j i k . Since we only focus on operations arising on the current implementing day, the destination station of train j i k (m j i k ) may not be the destination of the car flow i(m (i)). Car flow i can later be transferred to trains that will depart on the next implementing day. Thus, referring to [25] and [26], the arrival time window Q i of car flow i can be calculated as follows: where Q i des is the delivery time promised to the customer. T unload is the average unloading time of station m (i). T travel = l v travel is the average travel time of freight trains between stations m j i k and m (i). T transit = t transit * l L transit is the average transit time of freight cars between m j i k and m (i). l is the distance between m j i k and m (i). v travel is the average travel time of freight trains. L transit is the average transit distance of freight cars. t transit is the average transit time of freight cars at stations.
If car flow i arrives at the destination (m j i k ) later than Q i , a penalty for this delay will be incurred. According to the category of the goods shipped, a penalty coefficient ξ i is set for every minute of delay of car flow i.
In addition, we are given the set of car flows F that take the trains departing one day (or several days) before day o and arriving on day o (such trains are denoted as j i 0 / ∈ T ) and will also take the trains departing on day o. Obviously, F is a subset of F. Train j i 0 was scheduled in the previous planning horizon, and its train path is fixed and known.
For each station s in the network, the minimum transit time required for transferring car flows from arrival trains to departure trains is T s min . Additionally, T s max is the maximum transit time to prevent car flows from remaining too  long at station s. The transit time of car flows at station s, which is also the connecting time between the arriving and departing trains, should be no less than T s min and no greater than T s max . A basic timetable corresponding to the physical network, which has no conflicts between train paths, is given in Figure 3. The basic timetable should have an adequate number of train paths to ensure that each train has candidate train paths to select from within its departure time window. For each train path in the basic timetable, the associated departure time, arrival time, departure station, arrival station, and travel time can be obtained. The associated travel times of the train paths with the same associated departure and arrival station may not be identical because of differing train classes and stops at intermediate stations. It is assumed that the basic timetable has good connection relationships between train paths, meaning that it is always feasible to schedule all the trains.
The aim of the problem is to generate an actual timetable (as in Figure 4 for the illustration instance) for these trains by selecting a portion of the basic timetable such that the total train travel time and shipment delays are minimal.  is extended from the basic timetable. The nodes and arcs in G have both spatial and temporal components. The node set V has the form U 1 ∪ . . . U s ∪ W 1 ∪ . . . W s , where sets U s and W s represent the set of times of the ingoing and outgoing train paths, respectively, at station s. The nodes in U s and W s are denoted as u and w and are called arrival and departure nodes, respectively.

IV. MATHEMATICAL MODEL
The arc sets A, A , and are defined as the travel arcs, station arcs, and cross arcs, respectively. The travel arc set A represents all the train paths whose associated departure times are during the implementing day in the basic timetable, and it is partitioned into sets A (1),. . . , A (j), one for each train j ∈ T to select within its given departure time window W j early , W j late . (w, u) ∈ A (j) is a travel arc representing a potential train path for which train j can depart from its origin and arrive at its destination. (u, w) ∈ A is a station arc representing a potential transfer of car flows from an arrival train to a departure train at station s. (w, u) = j i 0 ∈ is a cross arc representing the path of train j i 0 , which departs one day (or several days) before day o and arrives on day o and contains the car flows that need to transfer to the trains departing on day o.
Let θ (v) be the time instant associated with a given For each travel arc (w, u) ∈ A, a weight t a representing the associated travel time is imposed, which is equal to (w, u). For each station arc (u, w) ∈ A , a weight t a representing the associated connecting time is imposed. t a is equal to (u, w) if θ (w) ≥ θ (u) and 0 otherwise. If car flows use a station arc to transfer between two consecutive train arcs, the connecting time t a should be no less than T s min and no greater than T s max . For each car flow i, its arrival time t i at the destination m j i k is θ v i k , where v i k is the arrival node corresponding to the train paths selected by train j i k . Therefore, the penalty for the shipment delay when car flow i arrives at the destination later than the arrival time window Q i is given by By construction, G is acyclic, and the selection of train paths for the freight trains T = (1, 2, . . . , j) uses only arcs in A to meet the connecting time requirements and minimize the total travel time of trains and the total shipment delays; in other words, all the feasibility constraints and optimization objectives are implicitly imposed in the definition of the structure of graph G. VOLUME 8, 2020 B. NOTATION

C. THE MODEL
In scheduling freight trains to transport goods, the operator seeks a schedule that minimizes operating costs, and the shipper seeks a schedule that provides the fastest, most reliable service. Therefore, the train path selection model considers the objectives of both shippers and operators, where the operating costs are chosen by minimizing the total travel time of freight trains and the freight service is chosen by minimizing the shipment delays in delivery compared to the scheduled arrival times.
subject to j∈T (a) x j a ≤ 1 ∀a ∈ A Objective function (3) minimizes the total travel time of trains, and objective function (4) minimizes the total of shipment delays. To solve this model, weights (ω 1 , ω 2 ) are introduced on the two components. Then, by adding the functions, this double objective function is transformed into a single objective function. The weight values reflect the decisionmaker's preference with respect to travel time and delay minimization. Since customer service plays an important role in rail operation, this paper regards these two components as at the same level of desirability and thus sets ω 1 = ω 2 = 1.
Constraints (5) require that each train selects one and only one travel arc. Constraints (6) ensure that each travel arc is selected by at most one train. Constraints (7)-(14) are the connecting time constraints imposed on the trains where the car flow transfer exits. In particular, constraints (7)-(10) bound the connecting time between the trains departing on the current implementing day and the trains departing on the previous implementing day. Constraints (11)-(14) bound the connecting time among the trains that will depart on the current implementing day.
In detail, constraints (7), (8), (11) and (12) are used to define the auxiliary variables and to establish a connection relationship if arcs a and b(c) are selected by trains j i k and j i k+1 (j i 0 ), respectively. Constraints (9), (10), (13) and (14) limit the connecting time of trains to respect the maximum and minimum transit time requirement of the car flows.

V. SOLUTION ALGORITHM
The application of railway transportation models to real operations easily becomes very large-scale, especially for the train scheduling problem, which is generally considered NP-hard (Caprara et al. [22]). As such, the train path selection model presented in Section IV suffers from dimensionality issues because of the rapidly increasing number of formulations (5)- (14). Therefore, a widely used heuristic algorithm, namely, tabu search (TS), is adopted to find good solutions within a reasonable computing time.
Tabu search is a meta-heuristic algorithm that uses an initial solution as a starting basis and builds extended neighborhoods to seek improved solutions. TS explicitly avoids being caught in a local optimum by introducing a tabu list to forbid certain moves that allow the search to return to a previous solution. For more details on the basic idea of TS, refer to Glover and Laguna [27]. In the following, the components of TS designed to solve the problem are presented.

A. INITIAL SOLUTION
A TS algorithm starts its iterative search with an initial solution, and a high-quality initial solution is beneficial to improve the performance of the TS heuristic. In this paper, a shortest-first procedure is proposed for generating the initial solution. Because reducing shipment delay usually requires faster delivery speeds, it is often the case that in the best solution, trains prefer to select the train paths with the shortest travel time.
An important feature of the tabu search heuristic is that it allows infeasible solutions during the course of search. The basic idea of the shortest-first procedure is to assign trains one by one to train paths, ignoring only the connecting time constraint. In the assigning process, if the shortest train path has been selected, the train is assigned to the shortest train path that is unselected. The procedure terminates when all trains have been assigned train paths, and an initial solution is thereby obtained.

B. NEIGHBORHOOD STRUCTURE
A good neighborhood of a current solution is specified by all possible solutions that can be obtained. To facilitate the exploration of the search space, a move is allowed even if it results in an infeasible solution. Thus, for the train path selection model, a possible move is to shift a train to another unselected path or to swap the selected paths of two trains. A small problem with 2 trains (denoted as T1 and T2) and 3 paths (denoted as P1 to P3) is used to illustrate these two moves in Figure 6. This is a typical train diagram, where the three train paths can be selected by the two trains within the same departure time window. After the shift move, train path P3 will be assigned to T1 in Figure 6. This type of swap ensures the move is smooth, meaning that the generated neighborhood solution is different from the current solution, but the difference is not large. In Figure 6, P1 will be assigned T2, and P2 will be assigned T1 after the swap move. This type of swap can be advantageous if there is no unselected train path and the neighborhood of the current solution can still be explored.

C. EVALUATION OF SOLUTIONS
Two different movement strategies, the first-admissible movement and the best-admissible movement, can be adapted to move the current solution to a new solution in the exploration of neighborhoods. The first-admissible movement is to search the neighborhood until the first acceptable solution is found. The best-admissible movement is to search the neighborhood completely and choose the best solution. In this paper, the best-admissible movement is used for accepting a new solution in each move, because it always produces the greatest improvement.
Solutions might be infeasible, since the connecting time constraints are relaxed. The extent of infeasibility can be measured by adding a penalty into the objective function. A similar penalty as in Cordeau and Maischberger [28], that is, γ * f (S), is used, where f (S) denotes the total number of violations of connecting time constraints corresponding to solution S, and γ is a non-negative multiplier set to 100.

D. TABU LIST, ASPIRATION CRITERION, AND STOPPING CRITERION
A tn * pn matrix is constructed to record the tabu status of the shift move, and a tn * tn matrix is constructed for the swap move, where tn is the total number of trains in T and pn is the total number of train paths in A (j), which has the maximum number of train paths. If train j is shifted to train path a, the corresponding tabu status is saved in the element (j, a) of the first matrix. If trains j1 and j2 are selected to swap their train paths, the corresponding tabu status is saved in the element (j1,j2) of the second matrix. At each iteration, the tabu status of the last move performed is set as the tabu list tenure τ , while the tabu status of each of the other moves is decreased by one until it is equal to zero. A move with a tabu status cannot be performed unless it satisfies the aspiration criterion. The aspiration overrides the tabu status of a move if this move produces a solution that is better than the current best solution. The algorithm terminates if a specified number of iterations is reached.

E. THE TS ALGORITHM
The proposed TS algorithm is summarized as follows. Figure 7 presents the flow chart of the algorithm.  Step 1: Generate the initial solution S 0 with the shortestfirst procedure. Set the current solution S = S 0 .
Step 2: Generate the neighborhood of S and order solutions in the neighborhood by non-increasing value in a list L.
Step 3: If the first solution S l in L meets the aspiration criterion, accept S l as the current solution S and the best solution S * and then go to Step 5; otherwise, go to step 4.
Step 4: Choose the first non-tabu solution S l in L and set S = S l .
Step 5: If the stopping criterion is reached, output the best solution S * ; otherwise, go to step 2.

VI. NUMERICAL EXPERIMENTS
The results of numerical experiments on instances of the problem are presented in this section. Part A describes the real data received from the Menghua Railway Company (Beijing, China) and the National Railway Train Diagram Research and Training Center (Chengdu, China) and how a set of instances is designed to evaluate the proposed model and algorithm based on these data. Part B presents the experimental results on artificial instances to illustrate the validation of the TS algorithm. Part C reports the computational results on real-world instances of the Menghua railway. All experiments were carried out using MATLAB 2016b on a PC with a 2.6-GHz CPU and 16 GB of RAM.

A. REAL DATA AND GENERATION OF INSTANCES
The Menghua railway is a freight corridor bridging the north with the south of China. Its total operating mileage is 1813.5 km, and it contains 81 stations in total. In Figure 8, we give a schematic map of the railway.
According to the received data for one implementing day (denoted as day o), there are 23 stations involving train origination and termination, which form the station set S of the problem. The corresponding basic timetable contains 182 train paths in total, 91 southbound (Haolebaoji South to Ji'an) and 91 northbound (Ji'an to Haolebaoji South). The basic timetable is supposed to be the same on each day. The complete time horizon is consequently three days, of which day o is the middle day. However, we focus on the train paths whose associated departure times are on day o.
There are 26 pairs of trains (26 trains for each direction) to be assigned to a portion of the train paths to determine  These trains contain 125 car flows in total, where each car flow represents a transportation request and consists of a certain number of cars. The arrival time windows of the car flows are derived from formulation (1). The related parameters are given as the following: v travel = 34.3 km/h, t transit = 4.8 h, L transit = 208 km, and t unload = 10 h. We regard each empty train as a car flow, and its arrival time window is specified by operators. It is assumed that each station has the same transit time requirements, where the minimum transit time is 3 h and the maximum transit time is 6 h. For simplicity, the penalties per minute for car flows arriving late are set to 5 yuan for all car flows. However, different penalties for car flows can be set individually.
We also obtained a feasible basic timetable with nearmaximum capacity, which is referred to as the full-capacity timetable; see Figure 13 in the Appendix. A full-capacity timetable is a timetable completely filled with train paths and into which no more train paths can be inserted. The obtained timetable contains five stations involving train origination and termination and 530 train paths. Based on the full-capacity timetable, we created two sets of artificial instances. The first set of instances is for validating the proposed TS algorithm, and the second has a larger scale than the realistic scenario to further illustrate the performance of the model and algorithm.
For the first set, we generated ten groups of instances. These artificial instances vary in terms of the number of train paths, trains, and car flows. These instances will be referred to in the form s-a-j-i, e.g., 4-9-3-12, corresponding to an instance with 4 stations, 9 train paths, 3 trains, and 12 car flows. For the second set, we generated a larger instance with a full-capacity timetable. This instance includes 152 trains and 365 car flows, where 29 car flows need to transfer between trains. Other parameters are given by the corresponding values in the realistic instance.

B. ALGORITHM VALIDATION
In this section, we present the results for the first set of artificial instances introduced in Section A. The proposed TS algorithm is compared to using the CPLEX solver directly. The parameter settings for the TS were the length of the candidate list σ = √ tn (tn − 1) /2 , the tenure of the tabu list τ = σ 2 − 1, and the maximum number of iterations ς = 100, where tn is the number of trains. For CPLEX, all parameters were set at their default values. In addition, the time limit was set to 1200 s. Table 2 shows the comparison of the proposed algorithm and CPLEX. We recorded the optimal solutions (Opti) and     Table 2, applying the TS algorithm to solve the model yields optimized solutions whose gaps are relatively small compared to those of the optimal solutions found by CPLEX. These gaps range from 0% to 1.33%. It can also be observed that in terms of computation time, the CPLEX outperformed the proposed TS algorithm on relatively small instances, but for large instances, the TS algorithm outperformed CPLEX. These results illustrate the validation of the proposed TS algorithm and indicate the advantage of finding optimized solutions when dealing with large-scale problems.

C. COMPUTATIONAL RESULTS FOR THE CASE OF THE MENGHUA RAILWAY 1) OPTIMIZED RESULTS AND COMPARISON TO A PRACTICAL TIMETABLE
Here, we report the computational results for the real instance of the Menghua railway. In total, 52 trains are scheduled through selection from the 182 train paths in the basic timetable, accounting for 29% of the trains. The total train travel time is 32980 minutes. The total delay of car flows is zero, meaning all shipments could be delivered within the specified time. These freight trains are all direct trains, and therefore, there is no transfer of car flows between trains. The corresponding train diagram of the optimized results of the Menghua railway is shown in Figure 9.
In addition, we compared the solution output for southbound trains produced by the TS algorithm to the scheduling implemented in practice by the Menghua Railway Company. Figure 10 compares the travel time of each train derived from the actual scheduling and our algorithm. It is evident that many trains are scheduled with train paths that have a shorter travel time in our scheduling. Compared to actuality, the total travel time in the optimized scheduling is reduced by 15%, from 19166 minutes to 16289 minutes. Figure 11 presents the arrival times of the car flows of both our solutions and the actual scheduling. It can be seen that the final arrival times of car flows both in practice and in our solution do not exceed the arrival time windows, which indicates that punctuality is 100%. It can also be seen that the arrival time of our result is not necessarily earlier than the time in practice. This is understandable because in the train path selection model, trains tend to choose the path with the shortest travel time rather than the one with the earliest arrival time.

2) COMPUTATIONAL RESULTS FOR A LARGER INSTANCE
The freight trains in the real data received from the Menghua Railway Company are all direct trains. To further evaluate the performance of the proposed algorithm, we generated a larger instance and tested it when there is car flow transfer between trains. This instance is based on the full-capacity timetable and contains 530 train paths, 152 trains, and 365 car flows, where 29 car flows need to transfer between trains.
As a result, all 152 trains are assigned train paths, accounting for 29% of the total number of train paths. The total travel time of the trains is 110962 minutes. The total number of delays of the car flows is zero. The total transit time of the car flows is 2569 minutes, and all the connecting times of the trains with car flow transfer meet the transit time requirement of the car flows. Therefore, it can be concluded that the proposed algorithm can be used for freight train scheduling in large-scale practical applications even when there is car flow transfer between trains. This study aims to develop an actual timetable for freight trains to implement in daily operations, where the actual timetable is derived from the basic timetable through train path selection. The basic timetable must include a number of train paths at least equal to the number of trains. Based on that, the basic timetables of different capacities are determined by the different numbers of train paths they contain. Therefore, we explored the sensitivity changes of output results under different basic timetable capabilities.
Reducing the number of train paths in the full-capacity timetable proportionally, we generated 6 cases of basic timetables of different capacities (ranging from 50% to 100%), while keeping the other settings the same. The results are presented in Figure 12. When the number of train paths in the basic timetable increases, the total travel time of trains generally decreases, but the decrease is very limited: 0.3%, from 111277 minutes to 110962 minutes. The shipment punctuality remains at 100% throughout these cases. These results illustrate that the capacity improvement of the basic timetable has little impact on saving train travel time and on the punctuality of shipments, indicating that adding train paths in the basic timetable is not guaranteed to result in higher operation and service performance for the actual timetable.

VII. CONCLUSION
This paper proposes a train path selection method to generate an actual timetable from a basic timetable for freight trains to execute in daily operations, where daily train operation other than specific times has been given. In addition, we explicitly considered car flow transfer between consecutive trains and the stipulated delivery time of shipments. A tabu search heuristic algorithm is designed to address the problem, and in contrast to using CPLEX, the TS algorithm can obtain optimized solutions within an acceptable time. Furthermore, the tests on the realistic example of the Menghua railway demonstrate the applicability of the TS algorithm with largescale problems. Compared to the traditional method, the train path selection method proposed in this paper can generate a better actual timetable, which reduces the total travel time of freight trains and ensures the timely delivery of shipments. It can also ensure that the train connecting time meets the transit time requirement of car flows at stations, reducing potential train delays. Finally, the sensitivity analysis shows that the improvement of the capacity of the basic timetable has little effect on the performance of the actual timetable. Therefore, a basic timetable with a capacity meeting the basic demands is sufficient to derive a relatively optimized actual timetable.
In future research, locomotive and rolling stock could be considered to further increase the economic benefits of daily freight train scheduling.

APPENDIX
As mentioned in Part A of Section VI, the full-capacity train diagram of the Menghua railway is presented in Figure 13.