Scheduling Extra Train Paths Into Cyclic Timetable Based on the Genetic Algorithm

In order to support the process of scheduling a hybrid cyclic timetable, this paper is devoted to inserting additional non-cyclic train paths into existing cyclic timetable. The adding train paths problem is an integration of timetable scheduling and rescheduling problem. The train dispatcher can not only modify the given timetable to manage the interruptions in existing operations, but also establish schedules for additional trains. A multi-objective model minimizing both the travel time of additional trains and the variation of existing trains is proposed in this paper. In addition, we consider both general constraints and some additional practical constraints, such as the overtaking priority constraint, reasonable adjustment of initial schedules and the scheduled connections. This problem is very difficult and must be solved in practice. A heuristic algorithm is introduced to find high-quality solutions for large-scale cases within reasonable computing time. Based on high-speed railway line in China, the case studies illustrate the methodology and compare the performance of trains. Numerical experiments indicate that the proposed solution approach to the adding train paths problem is promising.


I. INTRODUCTION
In 1931, Dutch scholar proposed the concept of the cyclic timetable with a cycle time of one hour. Subsequently, other European countries adjusted the cycle time according to their own conditions and formed a multi-mode cyclic timetable which is widely adopted by European railways.
Cyclic timetable refers to the timetable mode in which the trains are operated in the same way in each cycle time period T (usually 1 hour) of the basic timetable, that is, the number, order and speed of the trains are all the same. Trains with the same order in each cycle have the same departure, arrival time and stop plan. Train departure time and stop plan are relatively fixed in each cycle, and the train connection plan is the same in each period. The connection between each train are thus more flexible. Even when delay occurs, The associate editor coordinating the review of this manuscript and approving it for publication was Sabah Mohammed . the connection will back to normal after one cycle time T , which greatly facilitates the travel of passengers.
Moreover, in addition to its significant advantages, the cyclic timetable may, on the other hand, incur higher costs than non-cyclic ones. Although the occupation degree of late evening trains is much lower during the rest of the day, a cyclic timetable orders the same train service. Generally, there is only one way to reduce systems capacity during off-peak hours, namely modifying the lengths of the trains. It is believed that the reduction in off-peak hours affects the train-set costs and crew costs as shorter trains require fewer conductors [10]) Actually, the mixed operation policy with various types of passenger trains, such as the long distance, low frequency and night trains, is carried out in China's high-speed railway (HSR), which requires more developed timetable planning methodologies and techniques. Therefore, the cyclic timetable can only be considered in the lines with no prominent inappropriate operation requirements and disadvantages, such as some relatively short lines with high frequency commuting train services. With low frequency train services and long-distance HSR lines, a pure cyclic timetable is not suitable to be applied. If these low frequency trains are scheduled as cyclic ones, it will lead to capacity waste. Consequently, a hybrid timetable concept called ''cyclic + non-cyclic'' timetable is possible, which is a cyclic core timetable, where non-cyclic trains such as low frequency and long-distance trains are inserted as additional trains. Nowadays, although models and algorithms of cyclic timetabling have been developed very well, there is still an important research demand for the technique of inserting additional trains into an existing cyclic timetable.
Based on this background, this paper studies the adding train paths (ATP) problem for dispatching additional trains in an initial cyclic timetable. This problem is very difficult and must be solved in practice.
The structure of this paper is as follows. Section 2 summarizes the related work. In Section 3, we propose the ATP problem based on event-activity graph. A heuristic algorithm based on genetic algorithm is presented in Section 4. In Section 5, an experiment of the formulas and the algorithm is carried out by taking China HSR as an example. Discussions, as well as future work and conclusions, will eventually take place in Section 6.

II. LITERATURE REVIEW
The ATP problem is an integration of timetable scheduling and rescheduling problem. The train dispatcher can not only modify the given timetable to manage the interruptions in existing operations, but also establish schedules for additional trains.
The approaches and models of timetable scheduling (TS) and timetable rescheduling (TR) problems are also suitable for the ATP problem in theory. Most importantly, the differences between these three problems should be identified in mind. Table 1 gives the comparison of timetable scheduling, rescheduling and adding train paths problem.

A. TIMETABLE SCHEDULING AND RESCHEDULING
The TS and TR problems have been widely studied in the literatures. From investigations of the problem, it consists of the cyclic and non-cyclic versions. The model and algorithm of scheduling non-cyclic and cyclic timetables are distinguished.
Models used by most researchers to solve cyclic timetabling problem are based on the Periodic Event Scheduling Problem (PESP) proposed by [21]. Reference [12] considered a model for the cyclic railway timetabling problem for NS based on PESP. His model considered the main requirements of Dutch timetables, such as connections, synchronization, variable trip times, rolling stocks, etc. Several approaches for non-cyclic timetabling was proposed. They had totally different focus in terms of infrastructure characteristics, objectives and organization. We refer to [14] and [28] for investigations on this problem. Regarding the applied objectives, no real dominating objective function could be found, but the total travel time tended to be minimized. References [5] and [20] considered minimizing travel time in TS. Reference [20] proposed a MILP model with variable departure and arrival times. They applied the model on a network consisting of Belgian IC trains and dealt with the competition between excess journey time and transfer time. Reference [5] proposed a MIP model with variable speed, and they used sharp upper bounds of the objective function based on the bisection method to reduce the number of binary variables by ignoring those associated with inactive constraints.
Reference [15] took into account flexible train paths in a MIP model and built a timetable based on the preselected route by using genetic algorithm. Reference [11] modeled the train scheduling problem as a job-shop scheduling problem with blocking constraints. Based on both two different transformation approaches of parallel tracks and two different types of decision variables, four MIP formulas without time-indexed variables were developed. Reference [22] introduced variable speed in a MIP model, and designed a branch-and-bound algorithm, as well as a new heuristic beam search (BS) algorithm to solve the large-scale problem. Reference [1] aimed to maximize the line frequency based on a simulation model. Rail timetable was regarded as a homogeneous traffic without overtaking. A genetic algorithm was proposed to determine the train sequence quickly for reducing the period. If there occurs disruptions or disturbance, the timetable must be rescheduled to resolve the conflicts. Trains can be adjusted by rescheduling departure or arrival times at stations, and selecting a new route from a group of feasible routes inside or between stations. In order to determine a conflict-free timetable, we refer to [4] for investigations on this problem, meanwhile, we extend and transfer the Alternative Graph Model and Event-Activity Graph Model to describe and formulate train rescheduling problem.
Much research related to TR at a microscopic level is based on the Alternative Graph Model. Reference [6] extended the laboratory scheduling support tool ROMA to deal with more saturated railway networks and complex infrastructure configurations. Reference [7] put forward a delay management model which focused on the impact of rescheduling decisions on the service quality of passengers. A new lower bound was proposed, which consisted of solutions to a set of min-cost flow problems with activation constraints.
Based on Event-Activity Graph Model, [17] proposed a first Mixed Integer Programming (MIP) formulation, which was further developed by [16] and [18]. Reference [25] considered the timetable at a macroscopic level which focused on station capacity. A MIP model is proposed to minimize the number of canceled and delayed trains. Reference [13] established an integer programming models to adjust a timetable in case of partial and complete blockades. They maximized the service level provided to passengers by reducing the delays of the operated trains and the number of canceled trains. Reference [30] presented a new passenger assignment model based on scheduling during major interruptions, which considered the passengers starting travelling before, during and after the interruptions. The model considered time-dependent passenger demand, service variations and vehicle capacity constraints to track individual travels, which was helpful to evaluate a interrupted timetable based on passenger orientation. Reference [19] modified existing delay management models to take the trickle-in effect into account. An IP model was established, which could minimize the sum of all delays of all events and punish all missed connections.

B. ADDING TRAIN PATHS PROBLEM
Although the technology of inserting additional trains is very important, there has been few direct related discussion about the ATP problem. As far as we know, the only papers are presented in Table 2, which summarizes the researches similar to ours, involving inserting passenger or freight trains into an existing timetable.
With the fixed speed of the initial trains [9] and [10] solved the problem of adding freights trains in the initial timetable. Reference [10] predefined ideal departure/arrival time and proposed an Integer Linear Programming (ILP) model with the purpose of maximizing the number of additional trains and minimizing the violations to the ideal insertion. In [9] more constraints were considered to minimize the average traversal time of additional trains. Reference [8] supported railway planners by calculating a set of Pareto optimal solutions for travel time and expected delay of additional trains. A shortest path algorithm was proposed to solve the problem. Based on an Alternative Graph Model [2] and [23] solved the problem of adding passenger trains. Reference [2] put forward an inserting process, which contained 3 phases, by fixing or unfixing some scheduled services. The station capacity was implicitly modelled as an intermediate storage area (buffer) with the capacity constraint. The buffer occupancy violations were identified and resolved. In order to minimize makespan, constructive algorithms and improved meta-heuristic were proposed. Reference [23] added additional trains in real-time. In order to meet the limited time requirement and minimize deviations to the existing timetable, there was no need to consider all of the scheduled trains. Train modification, including removing or reordering, could be implemented if and only if it was possible to lead to a better solution. In this paper, the ATP problem was divided into three sub-problems. Firstly, they found the optimal insertion for a fixed order timetable, and then retimed and reordered the trains. These three sub-problems were solved iteratively until there was no possible improvement within a time limit of computation. Reference [26] developed a computer-based model with pre-defined extension and compression of train running and dwell time to consider the competition for railway infrastructure between new and existing services. Based on the Event-Activity Graph [27] formulated a general Mixed Integer Program (MIP) model involving the acceleration and deceleration times, priority for overtaking, allowable adjustments, cyclic structure and services frequency, and the total adjustments for initial trains VOLUME 8, 2020  was minimized. Reference [25] further considered train-set or rolling stock constraints and proposed a MIP to minimize the total adjustments for initial trains as well as the number of required train-sets.
Our paper is different from the previous ones. In this paper, we propose a multi-objective model to deal with the ATP problem. Firstly, we consider three objectives. For initial trains, we minimize the variation of exiting cyclic trains as well as the number of missed scheduled connections, and for additional trains, we minimize the total travel time in order to get good service quality. Secondly, we consider both general constraints and several additional practical constraints, such as the overtaking priority constraint, reasonable adjustment of initial schedules and the scheduled connections. They are considered based on the practical concerns. Moreover, we develop a heuristic algorithm to find high-quality solutions for large-scale cases within reasonable computing time.
This paper can be divided into three parts. Firstly, we present a MIP model based on the event-activity graph. Secondly, a heuristic algorithm is presented based on genetic algorithm. Finally, we apply the approach to an initial daily cyclic timetable a double-tracked HSR in China. In this part, we evaluate the approach with the quality of timetable, the periodicity of timetable and little destruction of transfer plan.

III. MATHEMATICAL FORMULATION
In order to deal with the ATP, we present a general mixed integer program (MIP) model. This model is described based on the event-activity graph. In section 3.1 we briefly recall this graph representation. The constraints and objectives are described in sections 3.2 and 3.3, respectively.

A. EVENT-ACTIVITY GRAPH REPRESENTATION
Event-activity network is a mathematical model widely used for scheduling of events with time constraints. In an eventactivity graph G = (V , E), events are represented as nodes V and directed edges E are used to represent activities. In the event-activity graph, an activity which connects two events models a precedence constraint between those events. Lower bounds are assigned to activities on durations, so the scheduled time of the end event of an activity has to be larger than or equal to the scheduled time of the start event plus the lower bound. Figure 1 shows the corresponding event-activity graph to the railway timetabling problem.
The set V of events consists of all arrival events and departure events, i.e. V = V arr ∪ V dep , The events of set V are linked by directed edge set E, which are called activities and consists: • Trip activities: E trip ⊂ V dep × V arr model a train travel between two consecutive stations.
• Dwell activates: E dwell ⊂ V arr ×V dep model the stopping of a train at a station.
• Changing activities: E change ⊂ V arr × V dep model transfer connection between two trains.
• Headway activities: E headway ⊂ V dep ×V dep ×V arr ×V arr model the security headway between two consecutive departures and arrivals at the same station.

B. CONSTRAINTS OF ATP PROBLEM
The input parameters and general subscripts used in the proposed model are listed in Table 3. The decision variables in the proposed optimization model are described Table 4. Then constraints for the double-track ATP model are presented as the following,

1) REASONABLE TIME WINDOW
The departure and arrival of the train should be within the specified time window, which can be expressed as follows:

2) VARIABLE TRIP TIME ON SEGMENT
These constraints consider the speed variation dynamics. The trip time in section is flexible between the minimal trip min e and the maximal trip max e . In addition, when train stops the corresponding actual trip time has to consider the required acceleration time acc and deceleration time dec exactly, which can be expressed as follows:

3) DWELL TIME AT STATION
Train must stop at all stations at which it calls (i.e. pls i = 1, else pls i = 0). For operational requirements, the model allow the extension of a scheduled stop and additional stops are permitted. Due to commercial and operating reasons, stopping time must be bounded.

4) MINIMUM HEADWAY
The minimum headway requirements must be considered between the departure times and arrival times of consecutive trains at the same station. In addition, trains can not overtake each other on a section, which is guaranteed by constraint (10).

5) OVERTAKING
The constraints of priority for overtaking (11)(12) enforce that train of higher priority can not be overtaken by a lower one.

6) ADJUSTMENT OF INITIAL SCHEDULES
Constraints (13)(14) record the magnitude of the right or left shifts ad i of every initial event i.

7) CONNECTION
Constraint (15) describes whether a scheduled connection is kept or be damaged due to the insertion of extra trains.
x j − x i ≥ con e − M · c e ∀ e = (i, j) ∈ E change (15) Operator preferences :

C. OBJECTIVE FUNCTION
The objective function of the ATP is to minimize the adjustments compared to the initial train schedules and get good service quality for additional new trains. The adjustments include the variation of exiting cyclic trains (Z 1 ), and the number of missed scheduled connections (Z 3 ). The service quality of non-cyclic trains is valued by travel time (Z 2 ). In order to have consistent measurement units, we define a coefficient α to convert the number of kept scheduled connections to the equivalent time consumption. The final objective function is expressed as The first objective of this problem is to minimize the variation of initial schedules for existing cyclic trains, i.e., The values of ty t(i) and sy s(i) determine the weights of influences for the adjustments of various trains and on various stations, respectively. The second objective is to minimize the total travel time for additional trains, i.e., (20) and the third objective is to minimize the number of undermined original connections, i.e.,

IV. SOLUTION APPROACH
Considering the large numbers of constraints and variables used in the mathematical formulation, we decide to develop a heuristic algorithm based on genetic algorithm (GA) in order to obtain good quality solutions to the ATP in real-world applications in reasonable computing times.

A. GENERAL FRAMEWORK OF SOLVING ATP BASED ON GENETIC ALGORITHM
The general framework of GA to solve ATP is shown in Figure 2. The algorithm is executed for a given number of iterations. At each iteration, trains are considered one at a time in a predetermined order (described below), and a schedule is computed following the constraints. The GA VOLUME 8, 2020  includes the following elements: encoding, population size, initial population, fitness function, crossover, mutation, population regeneration and ending conditions. Specifically, the approach to solve the formulation is as follows, Step 1: (Input data) Read the information of initial timetable and additional trains.
Step 2: (Encoding) Taking train ID as gene, the chromosome is composed of N + N add genes in a fixed sequence at the original station, where N + N add is the number of trains in the new timetable after insertion.
Step 3: (Initial population) The initial population generation is obtained through choosing a train service ID sequence at the original station randomly. If necessary, a train operator and its trains can be prioritized by generating genes of high-priority trains in the earlier part of a chromosome. The train timetable is formed by considering genes sequentially in a chromosome. Step 4: (Fitness function) The fitness function is defined to be the same as the objective function. Based on the train sequence at the original station, the process to determine the train schedule is divided into two steps, (A) determining the departure train order at intermediate stations according the arrival sequence and overtaking constraints. Then the values of λ ij = 1 can be obtained through the chosen train sequence, which is named Procedure CreatOrder and shown in Figure 3. (B) determining the arrival and departure time at each station, considering dwell time, trip time, headway and so on. Then values of x i and ρ i can be calculated using timetable procedure, which is named Procedure CreatTime and shown in Figure 4. Formulas (13)(14)(15) can be used to calculate the value of ad i and c e , and with formulas (18)(19)(20)(21), the objective value can be calculated.
Step 5: (Reproduction selection) The new chromosomes are selected using the method of roulette wheel. The probability of selecting a chromosome can be seen as spinning a roulette wheel with the size of the segment for each chromosome being proportional to its fitness function value. The fittest individual occupies the largest segment, whereas the least fit have correspondingly smaller segment within the roulette wheel. Obviously, those with the best fitness values are more likely to be chosen.
Step 6: (Crossover and mutation) The chromosomes in the new population are randomly paired. Each pair of genes in the two paired chromosomes are exchanged with a probability, which is usually set between 0.5 and 0.8.
Step 7: (Management of generations) If the number of generations reaches at population size, output the saved best solution.

V. CASE STUDY A. TEST DATA SET
The approach has been applied to a HSR in China. This rail line consists of double-tracked HSR lines with 21 major stations. The cyclic nature of the timetable is illustrated in Figure 5. The traffic data of an initial daily cyclic timetable includes 186 trains in one direction (from station BJ to SH), including 157 and 29 trains of high-speed and medium-speed trains with maximum speed 350 km/h and 250km/h, respectively. The total number of 43 connections are set in the initial timetable.
In the experiments, minimum headways are set to 3 minutes for both consecutive arrivals and departures. Acceleration and deceleration times are set to 2 and 1 minutes respectively for both high-speed and medium-speed trains. The minimum transfer time for a connection is 15min. In addition, considering the variable velocity, maximum trip time is set to 120% (w.r.t. the minimum trip time).
Based on the initial cyclic timetable, 10 trains with various stop pattern and speed are planned to insert as extra services. The train type, running sections and stop plan of each train are shown in Figure 6.

B. RESULT OF CASE STUDY
The test was done to validate the GA performance for inserting additional train services with respect to solution quality. Figure 7 illustrates the solution for inserting 10 trains, where the initial and extra trains are represented by blue and red lines, respectively.

1) THE QUALITY OF TIMETABLE
Calculate the indicators before and after inserting. The results are shown in Table 5.
Furthermore, before inserting, the average dwell time for high-speed trains and medium-speed trains at each station is 2.3 min and 7.6 min each time, while after inserting, this time become 2.8min and 8.8 min respectively.

2) THE PERIODICITY OF TIMETABLE
From an application viewpoint, periodicity is an advantage for the passengers due to the same departure time in each cycle time. The periodicity of the departure time of each train at its origin station is even more important for the following reasons: a) The periodicity of the departure time of the trains can ensure the periodicity of the whole train timetable to great extent. b) In origin station, the trains usually carry a large number of passenger flow. If the trains' departure time remains cyclical, it will facilitate the travel of most passengers. VOLUME 8, 2020  c) The origin station usually used as a connection point of existing lines and high-speed lines. The train's departure time at these stations is relatively fixed to ensure that the transfer plan between the existing lines and high-speed lines, providing the transfer passengers with convenience. Therefore, the change of departure time in origin station and the deviation to the periodic structure is an important indicator of periodicity for a timetable. Figure 8 shows the distribution of the departure-time and arrival-time adjustment of initial trains at the station of origin and destination, respectively, for the final GA solution. It shows that 81.7% of the trains have the same departure time at the original station as it in the initial cyclic timetable, and about 73.1% arrival times at destinations of the scheduled trains are shift less than 15 min from those requested by inserting new trains. The periodic structure of the original cycle diagram is implied to be guaranteed to a large extent, which is provides a convenient travel to passengers.

3) THE DESTRUCTION OF TRANSFER PLAN
One of the most important aspects of the cyclic timetable is its cyclic connections. After inserting the trains, it is particularly important to measure the destruction of its cyclic connections.
If there is an connection between t 1 and t 2 , where t 1 is the preceding train of t 2 . The transfer time in initial timetable is T , while the time changes to T after inserting    Table 6.
From this analysis, the train timetable after inserting has largely maintained the original periodicity, and the insertion is relatively effective.

VI. CONCLUSION
In this paper, we deal with the ATP problem based on an event-activity network. We propose a MIP model considering both the general constraints, such as headways, dwell times, flexible running times and time windows, and the real-world constraints, which concerning priority for overtaking and the scheduled connections. In order to get a new timetable with high quality of both the additional trains and the initial trains, our objective function consists of three parts. The variation of exiting cyclic trains and the number of missed scheduled connections are minimized to keep the adjustments reasonable, and the travel time is measured to ensure the high quality for additional trains. We also develop a heuristic algorithm to find high-quality solutions for large-scale case within reasonable computing time. The test illustrates the efficiency of the approach with the quality of timetable, the periodicity of timetable and little destruction of transfer plan. The computational tests show that a multi-objective function can yield a substantial increase in the quality of the obtained insertions when the initial timetable can be changed.
The technique of inserting additional trains into an existing cyclic timetable is not only practical in ''cyclic + non-cyclic'' timetable, but also useful in short-term planning that concerns the redevelopment of a generic timetable in order to adapt to the demands of the individual weeks or days. The additional trains are inserted while taking the structure of the planned timetable into account. Therefore, the number of the trains is increased with little disruption to the existing services.