#### Abstract

It is a common practice to improve the punctuality of a railway service by the addition of time margins during the planning process of a timetable. Due to the capacity constraints of the railway network, a limited amount of time margins can be inserted. The paper presents a model and heuristic technique to find the better position for the limited amount of time margins (headway buffers and running time supplements) in a train timetable. The aim of reallocating the time margins is to adjust an existing timetable to minimize the sum of train delays at the event of the operational disturbances. The model consists of two basic parts. Firstly, the paper treats the train timetable as a Directed Arc Graph (DAG) with the aggregation concept and proposes a heuristic technique known as Critical Time Margins Allocation (CTMA), which is based on the critical path method (CPM), to reallocate the time margins. Secondly, the paper evaluates the original and modified timetable under different disturbed situations. The case study is developed on a hypothetical small railway network and a practical timetable of single-line train timetable for the track segment of Rawalpindi to Lalamusa, Pakistan. The results show that the timetable modified with the CTMA reduces the total delay time by an average of 3.25% for the small railway network and 5.18% for the large dataset. It suggests that adding the time supplements to the proper positions in a timetable can reduce the delay propagation and increase the robustness of the timetable.

#### 1. Introduction

The disturbances in railway traffic are caused by many factors within the system or from the external source. These disturbances are mainly classified into two main types based on the source from which the delays are originating; primary delays and secondary or knock-on delays. A primary delay is the schedule deviation from the planned timetable due to disruptions within the process. Due to the interdependencies between the trains, delays could further propagate to following trains in the rail network. Such delays are known as knock-on or secondary delays.

Due to the disruptions in the real-time railway operations, trains may not reach the destination on the planned time. In order to cope with the delays, at the planning stage, time supplements are added into the process time and headway buffers are added between the consecutive train movements at a track/station (as shown in Figure 1). Figure 1(a) explains the addition of the supplements into the run time. Figure 1(b) shows the buffers addition into the headway between the arrival and departure of a train at a station. Running time supplements may absorb the disturbances (or partial disturbances), whereas headway buffer times between the consecutive trains help to reduce the knock-on effects of delays.

**(a)**

**(b)**

Generally, the addition of time margins (headway buffers and running time supplements) increases the probability of a process to be carried out within the planned time; however, it also results in a problem that the process tends to utilize more time in reality because of the availability of more time. Moreover, the increment of each unit of time requires more resources which may have negative effects on the performance of the whole system. Thus, there is a tradeoff between the size of margins and the operating cost of the system, which should be assessed to decide the optimum size of the time margins [1]. In addition to the size of margins (stability), allocation of these elements among different processes (robustness) has also a significant role in improving a timetable.

Andersson et al. [2] defined a robust timetable as a timetable in which trains are able to keep their original train slots despite small primary delays and without causing unrecoverable delays to other trains. It is important to note that the reallocation of time supplements and buffers in the optimum places can improve the robustness of timetable against the small disturbances [3]. Figure 2 graphically represents a train timetable with two inbound and two outbound trains. The number of buffers before and after the conflicts/crossings is shown in a text form and the difference between the solid and dotted lines shows the run time supplements. Example in Figure 2 shows that two timetables have the same amount of margins. It is reasonable to state that the left one is more robust, because there is more flexibility for the train movements within the conflict points (delay absorption at the conflict points due to late arrival of conflicting trains) on the left diagram. The problem considered is to modify the original timetable by reallocating the planned time margins to the critical activities in the timetable.

**(a)**

**(b)**

Vromans [4] and Kroon et al. [3] concluded that it is hard to find the general rule for the margin allocation as it is dependent on the delay distribution. However, it is difficult to find the distributions of these delays which might have been changed over time. On the other hand, it is necessary to define the capacity of timetable to absorb the frequency and magnitude of delays at the design stage. Because the robust timetabling cannot decrease the values of initial disturbances, e.g., maintenance and breakdowns, however, it can absorb the reasonable number of smaller unpredictable delays. So, there is an acute need of a practically applicable approach to improve the timetable without having the detailed knowledge of the initial delay distribution at the design stage (Kroon et al. [3], Fahimeh and Peterson [1], and Zieger et al. [5]). In addition, the new approach should not be computationally complex and time consuming.

The scope of the paper is to improve the robustness by reallocating the available margins against the smaller unpredictable delays. The study proposes a heuristic technique to obtain a more robust timetable by fine-tuning a given timetable. Generation of a new timetable is not the aim of the research because timetables are made elaborately to reflect the passengers’ travel demand.

The paper aims to contribute to the research work on the robustness as follows:(1)The paper proposes the minor but significant adjustments to the train timetables at the design stage to increase the robustness against the daily life operational disturbances.(2)The paper presents the train timetable as Directed Arc Graph (DAG) and uses the sensitivity of the critical path method (CPM) technique to reallocate the margins. Model considers both runtime supplements and headway buffers for single track train timetables and reallocates the margins to the significant activities of the train timetable.(3)The significant contribution of the proposed modification is the generation of more robust results for the same capacity utilization.

The paper is organized as follows. Section 2 provides an overview of the related literature. Section 3 presents the detailed modeling methodology, including the introduction of the critical path method, modeling the train timetable as DAG, reallocation of time margins, and the delay evaluation model. Section 4 shows the experimental results with the detailed discussions on the shortcomings and significances of the paper. Section 5 concludes the paper.

#### 2. Literature Review

In the last two decades, researchers have developed various models for the time margins allocation [6]. These models can be generally divided into two categories: analytical models and simulation models.

The analytical model proposed by Huisman and Boucherie [7] focused on the secondary delays due to the speed differences of trains. Yuan [8] considered the acceleration and deceleration of trains for the route conflicts at stations and junctions and proposed a probabilistic delay propagation model to achieve an accurate estimation of delay propagation and train’s punctuality. Yuan and Hansen [9] further extended the probabilistic delay propagation model to optimally allocate the buffer times between the trains at the railway bottlenecks. Vansteenwegen and Oudheusden [10] estimated the ideal buffer times among train connections based on the delay distributions of the arriving trains and the weighting of different types of waiting times. Shafia et al. [11] proposed two different methods to measure the required buffer times under the assumption of unknown and known distribution functions of disturbances. Andersson et al. [2] modeled the robustness as the sum of time supplements and buffer times in the conflicting points in the timetable, known as critical points. Furthermore, in order to increase the robustness of timetable, Andersson et al. [2] presented the robustness in critical points (RCP) to formulate a MILP model with the objective to add the time margins in the critical points while minimizing the deviation from the planned timetable. Solinen et al. [12] presented the implementation of RCP and determined the impact of increased RCP value on the timetable performance. Abid et al. [13] extended the concept of RCP to single-track train timetables. Khoshniyat and Peterson [1] proposed travel time-based robustness improvement strategy to find out the minimum headways between trains.

The simulation models proposed by Hooghiemstra et al*. *[14] and Noordeen [15] forecasted the secondary delays. Although such models are detailed and useful for the analysis of the entire railway network, working with these models is time consuming and provides limited insight into the structural relationship between primary and secondary delays. The disadvantage has been overcome by the models based on the max-plus algebra, proposed by Goverde [16].

A new and promising approach to tackle the time supplement allocation is based on the two-stage resource modeling, which belongs to the theory of the stochastic optimization [17]. Stochasticity includes the random components in the models to take into account decision uncertainty [17]. The study by Caprara et al. [18] employed the stochastic optimization as one of the optimization problems in the railway systems. Two-stage resource models proposed by Vromans [4] and Kroon et al. [3] construct an optimal timetable in the first stage and evaluate the delays of the constructed timetable in the second stage. Khan and Zhou [19] also used a two-step stochastic optimization model to allocate the supplements and buffers with the objective of minimizing the real-time schedule deviation from the planned timetable. Moreover, based on the stochastic two-stage optimization, Goerigk and Schobel [20] proposed an approach called “recovery to optimality” where they minimized the recovery cost for each disturbed scenario to find the most robust timetable. A generic formulation for the buffering schedules is discussed by Burdett and Kozan [21]. Jovavonic et al. [19] presented a knapsack-based approach to allocate the buffer times in a train timetable. They allocated the buffers based on the train category, running time supplements for first train, and running time supplements for second train in the conflict. As compared to our approach, Jovavonic et al. [19] only allocates the buffers and do not consider the reallocation of runtime supplement explicitly in the model. Using max-plus algebra, Goverde [16] presented the concept of recovery matrix that contains the cumulative slack time on the critical path. Our approach further extends the concept of critical path by considering the sensitivity of critical path to reallocate the runtime margins and buffers based on delay impact significance of an activity in the network.

#### 3. Modeling Methodology

The section presents the modeling details. For the model, it is assumed that the timetable is given with the full details, such as arrival and departure (running) times of all trains at the stations (tracks). Input for this model is an initial timetable and output is an improved robust timetable. The proposed model has two parts: (i) timetable modification and (ii) evaluation. First part reallocates time margins and second part evaluates the timetable.

##### 3.1. Modeling the Train Timetable

A railway network consisting of main tracks, sidings, platforms, and junctions can be expressed as a general network G (V, A). The representation has been used by Jamili and Aghaee [22] and Murali et al. [23]. Each node represents the portion of track segments and other resources of railway network. We assume the traveling of train in the railway network as an activity of a directed acyclic graph. Table 1 shows the variables used in the model. It is assumed that train routes are predefined with the fixed segment running time for each train t at each segment(s). In addition, a railway line is considered to include segments(s), which contains the track portions and the stations. Moreover, each station has at least one siding for the crossing and overtaking maneuver. Train travelling on each segment is modeled as an activity . Thus, the whole timetable is expressed in the form of a set of activities (trains passing the tracks and stations) and train route is composed of a set of connected activities. To simplify the train network, it is assumed that if train t does not stop at a station (s) (the activity processing time =0), then it is not considered as an activity in the model. The processing time , for those activities which belong to the train conflicts at stations also contains the headway time and among the successive operations at a segment to ensure the safe operations.

##### 3.2. Critical Path

The critical path method (CPM) was originally developed in the project management field [24]. Projects are presented as acyclic networks using graph G (V, E), where vertices/nodes (V) are used to represent the state of the project and edges/arrows (E) are used to represent a task of the project as well as the relationship among different states. Time required to complete the task is used to label the arrows and nodes. Two special nodes, start (source) and end (sink), are introduced to represent the beginning and finishing of a project, respectively. Without the loss of generality, a source has no incoming activity while a sink has no outgoing activity. The minimum completion time of a project is followed by the longest path from source to sink, which is called the critical path. Figure 3 displays the conversion of a train timetable (Figure 3(a)) to a small network (Figure 3(b)) to calculate the critical path. Activities are represented by arcs on the network and ordered according to their start time. For example, slow train at first segment is activity 1 on arrow from start node to node 1. Duration of each activity is written on the top of arc. The durations of activities are added along the path to determine the total duration of a path. The critical path is the one having the longest duration. In this network, there are three paths: (i) Start-1-2-End, (ii) Start-1-2-4-End, and (iii) Start-3-4-End. Path (ii) is the critical one with the longest duration (i.e., 22 time units).

##### 3.3. Aggregation

The aggregation concept introduced by Murali et al. [23] is adopted to reduce the computational effort for the real-world case. In literature, Corman et al. [25] used the same concept for railway traffic management. The basic concept of aggregation is the combination of a sizeable portion of the network into a single node in the graph. Figure 4 shows an example of the aggregation concept for the train timetables. A small network with 6 stations and 5 single track lines is traversed by two outbound trains (from station A to station F) and one inbound train (from station F to station A). We hypothesize the conflicts as a reference point in the aggregation and one aggregated activity can add up all small activities from start of any activity till the start of a conflict, whereas a conflict itself is considered as a separate activity. Figure 4 illustrates this concept with dotted line ellipses encapsulating the aggregated activities.

##### 3.4. Critical Path Sensitivity and Robustness

One of the methodological issues involved with the CPM is that it does not consider the likelihood of any task of the schedule taking longer than the initially planned time duration [26]. Sensitivity analysis is usually executed to better understand the delay risk associated with the schedule [27]. To explain the delay sensitivity concept, the sensitivity of the activity’s duration is considered, which can make any path on the network a critical path. As shown in the presented example (Figure 3), a network can contain many paths. For example, in the presented network, there are three paths: (i) Start-1-2-End, (ii) Start-1-2-4-End, and (iii) Start-3-4-End. So an activity “Start-1” appears on two paths. As in the presented example, if the activity “3-4” takes 20 units of time, so the critical path will be path (iii) with 26 units of completion time.

Performing such an analysis provides an insight into the delay risk and the number of times of any particular activity occurring on the critical path. The larger frequency urges to examine the task and provide more time margins to ensure that activity will not negatively deviate from the scheduled duration. This is the basic principle which we use to reallocate the margins in the existing timetable.

According to the work by Bowman [28], it would be useful to treat the schedule performance measures as a function of an activity processing time. For instance, if we could view an activity’s criticality in terms of activity processing time, it would provide a better suggestion regarding the acceptable versus unacceptable range of time for an activity. Lengths of path and criticality measures are the most important parameters in this modeling. is the processing time of an activity in the whole network G (V, A). It will be used to determine the length of path p (), given by the following:In order to count the number of times that an activity appears on the path of a network, a binary variable is introduced:Summation of variable provides the total number of time that an activity takes place on the network.The approach hinges on the identification of the number of times that an activity happens on the network path P. The relationship between the length of path p () and critical path length is defined asDeterministic values of are used in this model, where an activity appears on the number of paths of different lengths. We establish the relationship between the critical path length and average length of paths on which an activity occurs. Sum of the path length with activity is written as

Average path length for activity in the network G (V, A) is written as

##### 3.5. Reallocation of the Margins

Reallocation of the margins is based on the assumption that each activity should have a suitable time margin. This ensures that the impact of any delayed activity will be minimized. Three margin reallocation equations are derived according to the number of times of an activity appearing on the network paths.Equation (7) ensures that the number of the margins to be reallocated should be equal to the number of margins in the original timetable:Equation (8) reallocates the margins based on the repetition of an activity on different paths in the network, while the following equations reallocate the margins considering the length of paths to which an activity belongs:In Critical Time Supplement Allocation (CTMA), the margin value is the average value of all these three allocation equations. Algorithm for reallocation of margins is shown in the next subsection.

In order to further ensure that the sum of margins to all activities will be equal to the total amount of margins in the timetable (M), the following equations set the boundary constraints that the sum of all fractions used in (8), (9), and (10) should equal 1:

*Algorithm CTMA*

*Step 1. *Obtain a set of trains (T), a set of segments (S), train routes (), planned start time of trains (), free running time for train t at segment s (), and total margins in the timetable .

*Step 2. *Determine the activities for each train route and chronically order them with respect to the start time.

*Step 3. *Generate a network G (V, A) by connecting the activities (). Nodes (V) represent the start time and the end time of activities.

*Step 4. *Determine the total number of paths (), process order within a path (), length of path p (), and length of critical path (). Finally, find the number of time activities () appearing on path (P), where is the sum of length of path on which activity () appears and is the average of length of path on which activity appears.

*Step 5. *Calculate the margin time () of activity at path p by using (2)–(5) and round off the value of to the near whole second.

##### 3.6. Evaluation

It is assumed that the orders of the train activities will be the same as the planned original timetable so the traffic control strategies are not included in the evaluation part of the model.Inequality (11) ensures that no train will start before the prespecified time at the origin. An activity cannot take more time than the duration of that activity that is applied by (12). Equation (13) puts the constraint on the minimum dwell times at the stations and (14) is to ensure the safe operations along the corridor by placing headways.

##### 3.7. Delays Calculation

The relationship among the external disturbances , the time supplement , and the delay is given byIn the model, the overall objective is to minimize the delay of trains. Thus, it can be written as

##### 3.8. Disturbance Distributions

In order to evaluate the improvements in the timetable, the primary delays are considered in the evaluation part of the model. In the paper, we used the random delays at each segment to evaluate the improvements. The random processing time of each activity is given bywhere denotes the random processing times of activities due to the disturbances and denotes the level of disturbances at each segment. is the delay in minutes for each activity.

#### 4. Computational Experiments

In this section, we present the computational results obtained from applying the CTMA margin reallocation to an example and the real-world case. Software Matlab is used for the experiments.

##### 4.1. Example

Figure 5(a) shows timetable for a small railway network. We assume that if the processing time for an activity is zero, it will not be considered in the model. For instance, in Figure 5(a), train 1 does not stop at station B so it will be not modeled as an activity. Figure 5(b) displays a directed acyclic network which is based on the activities of Figure 5(a). Ellipse represents the concept of aggregated nodes, which is implemented for the real-world case to reduce the computational efforts. The critical activities add up to 91 units of time length, shown with bold lines in Figure 5(b). Table 2 shows the calculations of the reallocated margins.

**(a)**

**(b)**

After the reallocation process, the delay evaluation is applied to the example. Results are generated by simulating the timetable for one hundred random scenarios of one minute delay to each segment. Average values of the delays are presented in Table 3. The results show that there is a little improvement for the example, where all trains are running at the same speeds and with the homogeneous characteristics.

##### 4.2. Real-World Case Description

The real-world case includes the railway track segment from Rawalpindi to Lalamusa in Pakistan. The segment is 156 KM long with a single-line track. Daily there are 30 trains scheduled over this track but only passenger trains are considered for this study.

Figure 6(a) shows the working train timetable for the selected track where X-axis and Y-axis plot the stations and the time, respectively. Conflicts among the trains are numbered from A to X in a chronological order. Figure 6(b) shows the network timetable, where “0” and “End” nodes indicate the start and completion of the network, respectively. Calculations according to the methodology proposed in the paper show the network containing 1520 paths and 489 minutes is the critical length for this network. The total amount of margins is 9186 seconds.

**(a)**

**(b)**

##### 4.3. Results of the Case Study

Table 3 shows the comparison of original timetable with the modified timetable for one-minute random delays. In order to reveal insights into the robustness of the modified timetable, we evaluated the timetable with a greater number of realizations. The results indicate that the same difference in the delay absorption is observed even for large number of realizations.

Experiments have also been conducted to find the efficiency of the modified timetable for a large number of disturbances (Table 3). Disturbances at each segment are increased from 1 to 10 minutes. Table 3 illustrates that as the disturbance level is increasing, the difference among the delay absorption and improvements (percentage increased in the delay absorption) by modifications of timetable is decreasing. Figures 7(a) and 7(b) illustrate that as the disturbance level is increasing, the difference among the delay absorption and improvements (percentage increased in the delay absorption) by modifications of timetable is decreasing.

**(a)**

**(b)**

From Figures 8–11, it can be observed that the modified timetable can handle the disturbances better than the original timetable. The X-axis (activities) in these figures shows the sequence of activities in the network. Figure 8 presents the behaviors of original and modified timetables against the random disturbances. Red line with circles represents the data points of original timetable, the modified timetable is represented by the blue dotted line, and the difference of both timetables is shown in green (delays = original timetable delay - modified timetable delay). Negative value on the green curve points out the activity in the original timetable which has performed better than the modified one. Activities of the formulated network in Figure 5 are shown in the Appendix which provides the detailed calculations of time margins for the real-world formulated network. Activities are numbered based on the time of their occurrence.

From Figure 8, we can see the intricate pattern of delay absorption behavior of all activities. In order to analyze the impact of delays at the train conflicting points, we divide Figure 8 into two components: the delays at the conflict points (Figure 9) and the delays of all remaining activities in the timetable (Figure 10). In these figures, delays are perpetuated with the passage of time and more delays are observed at the conflicting points and their neighboring activities. The reason behind this phenomenon can be explained by the fact that the conflicting points are fixed and prone to delays. The interaction of conflicting trains can cause the deviation from the planned schedule, if any of the trains get delayed. Furthermore, during the delay evaluation, the order of trains and headways are maintained according to the original timetable while traffic management rules are not applied. So, the activities associated with these conflicting points have less room for the delay absorption and the delays are propagated through the network.

Figure 11 shows the delay values for activities at the critical path of the network. Critical path is the real depiction of delay propagation, because delaying this path can expand the makespan of the entire network. Comparison of these figures shows that the timetable modified by CTMA can absorb the random disturbances in a more efficient manner as compared to the original timetable. Furthermore, the improvement (in terms of delay absorption) for critical path activities is 9.57%, as compared to 4.35% for the conflicting activities and 2.78% for all other remaining activities.

#### 5. Conclusions and Future Recommendations

The study proposes a model to reallocate the margins in the train timetables with the objective of minimizing the average delays of trains under daily life disturbed operations. Results show the delay resistance efficiency of the timetable can be improved by the application of the proposed methodology; however, the improvement is limited. After a certain amount of delay, both original and modified timetables behave in the same manner.

In the current model, it is assumed that the order of trains in the modified timetable is the same as the original one. However, the model can be extended by integrating the simultaneous routing and scheduling approach.

Moreover, the current solution algorithm aims to improve the existing timetable by only reallocating the existing margins. Extension of this work may consider the addition of more time margins and explore the tradeoff among the capacity utilization and the robustness of the train timetable.

#### Appendix

See Table 4.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare no conflicts of interest.

#### Acknowledgments

The authors are thankful to anonymous reviewers for their valuable comments. This paper is supported by the Fundamental Research Funds for the Central Universities of China (Project no. 2018JBZ006).