A Scheduling Approach for the Train-Set Circulation Plan and Timetable for the Longer Distance High-Speed Railway in Transition Time

: Nowadays, high-speed railway (HSR) has become one of the main choices for passengers. As the number of passengers increases, their travel demands become diverse and the fluctuation range of passenger travel demands will also increase. In order to adapt to the change of passenger travel demands, the switching frequency of timetables needs to be increased. When switching the timetable, the train-set circulation plan also needs to be considered. In this paper, a scheduling approach for quickly solving the timetable and the train-set circulation plan in the transition time is proposed. A section sequence is constructed in the integer programming model, and the primary train-set circulation plan is obtained. Then a stop plan is obtained on the basis of passenger travel demands. To obtain the final train-set circulation plan and the timetable, a genetic algorithm (GA) is designed, and a method that can ensure that the timetable meets the safety operation requirements is proposed. The scheduling approach is tested on the Beijing-Shanghai HSR. The results show that by extending the transition time, the scheduling approach can switch the train-set position from the old state to new state, without additional consumption of resources, on the premise of meeting the travel demands of passengers.


Introduction
In recent years, the network scale of HSR has developed rapidly, and the length of the HSR line also increased. More and more passengers are choosing to travel by HSR. As the number of HSR passengers has increased, some new operational requirements have emerged. In normal times, the demand for passengers to travel by HSR does not fluctuate much. However, the demand fluctuates because of holidays or special activities. Train timetables are designed to meet the travel demands of passengers, which state the departure time and the arrival time of all train operation lines. HSR operation departments need to change the HSR train timetable in time to respond to the travel demands of passengers. Timely adjustment of the timetable according to the number of passengers can make the arrangement of the operation department more aligned with the demands of passengers, and save the cost of operating a railway line for the operation department. The train timetable contains relevant operational plans, such as train-set circulation plans. The train-set circulation plan is a part of the train timetable, which is a detailed plan of how to use the train-sets when implementing the timetable. The schematic diagram of train-set circulation plan is shown in Figure 1. As shown in Figure 1, there are four train operation lines in the timetable, representing four operation tasks. A train-set can only perform one operation at a time. Train-set 1 performs operation line 1 first, and train-set 2 performs operation line 2. After the completion of one operation line, the train needs a period to replenish materials and clean the carriage, to perform the next operation line. This period is called the turn-back time. We can see that one train-set can perform multiple tasks in one day. Train-set 1 will perform operation line 4 after completing operation line 1. Similarly, train-set 2 will perform operation line 3 after completing operation line 2. As a result, a timetable requires fewer trainsets than the operation lines it contains. Such a plan containing the corresponding relationship between train-set and operation line is called a train-set circulation plan. Passengers need to get on or off the train, so, train-set needs to stop at a station to serve passengers. If a train-set does not stop at the station, we call the train-set pass through the station.
When the old timetable is switched to the new timetable, the operation plan related to the timetable also needs to be switched. For the operation department, the number of train-sets required by each station to implement the new timetable may be different from the old timetable. This means that in terms of the location of the train-set, each station has two states. The state after the implementation of the old timetable is the old state, and the state required by the implementation of the new timetable is called the new state. The schematic diagram of the old state and the new state is shown in Figure 2.
In Figure 2 we can see that in the old state, station A has two train-sets and station G has three train-sets. However, in the new state, station A needs three train-sets and station G only needs two train-sets. The time between the end time of the old timetable and the start time of the new timetable is called transition time. To meet the number requirement of train-sets in each station in the new timetable, the operation department has two methods. The first is to use spare train-sets to perform operation lines (method 1). Second, at the end of the day, trains will be transferred from nearby stations that have more trainsets to those that lack them (method 2). The schematic diagram of the timetable switching method is shown in Figure 3.  As shown in Figure 3, there is a spare train-set in station G and station A is short of a train-set. To make up for this train-set, the backup train-set at station A can be used, or the spared train-set can be transferred from station G to station A during the transition time. The advantage of the first method is that the train does not need to run empty after the end of the operation, so, it will not result in an increase in operating costs and the waste of resources. The disadvantage is that it will occupy the standby train, which will affect the robustness of the timetable in the implementation process. If there is an emergency, the number of standby train-set may be insufficient, which will expand the negative impact. The advantage of the second method is that it will not affect the robustness in the timetable implementation process, but the disadvantage is as mentioned above, which will cause the waste of resources.
In the past, the train timetable was adjusted infrequently, perhaps only a few times a year. Under this adjustment frequency, there is little difference between the two methods. However, as the number of passengers who chose to travel by HSR increased significantly, the fluctuation range of the number of passengers has increased too. In this case, the previous operation mode of only changing the timetable a few times a year has a large lag relative to passenger travel demands. In order to meet the travel demands of passengers better and save the cost of the operation department, it is necessary to increase the adjustment frequency of the train timetable. The increase in the frequency of train timetable adjustment will amplify the disadvantages of the above two modes, resulting in increased waste of resources or greatly affecting the robustness in the process of timetable implementation.
How to avoid the disadvantages of the above two methods and meanwhile scheduling the train-sets, is a problem that is worth studying, because saving resources while meeting the travel demands of passengers is of great significance for practical applications. Thus, we proposed an approach to extend the transition time. In this approach, we extend the transition time from a few hours to a day and realize the train-set rescheduling from the old state to new state through a one-day operation. We call the operation plan during the transition time the transition timetable. The transition timetable proposed in this paper is an approach for the HSR operation department to transition from the old timetable to the new timetable through the operation. The new timetable and the old timetable have been determined by the operation department. The transition timetable scheduling is a train timetabling problem (TTP), and the relevant train-set circulation plan scheduling is a train-set rescheduling problem (TRP). In the scenario proposed in this paper, the TRP has a higher priority, to avoid the disadvantages of the above two methods.
Both train timetabling problem (TTP) and train-set rescheduling problem (TRP) are complex for long distance HSR lines: Firstly, train timetables are designed to meet the travel demands of passengers. For the long distance HSR line, the passenger travel demands are more complex. The demand that passengers travel from the origin station to the destination station is called O-D. For example, the number of types of O-D for an HSR line with six stations is: Let be the quantity of stations of the HSR line, the number of O-D types is: Obviously, with the increase in the quantity of stations along the HSR line, the types of O-D increase too. For the long distance HSR line, there are more than twenty stations and there will be more than 300 types of O-D.
Secondly, there are more passengers on the long distance HSR line. The operation department needs to prepare more train-sets to meet the travel demands of passengers. Thus, the complexity of scheduling a train-set circulation plan is higher than a normal railway line.
Thirdly, due to the increasing adjustment frequency of timetables, the requirement of solving efficiency is higher than that of the past. However, the TRP and the TTP are more difficult to solve due to the scale of the problem in long distance HSR lines.
In the normal approach, a train timetable is scheduled at first, to meet the passenger travel demands. Then the train-set circulation plan is scheduled according to the timetable. The disadvantage is, as mentioned above, that it leads to a waste of resources. Moreover, if the operation department only adjusts the timetable to meet the new state requirements, it will affect the satisfaction of passenger travel demands too. It is very difficult to solve the train timetable and the train-set circulation plan directly at the same time because the scale of the problem is too huge for long distance HSR lines and the time consumption will be unacceptable. The approach proposed in this paper aims to meet the demands of passengers as much as possible, without affecting the robustness of the implementation of the new timetable, and avoid the waste of resources. We calculated the train-set circulation plan and stop plan respectively, and finally matched them to obtain the timetable. The scale of each problem is smaller than the overall problem, which is easy to solve. The approach framework used in this paper is shown in Figure 4. As shown in Figure 4, we need the structure of the HSR, the operation safety parameters of the HSR, the position of the train-sets in the new state and the old state, and the travel demand of passengers before scheduling the transition timetable and the train-set circulation plan.
The first step is to calculate the primary train-set circulation plan according to the position and state data of the train-set, the structure of the HSR and the operation safety parameters. We established a profit function according to the full load ratio of trains in different sections. The higher the load rate of the train, the higher the profit. Based on the profit function, we build an integer programming model with profit maximization as the goal and use CPLEX to solve. The plan obtained in this step is called the primary train-set circulation plan, which will be used in the third step to match with the stop plan.
The second step is to calculate the stop plan according to the structure of HSR, operation safety parameters and passenger travel demands. The calculation of the stop plan should be based on the service plan. If a train arrives, departs, or passes through a station, we call the train serves the station. In the service plan, we define the minimum quantity of trains that stop at each station. Moreover, the quantity of trains is calculated by decomposing the passenger travel demands. The stopping plan here is used to match the trainsets of the primary train-set circulation plan.
The third step is to match the primary train-set circulation plan and stop plan, based on a genetic algorithm (GA). In order to save time, we calculate the train timetable according to the operation safety parameters after the matching scheme is obtained by the GA. We adjust the operation lines beyond the operating time range, to output the final timetable and the train-set circulation plan that meets the operational requirements.
The main contributions of this paper to the study of the TRP and the TTP are as follows: 1. An integer programming model based on profit function was designed, and CPLEX was used to solve the primary train-set circulation plan in a very short time.
2. Based on the decomposition method of passenger travel demands, the service plan is constructed. We use CPLEX to solve the model and obtain the stop plan.
3. We proposed a GA to calculate the matching relationship of the primary train-set circulation plan and the stop plan, then calculate and adjust the timetable according to the safety operating requirements.
The rest of the paper is as follows: In the second section, we summarize the existing research. In the third section, we describe the construction method of the train-set section sequence and the profit function of it and establish the integer programming model for scheduling the primary train-set circulation plan. In the fourth section, we describe the decomposition method of passenger travel demands, which can convert the complex passenger travel demands into a service plan. Then, we introduce a method to calculate the stop plan based on the service plan. In the fifth section, we propose a GA to match the primary train-set circulation plan and the stop plan. Moreover, we design an adjusting method of the plan and timetable, to make them meet the operating requirements. In the sixth section, we carry out a real-world case study on the Beijing-Shanghai HSR. We analyzed the performance of the approach from the perspective of the application. In the seventh section, we summarize the paper and present the recommendations for further research.

Train-set Rescheduling Problem
There are two scenarios of TRP. The first scenario is to optimize the train-set circulation plan corresponding to the current timetable, to meet the demands of the new timetable. Abbink et al. [1] optimized the allocation of locomotives and vehicles and built a model to match the vehicle model with the line demand. They use CPLEX to solve it. The results show that the plan prepared by the algorithm can significantly improve the service quality in the peak period, compared with the manual scheduling plan. Fioole et al. [2] considered the indicators, such as railway operation cost, reliability and service quality when optimizing the railway rolling stock circulation problem. Their model can serve multiple lines and realize train combination and splitting. Their method has been applied to railway lines in the Netherlands. Cacchiani et al. [3] established a model by corresponding train units and a given set of timed trips for solving the train-unit assignment problem (TUAP). Moreover, they considered the number of seats required by passengers on each trip. Cadarso et al. [4] designed a model including shunting operations, propagated delays and the need for human resources. Through this model, the synchronous arrangement of locomotive and vehicle allocation and vehicle path is realized. They used the heuristic based on Benders Decomposition to solve the model. Lin et al. [5] studied a train-unit scheduling problem (TUSP), which is similar to the TUAP. Compared with TUAP, they took more real-life factors into consideration, which are crucial in railway operation. They proposed a customized branch-and-price solver and adapted an adaptive node selection method to facilitate the solving process. For the railway system that contains different types of trains, there are different maintenance requirements. Thus, in some application scenarios, the maintenance factors need to be considered when scheduling the train-set circulation plan.
Maróti et al. [6] proposed a train timetable adjusting the approach for trains that require maintenance within three days. Alfieri et al. [7] studied the efficient cycle of rolling stock. They established an integer multicommodity flow model to maximize the use of vehicles. They consider coupling trains in peak hours. Peeters et al. [8] put forward a method to adjust the number of trains at stations along the railway line by branch pricing algorithm. Chung et al. [9] proposed a mixed integer programming model of balance train route mileage. This model considers the limitation of maintenance capacity. Budai et al. [10] proposed a method to reschedule the train-set circulation plan based on a current timetable, so as to meet the demands of the new timetable. Otsuki et al. [11] described the railway rolling stock allocation problem based on a set partitioning multi-commodity flow (SPMCF) problem. Thorlacius et al. [12] constructed the rolling stock plan by using a heuristic algorithm. For specific needs, they use a hill climbing heuristic to optimize the obtained plan, to maximize the carrying capacity with as few trains as possible. Lai et al. [13] established a model to improve the efficient utilization of rolling stock. They considered the overhaul of the train. The case study shows that their method can improve train-set utilized efficiency and solution efficiency. Zhou et al. [14] compare the TCPP to the aircraft route problem (ARP) and the vehicle route problem (VRP) in logistics. They proposed a train-set circulation optimization model, an effective multiple population genetic algorithm (MPGA) is used to solve the problem. Aims to minimize the cost of rescheduling train-sets, Nishi et al. [15] described the TCPP as a traveling salesman problem (TSP) and then solved it by a column generation and Lagrangian relaxation heuristics. Wang et al. [16] studied the train utilization of railway transportation hubs. They built a TCP model. In this model, there is a one-to-one responsibility relationship for train-sets, trip tasks, and maintenance. They designed a genetic algorithm to solve it. A case study shows that dispatching trains between stations in the hub can improve efficiency.
The second scenario of TCPP is that if there are emergencies in railway operation, how to reschedule train-sets after the emergency. It is also called the rolling stock rescheduling problem (RSRP), which is similar in feature to the TCPP. Rezanova et al [17]. studied the train driver recovery problem (TRDP), which is similar to the RSRP. They treat TDRP as a set partitioning problem and adopt a depth first search of the branch & bound tree to obtain integer solutions. They tested the method based on data from the Danish passenger railway. Nielsen et al. [18] proposed a rolling stock management approach for the case of disturbed operations. The rolling stock decision is considered only for a period of time. After arranging the trains during the current period, the next period will be considered. Through this rolling horizon approach, they improve the solution efficiency. From the perspective of passenger service, Ilse et al. [19] proposed an integer programming model to determine which trains still operate after being disturbed. They tested the method on the Dutch railway. Wagenaar et al. [20] proposed a mixed integer linear programming rescheduling model including passenger demands. It is also suitable for train rescheduling problems with sudden changes in passenger demands. Ghaemi et al. [21] studied a mixed integer linear program model suitable for a busy corridor of the Dutch railway to obtain the short-turn scheme under disruption. The results show that the short-turn scheme is related to the disruption length and longer disruption length will cause more train cancellations. The research on the first scenario focused on rescheduling the trainset circulation plan under the existing timetable. Moreover, the research on the second scenario focused on adjusting the train-set circulation plan and timetable at the same time. The new timetable is different from the old timetable; therefore, the ideal train-set circulation plan corresponding to the two is also different. There are limitations in meeting the train-set demands of the new timetable by optimizing the train-set circulation plan on the old timetable. We refer to the idea in the second scenario to schedule a timetable and trainset circulation plan at the same time on the premise of meeting the needs of passengers.

Train Timetabling Problem
TTP includes periodic timetabling, aperiodic timetabling, and mixed timetabling. Mixed timetabling is a combination of periodic timetabling and aperiodic timetabling.
Many researchers use the periodic event scheduling problem (PESP) model to study the periodic TTP. In 1996, Odijk et al. [22] proposed that different types of trains can have different operation cycles. According to different types of trains, the operation line of each type of train shall schedule the timetable according to their respective cycles. The model stipulates that each type of train has the same starting and ending points, train routes, stop plans. Kroon et al. [23] found that the train running time is fixed in some models but in the actual situation they are unfixed. Thus, they estimated that the train running time is unfixed and then designed a model based on the PESP model. Jamili et al. [24] proposed a hybrid multivariable hydraulic algorithm to solve the PESP model. In the model, multiple kinds of trains are operated on a single-track railway. Siebert et al. [25] studied the periodic timetabling problem models actually applied in the Netherlands railways and the Berlin subway. They additionally considered passenger paths and line frequencies and then verified the model on the railway in Germany. A case study showed that the travel time of passengers is shorter in the extended model. Based on their previous studies, Kroon et al. [26] further studied the periodic train timetable's intersection and transfer connection. Heydar et al. [27] describe the method of applying the PESP to the existing periodic timetable scheduling problem, the shortcomings of the existing models are analyzed, and an extended model allowing partial deviation of the running time is proposed. Lamorgese et al. [28] divide the railway line into a series of independent units. They established a decision-making model for the time and priority of the train. Zhou et al. [29] established a model for scheduling timetables for different types of trains. In this model, the operation line of each train is scheduled according to its own period. Each type of train has the same starting and ending points, train path, stop plan and speed. Sparing et al. [30] established a cycle timetable optimization model for pursuing the minimum cycle time. They believe that a short cycle length can make the timetable more stable. Burggraeve et al [31]. proposed a method of scheduling a robust timetable. They first generate a line plan, then schedule a timetable based on the line plan by PESP model, and feedback the quality of the line plan with the buffer time of the timetable. The variable time length of the critical line makes the method more flexible. They verified the algorithm with the railway network structure of Copenhagen, and the results show that robustness can be improved. Zhang et al. [32] transformed the mathematical model of PESP into a multi commodity network flow model with two coupled schedule networks and sidetrack capacity constraints. Through this model, they synchronize limited operational resources toward a master periodic schedule of transport services.
In terms of aperiodic timetable, Ghoseiri et al. [33] proposed a multi-objective model, in which fuel consumption cost is adapted to evaluate the operation department's satisfaction. Doflman et al. [34] proposed the discrete event model of trains to dispatch trains in the railway network. In this model, they adopted the local feedback-based travel advance strategy to deal with the disturbances in the timetable. Considering that both the section capacity and the station capacity are limited resources, Zhou et al. [35] add a set of operational constraints. The branch and bound algorithm and the Lagrangian relaxation algorithm are adapted to calculate the train timetable. Cacchiani et al. [36] put forward a model in which all variables are related to the train running time. They solved the model using heuristic and exact algorithms. This method is not suitable for large-scale railway networks. They proved the effectiveness of the algorithm through some smallscale examples. Lee y et al. [37] used the heuristic method of optimization to generate the initial solution and then iterated. They used two systems, one to determine the sequence of trains passing through the station and the other to calculate the timetable. They verified the effectiveness of the understanding on two small-scale road networks. Forsgren et al. [38] developed a model based on Sweden's new timetable scheduling process to meet the transportation demand when the infrastructure capacity changes. Sun et al. [39] established a multi-objective optimization model. In this model, they set a series of objectives including the average train running time, energy consumption and passenger satisfaction. To solve the problem, they designed an improved genetic algorithm. Shi et al. [40] analyzed the train operation plan optimization problem of an urban rail corridor. The railway system is divided into two parts: platform and vehicle. They aim to minimize the number of train departures, so as to meet the needs of passengers while driving as few trains as possible. Tong et al. [41] proposed a space-time network that is based on three dimensions. Then they calculated the train timetable by a train timetable compilation method. Jiang et al. [42] established a DEA model based on train routes, so as to provide a basis for train route selection. Fischer et al. [43] studied aperiodic TTP. They found that linear programming could not describe the overtaking relationship of trains. Therefore, the problem was decomposed into several subproblems by the connected configurations method, and Lagrange relaxation was used to solve these subproblems. Wang et al. [44] proposed a column generation algorithm with an acceleration scheme to solve the train timetable. Wang et al. [45] proposed a space-time decompose approach to analyze the passenger travel demands. They established an integer programming model, which divides the timetable into three periods and solves the corresponding timetable in parallel.
In terms of periodic and aperiodic mixing TTP, [28,46,47] studied the problem from the perspective of maximizing the profit of the operating company and the perspective of passengers' satisfaction.
A periodic timetable is easier to solve, but in periodic timetables, some trains with excessive stops are repeated to meet the travel demands of passengers. This kind of train will lead to low passenger satisfaction. Due to the difficulty of solving aperiodic timetables directly, the time consumption will be beyond acceptance. Although the solving speed of periodic and aperiodic mixing timetable is faster, it is still a timetabling priority method, which may not be optimal for the train-set circulation plan. Moreover, there is some research on timetable rescheduling under disruptions; [48][49][50][51] studied the timetable rescheduling problem with different strategies. They adjust the train stop plan and operating order to erase the negative effect as soon as possible.
Most of the existing research deals with traditional TRP and TTP. Those studies are suitable for traditional operation scenarios, but transition time is a distinct scenario. Moreover, some research connected with TTP, on rolling stock rescheduling, is for the disturbed scenarios. The goal of these scenarios is to resume normal operation as soon as possible. Although there are some studies on transition time, the problem of wasting resources when timetable adjusting frequency increases still cannot be solved because much of the research is based on the current timetable. Hence, we propose a specific approach to TRP and TTP for transition time, in which the train-set circulation plan has a priority, to avoid the problems mentioned above.

Primary Train-set Circulation Plan
The long distance HSR line has more stations, and there are more train-sets running on it. Thus, it is more complex to decide in which direction the train-set will be operated and how long should the train-set run. We proposed an integer programming model to obtain the primary train-set circulation plan. The objective of the model is to maximize the profit of train-set operation under the premise of meeting the train-set position constraints. The profit function is constructed based on the full load ratio associated with time. Table 1 lists the general subscripts of the proposed model. Moreover, Table 2 lists the parameters used in the proposed model.

Subscripts
Description Train-set ∈ ,where is the set of train-sets, | | = . Section ∈ , where is the set of sections, | | = . Table 2. Description of the parameters.

Subscripts
Description The profit of train-set when train-set passing section .
The capacity of train-set . The total capacity of all train-sets in section . The

Profit Function
The operating profit of the train-set is related to the full load ratio. The full load ratio of section can be calculated as: where means the quantity of passengers of section , and means the sum of the capacity of all train-sets of section . The full load ratio of a section can be calculated on the basis of historical passenger transport data.
The passenger travel demands of different sections and times are different. Therefore, the full load ratio of the train-sets operating in these sections will also be different. By comparing the full load ratio of train-sets, we can observe the passenger demands in this section. At the same time, the full load ratio of the train-set directly reflects the profits of the train-set. The high load ratio of the train-set shows that it has a high income. More train-sets are needed for the sections with high travel demand for passengers. For the section with less travel demand, train-sets can be operated less appropriately. Therefore, the profits of train-set operation come from the quantity of passengers.
In this paper, we evaluate the profits based on the full load ratio of train-sets in the section. It represents the profits generated by a train-set passing through a section. This benefit is used as a reference when calculating the stop position of the train-set under the condition of satisfying the state constraint at the end of the transition time. The profit is related to the train-set operating direction. The train-set operating direction of stations at both ends of the HSR line is fixed. Moreover, there are two directions for train-sets at intermediate stations. Figure 5 shows the train-set direction of the stations at both ends and the train-set direction of the intermediate station. As shown in Figure 5, train-set 1 can only perform the operation line in the A-G direction at station A, like the blue line. The same train-set 3 can only perform the G-A direction at G station, like the red line. There are two options for train-set 2 departing from station C. One is to perform the C-A direction, like the green line. Moreover, the other is to perform the direction of C-G, like the yellow line.
Thus, we sum the profit of each section to evaluate the operating profit. The profit function ( ) for train-set is as follows: where means that whether train-set passing section , means the profit of trainset pass through section . Let be the full load ratio of section, , be the maximum quantity of passengers that can be carried by train-set , which is called the capacity of train-set , be the ticket price of section , we can rewrite the profit function ( ) as:

Section Division
In HSR operation, stations are divided into different grades. Stations of different grades have different operational capabilities. Only high-grade stations are qualified to be the starting station and terminal station of train-sets. We regard these stations as the boundary stations of the section. Figure 6 shows an example of sections and boundary stations. As shown in Figure 6, stations A, C, E and G are boundary stations, and stations B, D and F are ordinary stations. In this model, we divided these stations into three sections, they are section A-C, section C-E and section E-G. Train-sets are only allowed to end their operation at stations A, C, E and G. Each section has a start station and an end station. For example, for section A-C, the start station is station A, and the end station is station C. It should be noted that there may not be only one station in the middle of the boundary section.

Train-set Section Sequence
In this paper, we construct a train-set section sequence based on the running direction of the train-set. The sequence can reflect the direction and route of the train-set. The longer the one-way travel distance of the train, the more diverse passenger travel demands can be borne. Therefore, we default that all trains will run as long as possible once they are operated, to meet more travel demands of passengers. The train-set direction sequence is shown in Figure 7. As we can see in Figure 7, stations A, C, E and G are boundary stations. Train-set 1 at station A has only one direction. In Figure 7a, train-set1 perform the blue line, and the corresponding train-set direction sequence is shown as the blue route in Figure 7b: Similarly, train-set 3 at station G has only one direction, and its train-set section sequence is shown as the red route in (b), which is: A-C, C-E, E-G, G-E, E-C G-E, E-C, C-A, A-C, C-E Train-set 2 at station C has two directions, either to station A or G. These two directions correspond to a different sequence of the route. In this case, we add the routes corresponding to the two directions to the train-set section sequence in the model. The sequence of train-set 2 is: (

Objective Function and Constraints
We designed an objective function for maximizing the operating profits of all the train-sets. It aims to meet more demands of passengers.

Constraints on Operation Time
means the departure time of the train-set in its starting station, means the start time of operation hours, means the end time of operation hours. HSR has a fixed operation hour, and the train-set's departure time and arrival time need to meet the operating time range. In addition, we stipulate that the end operation time of the train-set should be within the operating time range.
means the running time train-set in section . When setting the running time, we set aside redundancy because the dwell time of train-sets at stations within the section and the turn-back time also needs to be considered.

− ≥
Based on the safety operation requirements of railway transportation, the adjacent train-sets should maintain a safety interval. means the departure time of the trainset, means the departure interval of the train-set.

Constraints on Direction Selection
Train-sets in the intermediate station need to choose the direction based on the profits, and only one direction can be selected. means the train-set chooses the direction, means the train-set chooses the direction. and are 0-1 variables. 0 means that the direction is not selected, and 1 means that the direction is selected. The sum of and is 1 to ensure that only one of the two directions can be chosen.

Constraints on Matching of Direction and Section Sequence
The section sequence covers the sequence corresponding to two directions. means the starting section of the sequence in the direction, is the starting section of the sequence in the direction.

Constraints on Section Sequence
is 0-1 variable. 0 means the train-set does not pass through the section , 1 means the train-set passes through the section . The section sequence represents the route of the train-set. The constraint on the section sequence is to ensure the continuity of train-set operation and avoid the phenomenon of occupying section and + 2, skipping section + 1.

Problem Description
In the previous section, we got a primary train-set circulation plan. The plan is section-specific and lacks a specific stop plan for the train-set in each station. To calculate the stop plan, we need to know the service plan first. The service plan includes the number of stops at each station. It is determined according to the travel demands of passengers. We use the passenger demands space-time decomposition method [45] to calculate the service plan. The space decomposition result is used to calculate the quantity of stops in each station, and the time decomposition result will be used in Section 5 to evaluate the match relationship of stop plan and primary train-set circulation plan. Based on the service plan, the stop plan is calculated by CPLEX. In order to save operating costs, we take minimizing the number of stop schemes as the objective function. The passenger travel demands in each direction are different, and the stop plan corresponding to the direction is also different. Thus, we calculate the stop plan for different directions separately. The calculation of the stop plan is similar in each direction. Therefore, we mainly discuss the stop plan calculation in one direction. Table 3 is the description of general subscrips of the approach we used in this paper, and Table 4 is the description of the parameters in the approach. Table 3. General subscripts.

Subscripts
Description Station ∈ , where is the set of stations, | | = . Type ∈ , where is the set of stop plan types, | | = . Table 4. Description of the parameters.

Subscripts
Description The minimum quantity of train service at station . The number of passengers that station served in one day. The number of passengers on the railway line that we are concerned about.
The total amount of passengers served on all the railway lines passing through station in one day. The average capacity of a train.

Passenger Travel Demand Decomposed
If a train departs, arrives, or passes through a station, we call the train serves the station. The service plan defines the minimum quantity of train service at each station.
For stations at both ends of the railway, we use the following method to calculate , the minimum quantity of train-set service: where means the number of passengers that station served in one day. means the average capacity of a train. In this paper we default that all the train-set has the same capacity, hence is equal to the capacity of a single train-set. Considering that the train-set has carried passengers before it arrives at the intermediate station, we need to consider the average full load ratio between adjacent stations of a section when calculating the quantity of train service for the intermediate station. It should be noted that the section here is different from 3.3. Section 3.3 is for boundary stations, and the section here is for adjacent stations. The corresponding relationship of the full load ratio and the station is shown in Figure 8. As shown in Figure 8, is the average of section A-B, hence the number of passengers train-set can transport in station B can be written as: Therefore, we use the following method to calculate the minimum quantity of train service for an intermediate station in section : means the average full load ratio of a train at section , which is connected with station . The full load ratio of trains is different in different directions at the same station.
There are some stations that serve several railway lines, which are called hub stations. For these stations, the calculation method for the minimum quantity of train-sets has two types similarly. For hub stations at both ends of the railway, we write the formula as: And for other hub stations, we write the formula as: means the total amount of passengers served on all the railway lines passing through station in one day.
means the number of passengers on the railway line we are concerned about.

Type of Scheme in Stop Plan
As mentioned above, the operation line in the timetable is a task for train-set. It corresponds to a scheme in the stop plan. An operation line needs to be implanted by a trainset. Table 5 shows an example of a stop plan. Table 5. An example of stop plan.

Station
Whether Train-set stop Station Whether Train-set stop S I S II S III S IV S V S VI S VII There are seven schemes in the stop plan. Schemes in the stop plan can be divided into different types according to their departure station and terminal station. Thus, there are four types of schemes, scheme I, II, IV are the first type, scheme III is the second type, schemes V, VI are the third type, scheme VII is the fourth type. The service distance of scheme I is from station A to station G, it is longer than scheme III, hence scheme I can serve more diverse passenger travel demands. Thus, schemes with longer service distances have higher priority.

Objective Function and Constraints
is a 0-1 variable, which means whether the − ℎ scheme in type is operated. Obviously, the operation department can save costs by operating as few schemes as possible under the premise of meeting the passenger travel demands.

Constraints on the Quantity of Train Service
, is a 0-1 variable, indicating whether the − ℎ scheme in type serves station . is the number of services required by the station .

Constraints on the Maximum Number of Stops
If the scheme stops too many times, the running time will be too long. It will affect the travel efficiency of passengers. Moreover, the negative impact will be amplified especially on long-distance railway lines. A much longer time is needed for the train to complete the journey. Thus, we limit the maximum number of stops of a train.
is the maximum number of stops of type .

Constraints on Whether Operating the Scheme
We define that if a scheme is not operated, it should not serve any station. , is a 0-1 variable, , = 0 means that the − ℎ scheme of type has not been operated, and , = 1 means that the − ℎ scheme of type is operated.

Constraints on Scheme Type
, ≤ We define the maximum number of schemes for each type, in order to reduce the calculation scale and conform to reality because the number of trains that can be operated in a day is limited.

Timetable Calculation and Adjustment
After the stop plan is obtained, we need to match the primary train-set circulation plan and the stop plan, to obtain the final train-set circulation plan and transition timetable. The flow chart of the timetable calculation and adjustment method is shown in Figure  9. Green is the input part; Blue is the matching part and Orange is the adjustment part. The operation of each step will be described in detail below.

Primary Train-set Circulation Plan Splitting and Corresponding Relationship
To match the primary train-set circulation plan, firstly we need to split the primary train-set circulation plan. The schematic diagram of the method for splitting and matching is shown in Figure 10.
In Figure 10, the route of train-set I contains three schemes ①，② and ③. The route of train-set II contains four schemes ④，⑤，⑥ and ⑦. Scheme ①, ③ and ⑥ are from station A to station G, and they can be matched with scheme I, II and IV in stop plan. Scheme ② and ⑤ are from station G to station A, and they can be matched with scheme V and VI. There are triangle areas in the timetable, like purple triangles and green triangles. The triangle area is the area between the trains that depart from the stations at both ends and the starting time of the operation hours. The green triangles are for direction A-G, and the purple triangles are for direction G-A. The Triangle area can be served by trains departing from intermediate stations. Thus, scheme ④ can be matched with scheme III, and scheme ⑦ can be matched with scheme VII.

The Interconnection Relationship
There is a complex interconnection relationship between trains. The interconnection relationship is shown schematically in Figure 11.
In the example, if train ①, ② and ③ follow the order on the left, the operation time needed is , and if they follow the order on the right, the operation time needed is . Obviously, the is shorter than , hence the efficiency is higher on the right. When matching the primary train-set circulation plan with the stop plan, we need to consider the interconnection relationship of trains, i.e., the order of trains.

Matching and Adjusting Method
When matching the stop plan with the primary train-set circulation plan, something needs to be considered. First, the number of schemes in the primary train-set circulation plan may be different from the number of schemes in the stop plan. Second, although we have reserved the stop time when calculating the primary train-set circulation plan, it is still possible for the train to exceed the prescribed operation hours when it ends operation. In order to ensure that the timetable meets the actual requirements, we design a matching and adjusting method for the above situations, as shown in Figure 12. As shown in Figure 12, the matching and adjusting method of the stop plan and the primary train-set circulation plan are divided into three parts.
1. Firstly, we compare the number of schemes in the stop plan with the number of schemes in the primary train-set circulation plan and take these data as input data.
In the matching process, we adjust the scheme according to the comparison results. If the number of schemes in the stop plan is more than the number of schemes in the primary train-set circulation plan, the number of schemes in the stop plan will be reduced. We follow the principle of meeting the travel demands of passengers to the greatest extent and give priority to canceling the scheme with fewer stops. If the number of schemes in the stop plan is less than the number of schemes in the primary train-set circulation plan, it indicates that the carrying capacity of the primary trainset circulation plan is greater than the travel demands of passengers. In this case, we generate the stop scheme for these schemes in the primary train-set circulation plan. These extra schemes in the stop plan only serve boundary stations, because these stations serve more passengers. If the number of trains in the stop plan is the same as the number of schemes in the primary train-set circulation plan, then go to the next step directly.
2. The timetable can be calculated after the number of schemes in the stop plan is equal to the number of schemes in the primary train-set circulation plan. When calculating the timetable, the matching relationship between the stop plan and the schemes of the primary train-set circulation plan should be determined first.
There are differences in the travel demands of passengers at different periods within a day. To meet the travel demands of passengers more accurately, we divide a day into serval periods, and decompose the passenger travel demands in the time dimension, based on the result of space decomposition result. It is a reference to evaluate the matching result because it can show whether the timetable meets the passenger travel demands, which is very important in HSR operation. We have obtained the space decomposition result in Section 4.3, and the can be divided as: where ( ) means the number of stops of station in − ℎ period of a day, ( ) means the number of passengers served by station in − ℎ period. After that, we calculate the matching relationship by GA. GA is widely used in the research in TRP and TTP, like literature [14], [16], [39], and the results show that the GA has good performance. We take the matching relationship of the primary train-set circulation plan and stop plan as a gene fragment. The GA steps are as follows: Step 1. Initial feasible solutions for the matching relationship, and decompose the passenger travel demands.
Step 2. Calculate the timetable for each solution by CPLEX according to the safety operation constraints in real life.
Step 3. Crossover operation. We take a matching relationship as a gene. A multipoint crossover method is used in the algorithm. We cross over the matching relationship based on the periods of time, and the probability of cross over is 0.9.
Step 4. Mutation operation. The mutation operation is to exchange two adjacent matching relationships. The probability of the mutation operation is 0.1. The schematic diagram of crossover operation and mutation operation is shown in Figure 13.
As shown in Figure 13, the schemes of the primary train-set circulation plan are the outer frame. For example, the square numbered 1 represents the first scheme in the primary train-set circulation plan. Moreover, scheme A in the square numbered 1 means that scheme A in the stop plan is matched with the first scheme in the primary train-set circulation plan. Then we perform crossover and mutation operations. Firstly, we divided the matching relationship according to the pre divided time period. All of the operations mentioned above are performed within the time period that the matching relationship belongs. Secondly, we cross over these matching relationships like Figure 13 shows, the latter segment of the second solution is exchanged with the former segment of the first solution, and then the former segment of the first solution is exchanged with the latter segment of the second solution. After the cross over operation, we will judge whether each matching relationship will mutate, and if so, exchange it and its subsequent matching relationship. Step 5. Calculate the timetable for new generation by CPLEX according to the safety operation constraints in real life.
Step 6. Evaluate all the solutions. We evaluate those solutions by counting the satisfaction of passenger travel demands within the specified time period and the number of trains exceeding the end of the operation. It should be noted that before comparing those solutions, we need to normalize the satisfaction of passenger travel demands and the number of trains. We use the classical normalization method to divide the current value by the maximum value of this parameter in all solutions Then we choose solutions that have better fitness from all the solutions.
Step 7. If the number of iterations reaches the upper limit, or the best solution meets all the demands, end the algorithm, otherwise go back to step 3.
3. After calculating the timetable, it is necessary to check whether all train-sets are within the operating hours. Train-sets that are not within the operating hours need to be adjusted. The adjustment steps are as follows: Step 1. First, we counted the positions of the train-sets beyond the operating hours when they ended operation.
Step 2. Second, we count the positions of these train-sets at the end of their operating time. It is important to note that train-sets need to be stopped at boundary stations. If the train-set is between two boundary stations at the end of the operating time, we terminate the train-set at the first boundary station it passed.
Step 3. After step 2, the train-set position may not meet the position constraints. We need to rebalance these train-sets. Because the total number of train-sets is fixed, a lack of train-sets at some stations means that there are more train-sets than needed at some other stations. For the extra train-sets in stations where there are more train-sets than needed, we terminate it at the station where train-sets are still needed.
The schematic diagram of each step is shown in Figure 14. As shown in Figure 14, we can see that three train-sets are out of operation hours. One of these train-sets ends at station A, one at station E, and one at station G. At the end of the operation time, train-set 1 is closest to station C, train-set 2 is closest to station E, and train-set 3 is closest to station E. Thus, after the execution of step 2, We can see that among all the adjusted train-sets, the number of train-set stopped at station A changed from 1 to 0, in station C the number changed from 0 to 1, in station E the number changed from 1 to 2, and in station G the number changed from 1 to 0. Comparing the amount of train-sets at each station in the two states, we can see that stations A and G lack one trainset, while stations C and E have one extra train-set. When replenishing trains for stations A and G, we choose stations as close to them as possible, to minimize the impact on the timetable. That is, in order to meet the requirement for the number of train-sets in station A, we adjust the train-set which finally stops at station C. Similarly, in order to meet the requirement for the number of train-sets in station G, we adjust the train-set which finally stopping at station E.
When we calculate the primary train-set circulation plan, we have set aside the running time for each section. Thus, the adjustment on the timetable here will not influence the timetable too much.

Introduction to the Beijing-Shanghai HSR
The real-world data of Beijing-Shanghai HSR was used as an example to analyze the feasibility of the model and algorithm. The Beijing-Shanghai HSR is a HSR line connecting Beijing and Shanghai. It is an important railway line for passenger transportation connecting north and south in China. The diagram of the Beijing-Shanghai HSR line is shown in Figure 15. The Beijing-Shanghai HSR is 1,318 km long and the maximum operational speed of this line is 350 km/h. There are 23 stations along the railway line, including six major hub stations in Beijing, Tianjin, Jinan, Xuzhou, Nanjing and Shanghai. We take these hub stations as a collection of boundary stations.

Parameters
The safety operation parameters we set in the example are shown in Table 6. These parameters are used to calculate the timetable. The dwell time is usually two minutes. It should be noted that Beijing Nan Station and Shanghai Hongqiao Station have no dwell time. Because the dwell time is for passengers to get on and off trains, they are generally set up at stations along railway lines. These two stations are stations at both ends of the line and will only be used as starting or terminal stations. According to the data of the number of passengers served by the station, we use the passenger travel demands decomposition method to calculate the service plan. The service plan of each station is shown in Table 7. The old state and new state of each boundary station are shown in Table 8.

Results and Analysis
In the GA, we divided the whole day into three periods. The first is from 6:00 to 12:00, the second is from 12:00 to 18:00, the third is from 18:00 to 24:00. The time-dimension decomposition result is shown in Table 9. We set the maximum number of iterations to 300. The solving time is related to the number of initial solutions. To obtain the relationship between the number of initial solutions, the quality of final solutions and the solving time, we set up 30, 50 and 80 initial feasible solutions respectively, and compared the algorithm performance in these three cases. We choose three representative solutions. The comparison is shown in Figure 16, the iteration diagram is shown in Figure 17, and the specific values for these three cases are shown in Table 10.    In Figure 17, the best solution among 80 initial feasible solutions is better, because if there are more initial solutions, it is more likely to generate better solutions. We evaluate the quality of the timetable in two ways, one is the satisfaction of the number of stops in each period, the other is the number of adjustments required to make the timetable meet the safety operation constraints. The first way has an impact on the quality of the timetable and the second way has an impact on the train-set circulation. The solving speed is the fastest if we only initial 30 feasible solutions. However, from the perspective of passenger satisfaction, there are 1207 stops in the original service plan. In case III the sum of the number of stops in each period is 1142, which is 31.42% higher than case I. Moreover, the number of adjustments in case III is 50% lower than case I. It means that the timetable and the train-set circulation plan in case III is better than case I. From the perspective of practical application, the HSR operation department can select the number of initial feasible solutions generated according to their demands. If they want to obtain higher quality solutions and do not require to obtain solutions in a short time, they can set more initial feasible solutions.
Moreover, we tested the case of not dividing the time, the result shows that although the number of stops is similar to the approach proposed in this paper, the passenger travel demands satisfaction of each period is very poor.
To verify the performance of the GA, we compared the approach proposed in this paper with the normal approach, in which the timetable is solved by CPLEX at first and then adjust the timetable to meet the train-set position constraints. The time consumption of the normal approach is 38 minutes because the CPLEX needs to solve the stop plan and the timetable at the same time. Moreover, the satisfaction of passenger travel demands is 33.8% lower than the case of 80 solutions. This result is caused by the CPLEX solver arranging all the trains with fewer stops at the front of the timetable. This will lead to unbalanced station stops, too few stops of trains in the early period and too many stops of trains in the later period. Furthermore, to meet the train-set position constraints, 12 trains needed to be dispatched, which will cause extra costs.

Conclusions
In this paper, an approach is proposed to solve the problem of scheduling the timetable and train-set circulation plan under the frequency switching scenario of the timetable. This approach considers the travel demands of passengers and the operational requirements of HSR. It can save the cost of railway operation department while realizing the state changing of train-set during the transition time.
Firstly, we design an inter programming model including section sequence for trainset, so that the operating distance can be decided based on each section's operating profits. We use CPLEX to solve the model in a very short time. By this model, we obtained a maximum benefit oriented primary train-set circulation plan, which will be matched with the stop plan.
Secondly, we design a method for solving the stop plan based on passenger travel demands. For the passenger travel demands, we adopted the travel demands decomposition method to covert the complex passenger travel demands into the service plan. Then we use CPLEX to calculate the stop plan according to the service plan efficiently.
Thirdly, we design the matching and adjusting method of the stop plan and the primary train-set circulation plan. In the method, we split the primary train-set circulation plan into different schemes at first. Then we match the schemes in the stop plan and the schemes in the train-set circulation plan by a customized GA we designed. After one-toone correspondence is determined between the schemes in the stop plan and schemes in the primary train-set circulation plan, the timetable can be calculated. Finally, the final train-set circulation plan and timetable are obtained.
Fourthly, we test the approach we proposed by the Beijing-Shanghai HSR. The results show that for the aspect of passenger travel demands, the approach proposed in this paper can meet 94.61% of passenger travel demands, and the solving efficiency is higher than the normal approach. What is more, it can save the costs of the operation department.
In the future, we will continue to take the practical application as the guidance to study the collaborative scheduling of timetable and train-set circulation plan: Firstly, some other algorithms can be used to improve the solving efficiency. We will try to use gradient methods and compare the solving efficiency and the quality of solutions between different algorithms.
Secondly, as there are always some stochastic effects that affect railway traffic, we will optimize the reserve deposit between train intervals to balance the railway traffic efficiency and robustness. Moreover, also, we need to study how to recover normal operation order as soon as possible after disturbance.
Thirdly, we will consider adding the maintenance mileage of the train into the model, which is urgently needed in practical applications. The maintenance of the train may affect the scheduling of the circulation plan of the train-set because, under the existing train-set utilization system, the train-set needs to be checked and repaired at specific locations, which may affect the stop position of the train.
Institutional Review Board Statement: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.