Optimal running time supplement distribution in train schedules for energy-efficient train control

Abstract Energy-efficient train driving can lead to a significant reduction in both CO2 emissions and energy consumption. A lot of research has been done on the topic of energy-efficient train control that minimizes total traction energy consumption. Furthermore, the running time supplements in the timetable determine the possibilities for energy-efficient train driving. However, research on the distribution of these supplements in order to maximize the potential for energy-efficient train driving is limited. This paper considers the multiple-section train trajectory optimization problem, which aims at finding the optimal distribution of running time supplements over multiple stops for a single train given a total scheduled running time in order to maximize the potential for energy-efficient train driving. In addition, we compare two different methods to compute the energy-efficient train control: an indirect solution method and a direct solution method. We applied both methods to a Dutch case study for an Intercity train between the stations Utrecht Central and Arnhem Central. The running time supplement distribution that minimizes the total energy use for a train has the same cruising speed on each section. Furthermore, the shorter the distance between stops, the larger the relative running time supplement. The indirect solution method generates results very quickly compared to the direct solution method and can be used for real-time control. The direct solution method is able to provide direct feedback on the necessary optimality conditions and does not require a specialized code to generate the optimal speed trajectory profile, therefore, it is useful for exploring new variants of the optimal control problem.


Introduction
Energy efficiency is an important topic for railway companies wishing to reduce CO 2 emissions and save money. One of the research areas to improve the energy efficiency of railways is energy-efficient train control (EETC). EETC is an optimal control problem with the aim of finding the driving strategy or trajectory that meets the timetable with the lowest energy consumption. The potential for EETC is by the Energymiser package in real-time on board very fast trains. Examples can be found in Howlett and Pudney (1995), Khmelnitsky (2000), Liu and Golovitcher (2003), and Albrecht et al. (2016a, b).
A second way to solve the EETC problem is by using direct solution methods, mainly applied in aerospace applications (Ross and Karpenko, 2012). These methods first discretize the optimal control problem and then transcribe it to a nonlinear programming (NLP) problem that is solved using standard NLP solvers (Betts, 2010). The direct solution methods do not assume a priori knowledge of the optimal control structure, but they are in general slower and less accurate than dedicated indirect algorithms. Examples of these methods applied to optimal train control can be found in Wang et al. (2013Wang et al. ( , 2014, Ye and Liu (2016), Wang and Goverde (2016a, b, 2017, Scheepmaker and Goverde (2016), and Scheepmaker et al. (2019).
Heuristics approach the optimal control problem by using artificial intelligence or search algorithms, but they do not provide any information about the quality of the solution. Some examples can be found in Chevrier et al. (2013), Sicre et al. (2014), and Haahr et al. (2017). The indirect and direct solution methods give results that numerically approximate the solution of the optimal control problem. However, a comparison of the two methods applied on the same case study is, to our knowledge, not considered in the literature. Therefore, we compare an indirect and a direct solution method in order to determine the advantages and disadvantages of both models and to see if they generate similar results.
The aim of this paper is to find the optimal distribution of the running time supplements over multiple stops for a single train given a total scheduled running time, and the full availability of the supplements to be used for energy-efficient train driving, and to compare an indirect solution method with a direct solution method in order to compute the optimal control. The purpose of the optimal running time supplement distribution in our paper is to determine the optimal allocation of supplements over multiple stops in order to minimize total traction energy consumption of a train run (i.e. to maximize the usage of EETC by the train). These insights can be used for timetable design to determine the energy-optimal timetable. Therefore, the following contributions to the literature are made: � A model for the optimal running time supplement distribution over multiple stops given a total scheduled running time by including intermediate speed constraints with the objective of minimizing the total traction energy consumption of a single train. � Implementation and application of the optimal running time supplement distribution model in a generic direct solution method by using the MATLAB toolbox GPOPS. � Application of an indirect method using the knowledge that the optimal distribution of time supplements must have the same optimal cruising speed between each pair of stops by using the Driver Advisory System (DAS) Energymiser. � A comparison between the indirect and direct solution methods for both the minimum-time and energy-efficient train control problem on different case studies.
The paper is structured as follows. In Section 2 the optimal control problem is discussed for minimum time and energy-efficient train driving over multiple stops in order to find the optimal running time supplement distribution. Section 3 discusses the indirect and direct methods used to compute the driving strategies. Section 4 contains a case study that applies both models and compares the results. Finally, the conclusion and discussion are presented in Section 5.

Optimal control and running time supplement distribution
This section considers the optimal control problem for a multiple-section trajectory in order to determine the optimal distribution of the running time supplements given the total scheduled running time. The optimal control problem is formulated and we derive the necessary optimality conditions by applying Pontryagin's Maximum Principle. We consider only mechanical braking (MeB), because we would like to show the general principles of the optimal distribution of the running time supplements and we do not consider interaction with other trains. In addition, Scheepmaker et al. (2019) showed that regenerative braking has little impact on the structure of an optimal journey.
The derivation of the optimal control problems is based on earlier work of Howlett (2000), Khmelnitsky (2000), Liu and Golovitcher (2003), and Albrecht et al. (2016a, b). Although we build on the current literature, we do include new elements and insights. In particular, we consider minimizing the energy consumption over multiple stops (i.e., different objective function see Eq. (1)) by including intermediate speed constraints (see Eq. (9)). Therefore, we need to derive the optimal control structure to see what the influence is on the necessary optimality conditions. Moreover, these conditions are used to verify if the model results of the direct solution method are in line with the optimality conditions. In our problem formulation we consider distance as the independent variable, because the speed limit and gradient are related to the distance. In addition, we separate the control u [m/s 2 ] into specific traction force f [m/s 2 ] and specific mechanical braking force b [m/s 2 ], that is, u ¼ f þ b. The specific force is computed by dividing the total traction force F [N] or braking B force [N] over the equivalent mass, which is given by the actual mass m [kg] times the rotating mass factor ρ [-]), that is, f ¼ FðtÞ=ðρmÞ and b ¼ BðtÞ=ðρmÞ.
Section 2.1 considers the energy-efficient train control problem over multiple stops by including intermediate speed constraints that minimizes the total amount of traction energy of a train run. Section 2.2 briefly discusses the minimum time train control problem over multiple stops that minimizes the total running time of a train.

Energy-efficient train control
In this section we discuss energy-efficient train control over multiple sections between successive stops with mechanical braking. The optimal control problem can be defined to minimize total traction energy J [m 2 /s 2 ] over a railway line with nÀ 1 sections over given stop positions ðs 0 ; …; s n Þ with a total scheduled running time T [s]: (1) subject to the constraints  (9). The specific traction f is bounded by the maximum specific traction force f max and the specific braking force b is bounded by the maximum specific braking force À b min . In addition, the specific traction control is also limited by the specific power of the train p [m 2 /s 3 ], which is limited by the maximum specific power p max . The specific traction force is thus bounded by a constant part depending on the maximum specific traction force and a hyperbolic part depending on the specific power of the train, that is, f � fðvÞ ¼ minðf max ;p max =vÞ; see Fig. 1. Note that the train cannot apply both traction and braking at the same time, that is, fb ¼ 0. The total specific train resistance consists of the specific train resistance rðvÞ [m/s 2 ] and the specific line resistance gðsÞ [m/s 2 ]. The Davis equation rðvÞ ¼ r 0 þ r 1 v þ r 2 v 2 gives the specific train resistance and consists of non-negative coefficients r 0 ; r 1 � 0 and r 2 > 0 ( Davis, 1926). Gradients gðsÞ determine the specific line resistance with gðsÞ > 0 indicating uphill slopes and gðsÞ < 0 downhill slopes. The speed v is bounded by the speed limit v max . We assume piecewise-constant speed limits and gradients over the complete trajectory.
We now summarize the necessary optimality conditions. The Hamiltonian H [m/s 2 ] is defined as Differential equation (12) shows that costate λ 1 ðsÞ � λ 1 is constant.
We are now able to apply Pontryagin's Maximum Principle on the optimal control problem to maximize the Hamiltonian (Pontryagin et al., 1962). In addition, by applying the Karush-Kuhn-Tucker (KKT) conditions (stationary and complementary slackness) on the augmented Hamiltonian (Bertsekas, 1999), we are able to derive the optimal control structure consisting of the following driving regimes: The first driving regime is maximum acceleration (MA), in which the train applies the minimum of the maximum specific traction force f max and the maximum specific traction power divided by speed p max =v. During coasting (CO) the train applies zero control, that is, The driving regime MB uses maximum braking À b min . The other two regimes are singular solutions with cruising, where a balance is found between the traction or braking force and the total resistance force. The driving regime CR1 (λ 2 ðsÞ ¼ vðsÞ) has cruising with partial traction. The second singular solution CR2 (λ 2 ðsÞ ¼ 0) has cruising with partial braking, which might be needed during steep downhill slopes at the speed limit. The switching points between the different driving regimes are determined by the value of λ 2 .
Although we have established that the optimal speed profile has essentially the same structure on each separate timed section we have not addressed the problem of finding the optimal prescribed times for each such section given that the total journey time must remain fixed. In fact it has been shown elsewhere (Howlett, 2016) that the optimal section running times are those that are obtained by using the same optimal cruising speed on each timed section.

Minimum-time train control
This section considers the minimum-time train control problem over multiple sections. The problem formulation is similar to the energy-efficient problem definition described in Section 2.1. The aim of minimum time train control (MTTC) is to minimize the total running time of the train J [s]: subject to the Eqs.
(2)-(7), (9), and the endpoint condition where the final time tðs n Þ is free. The derivation of the optimal control structure is similar to the EETC problem in Section 1. Therefore, we only show the resulting optimal control structure and the resulting value of λ 1 derived from the endpoint Lagrangian. The optimal control structure consists of the following driving regimes: Similar to the EETC structure, the MTTC structure includes the driving regimes MA and MB. Moreover, the cruising (CR) phase indicates cruising at the speed limit v max by traction (CR1) or braking (CR2), depending on the sign of the total resistance. In addition, the transversality conditions of the endpoint Lagrangian indicate that λ 1 � À 1, which can be used to validate the model results.

Method
Given the optimal control problems (MTTC and EETC) over multiple sections to determine the optimal running time supplement distribution, the next step is to use methods to solve these problems. We consider two different methods to solve the optimal control problems and to find the optimal running time supplement distribution. We first discuss the indirect solution method used by the algorithm of the Energymiser Driver Advisory System. Then we discuss the direct pseudospectral solution method which we call PROMO (PseudospectRal Optimal train control MOdel) that is applied in an algorithm in the toolbox GPOPS in MATLAB to solve the optimal train control problems.

Indirect solution method
The indirect method is used by the algorithm of the Energymiser DAS to calculate driving advice in real time (Albrecht et al., 2016a, G.M. Scheepmaker et al. b). The Pontryagin Maximum Principle shows that an optimal trajectory for EETC uses only five driving regimes-maximum acceleration, cruising using partial traction, coasting, cruising using partial (regenerative) braking, and maximum braking (see Eq. (14)). The necessary conditions for an optimal trajectory also determine the optimal sequence of driving regimes and conditions for switching between the different regimes. This structure can be exploited to limit the search space. It is known that a train with distributed mass running on a non-level track can be modelled as a point mass train running along track with a suitably modified gradient (Howlett and Pudney, 1995). The Energymiser algorithm uses distance as the independent variable and uses the known mass distribution of the train to construct a modified gradient profile so that the train can be modelled as a point mass when calculating the optimal speed profile.
The optimal sequence depends on the critical costate value which also determines the constant speed used with partial traction. This critical speed is known as the cruising speed, where the value of λ 2 is equal to the speed as given in Eq. (14). For some journeys this cruising speed could be higher than the maximum allowable train speed, in which case driving regimes with constant speed using partial traction do not occur except at speed limits. The optimization operates at two different levels. The lowest level finds the optimal trajectory profile for a given cruising speed. However, this journey profile might not meet the timetable constraints. The upper level of the optimization searches for the cruising speeds that generate optimal trajectory profiles that meet the timetable constraints.
Energymiser allows train operators to specify timing windows-earliest desired arrival time and latest desired arrival time-at stops and at intermediate locations given a constant dwell time and a fixed arrival time at the last stop, and will calculate optimal arrival times and speed profile within these windows. Optimal running time supplements are calculated by setting wide timing windows and running the standard Energymiser optimization. If we remove arrival time constraints from the problem then Energymiser can find the optimal arrival time. In practice we do this by using wide time windows. Energymiser calculates optimal trajectory profiles with fixed distance steps, typically 20 m, but the differential equation solver will use additional intermediate points to achieve the required accuracy, and switching points between steps are calculated precisely.
The MTTC journey is found by setting the cruising speed to a large value. In practice, a cruising speed that is five times the maximum speed of the train will reduce coasting durations to less than a few seconds. The EETC journey is found by searching for the cruising speed that achieves the required overall journey time. The EETC journey gives the optimal arrival times at each station, and the differences between the EETC section durations and the MTTC section durations give the optimal running time supplements. The calculations were done on a single core of a laptop computer with a 2.9 GHz processor and 8 GB of memory.

Direct solution method
We use the Radau pseudospectral method as a direct method to compute the MTTC and EETC driving strategy. This method uses orthogonal collocation at Legendre-Gauss-Radau (LGR) points to discretize the optimal control problem for the state and control variables and rewrite it as a nonlinear programming problem that can be solved using standard NLP solvers (Betts, 2010). A detailed derivation from the optimal control problem to the nonlinear programming problem is given in Wang and Goverde (2016a) and more general background about pseudospectral methods can be found in Garg et al. (2009) and Rao et al. (2010). We developed the PROMO algorithm by using GPOPS version 4.1 on a laptop with a 2.1 GHz processor and 8 GB RAM. GPOPS (General Purpose OPtimal Control Software) is a MATLAB toolbox based on the Radau pseudospectral method to solve optimal control problems (Rao et al., 2011). The quality of the Radau pseudospectral method is determined by the amount and location of collocation points, because too few collocation points or incorrect locations may lead to violation of the constraints. Especially for cases with changes in the infrastructure data (i.e. changes in the value of the gradient or speed limit), the usage of multiple-phase pseudospectral methods is recommended, because they do not violate the constraints. We use the single-phase model between two stops, because we consider limited changes of the constraints and the single-phase model has lower computation times compared to the multiple-phase model. We used a modified gradient and speed limit profile in order to model the train as a point mass, similar to Energymiser.
The basic single-phase model of Scheepmaker and Goverde (2016) is applied to compute the optimal trajectory that minimizes total energy consumption between two consecutive stops (i.e. EETC driving strategy) given a total scheduled running time. We use time as the independent variable in the GPOPS model, because this leads to more stable results for the direct solution method compared to distance as the independent variable. However, in order to compute the optimal running time supplement distribution over multiple sections for EETC, we extended this model using the multiple-phase model similar to Goverde (2017, 2019). Each phase is defined as the part of the trajectory between two successive stops (i.e. v ¼ 0) and is connected using linkage functions. We refer to Goverde (2017, 2019) for more details about the multiple-phase optimal control problem formulation. We included the intermediate stops i by the intermediate event constraint for the speed limit given in Eq. (9). The algorithm then computes the optimal distribution of the running time supplements in order to minimize total energy consumption over multiple sections. We use a smoothing function based on a moving average over the control to correct for the numerical oscillations in the pseudospectral approximations during the singular solution of cruising (oscillation of the control). Finally, we verified that the model results of the single-phase and multiple-phase models are in line with the necessary optimality conditions (i.e. costates and Hamiltonian).

Case study
We applied both methods to solve the optimal running time supplement distribution problem for EETC on different scenarios. Our aim is to find the optimal running time supplement distribution and to compare the two different algorithms to compute the optimal control. We start with discussing the input settings for this study in Section 4.1. We then apply a reference scenario in Section 4.2 in order to see the optimal distribution of the running time supplements and to see how both models behave compared to each other. In Section 4.3 we discuss the scenario in which we consider a uniform distribution of the running time supplements on the reference scenario, in order to compare it with the optimal distribution as discussed in Section 4.2. The effect of varying gradients and speed limits is discussed in Section 4.4. Finally, we consider a real-life case in Section 4.5 for the Dutch corridor Utrecht Central-Arnhem Central including varying speed limits and gradients.

Input
This subsection discusses the inputs to the models. We consider the Intercity (IC) rolling stock type VIRM-IV of the Netherlands Railways (NS) in our scenarios running on a 1.5 kV DC Dutch railway network. The parameters used for this rolling stock are shown in Table 1. We assume the train applies mechanical braking only and we consider the driving strategies MTTC and EETC.
We use a case study based on the Dutch corridor between Utrecht Central (Ut, 0 km) and Arnhem Central (Ah, 60 km) and consider the intermediate stations Driebergen-Zeist (Db, 10 km), Veenendaal-De Klomp (Klp, 33 km), and Ede-Wageningen (Ed, 40 km). We consider a fixed speed limit of 140 km/h and constant gradient for the reference scenario. We analyze the optimal running time supplement distribution and the optimal speed profile for this scenario. In addition, we compare the model results between Energymiser and PROMO to see if both methods generate similar results. For the varying gradient and speed limit scenario in Section 4.4 only, we consider a simple track with only three stops (A, B and C) with a distance of 30 km between each two stops. In the real-world case study we analyze the effects of varying speed limits and gradients on the optimal running time supplement distribution.
We include running time supplements above the technical minimum running time for the EETC driving strategy. We schedule 15% total running time supplement for the EETC driving strategy compared to the MTTC driving strategy in all scenarios in order to have an optimal cruising speed below the speed limit. In addition, the arrival and departure times at intermediate stations are flexible, because the models can change the distribution of the supplements over stops and thus the running time between stops. However, we do not influence the dwell times at the stations.

Reference scenario
In this section we discuss the results of the models for the optimal running time supplement distribution. The model results of Energymiser and PROMO can be found in Figs. 2 and 3, Tables 2 and 3. The results indicate that the speed profile and energy profile are almost the same. The EETC driving strategy with 15% running time supplement decreases the total energy consumption by about 39% compared to the MTTC driving strategy. The optimal speed profile of the EETC driving strategy indicates that the optimal cruising speed between stations Db and Klp and stations Ed and Ah is similar (about 131 km/h), which is in line with Howlett (2016), however, in our case applied over multiple stops. The results in Fig. 3 and Table 3 for the reference scenario also indicate that the relative amount of running time supplements increases as the distance between two consecutive stops decreases. In other words, the shorter the distance between two stops, the larger the relative running time supplement. For instance, the relative amount of running time supplements over a distance of 7 km (Klp-Ed) is about 18.3%, while the relative amount of running time supplements over a distance of 23 km (Db to Klp) is about 13.1%. This is due to the higher potential for energy saving during coasting between short stops, i.e. there is no cruising so the train only needs energy for maximum acceleration. In addition, the results indicate that the optimal running time supplement distribution leads to the same optimal cruising speed (if achievable by the train) between each two stops over the multiple stop trajectory.
If we take a closer look at Tables 2 and 3 we can see that the MTTC driving strategy of Energymiser has a slightly faster total running time of the train compared with PROMO (0.09%). This leads to a slightly higher energy consumption of 0.44%. The difference might be explained by the accuracy of the models (i.e. numerical errors) or by the fact that the computed strategies are slightly different in structure. The Energymiser strategy uses a short coasting phase but PROMO aims for the MTTC driving strategy to minimize total travel time and does not consider a coasting phase. The computation time of Energymiser (0.03 s) is much faster than PROMO (51.62 s).
The comparison of the EETC driving strategy between Energymiser and PROMO indicates minor differences. The energy consumption of PROMO is slightly lower compared to Energymiser (0.71%), due to the accuracy of the models. The optimal speed profile is slightly different, because the optimal cruising speed of Energymiser is 130.8 km/h for sections Db-Klp and Ed-Ah, while PROMO indicates an optimal cruising speed of 131.6 km/h for section Db-Klp and 131.7 km/h for section Ed-Ah. In general, the results indicate that the optimal cruising speed should be the same between each two stops. The computation time of Energymiser (0.34 s) is much faster compared with PROMO (153.6 s). Energymiser and PROMO runs were done on different laptop computers, but the difference in   computation time is much greater than the difference in the computer speeds.

Uniform distribution
Scheepmaker and Goverde (2015) investigated the effect of a uniform distribution of the running time supplements over multiple stops, i.e., the same percentage of running time supplements on each section. In this scenario we compare the difference between the optimal and the uniform distribution of the running time supplements. We consider a uniform distribution of 15% running time supplements for the EETC driving strategy based on the reference scenario as discussed in Section 4.2 (i.e. without varying gradients and/or speed limits). Results for Energymiser and PROMO can be found in Fig. 4, Table 2, and Table 3. Since we force the percentage of the supplements to be the same between each two stops, the differences between Energymiser and PROMO are minimal and caused by numerical precision. Energymiser generates the results in 0.35 s, while PROMO takes about 294.50 s. Results indicate energy savings of at most 39.3% compared to the MTTC driving strategy. Therefore, the energy consumption of the uniform distribution is slightly higher (0.24%) compared to the optimal running time supplement distribution as discussed in Section 4.2. Thus, the uniform distribution of the running time supplements is not the optimal distribution of the supplements for EETC over multiple stops.

Varying gradients and speed limits
In this scenario we consider three stations A, B and C with 30 km between each two stations in which we investigate the effect of varying gradients and speed limits on the optimal distribution of the running time supplements for EETC. We included a steep downhill gradient of 6.7‰ followed a bit later by an increase in the speed limit of 20 km/h between stations A and B. For the section between stations B and C we include instead a steep uphill gradient of 6.7‰ followed later by a speed limit drop of 20 km/h. The total amount of running time supplements between stations A and C is 15% for the EETC driving strategy. Fig. 5, Table 2, and Table 3 give the results of     both Energymiser and PROMO. The resulting speed profile of the MTTC driving strategy of both Energymiser and PROMO show that the time-optimal solution does not experience any speed effects of the gradient, because during the steep downhill section the train applies the brakes in order to remain at the speed limit, while the total traction force of the train is able to counterbalance the total gradient resistance during the steep uphill sections. The MTTC driving strategy follows the speed limit, because during the increase of the speed restriction the train accelerates to the new increased speed limit and during the decrease of the speed limit, the train brakes to the new decreased speed limit. The results indicate that there is a small difference in the total running time between Energymiser, where PROMO is slightly faster (0.1%) and the resulting energy consumption of PROMO is slightly higher compared to Energymiser (0.74%). The computation time of Energymiser (0.03 s) is again much lower compared to PROMO (398.95 s). The EETC driving strategy indicates energy savings of about 34% compared to the MTTC driving strategy. Fig. 5 indicates a difference in the resulting speed profile of Energymiser compared to PROMO. Energymiser uses the theory of Howlett (2016) with a constant optimal cruising speed, while PROMO computes variations in the cruising speed during the steep downhill and uphill gradient. The results of PROMO are not in line with Howlett (2016) and thus are not optimal. The reason for this is that PROMO with time as the independent variable approximates the cruising speeds on different sections separately, which could lead to slightly different cruising speeds depending on the numerical precision. However, the difference in total energy consumption between Energymiser and PROMO is small (0.22%) as can be seen in Fig. 5 and Table 2. Another explanation for the differences is the accuracy of the models. PROMO can also slightly violate some constraints, because the location of the collocation points is fixed and determined by the Radau points. For instance, this can be seen around 10 km, where PROMO starts accelerating earlier compared to Energymiser and, therefore, PROMO violates the end of the reduced speed limit of 120 km/h. Finally, Energymiser is much faster in generating results (0.25 s) compared to PROMO (646.09 s).

Real-world scenario: Utrecht Central-Arnhem Central
This subsection discusses the results of the case study between Utrecht Central and Arnhem Central with real-world data about varying speed limits and gradients. The results of both Energymiser and PROMO are shown in Figs. 3 and 6, Table 2, and Table 3. The EETC driving strategy with about 15% total running time supplement leads to about 39% energy savings compared to the MTTC driving strategy. The optimal cruising speed on sections Db-Klp and Ed-Ah is below the speed limit. At the sections Ut-Db and Klp-Ed the optimal driving strategy does not include a cruising phase and the train starts to coast after maximum acceleration. Again similar to the results in Section 4.2 the results of the optimal running time supplement distribution in seconds or percentage for the real-world scenario (see Fig. 3 and Table 3) show that the shorter the total distance between two consecutive stops, the larger the relative amount of running time supplements becomes. However, in this case the general statement is only valid if there is no cruising in the optimal driving strategy, because between Db and Klp relatively more running time supplements are included compared to Ed and Ah, while the distance is longer. The difference is caused by the gradients (i.e. between Ed and Ah there are uphill gradients, while the line between Ut and Db is more flat).
The detailed results in Tables 2 and 3 indicate that the MTTC driving strategy of PROMO is 0.11% faster compared to Energymiser, resulting in a higher energy consumption of about 1.8%. The MTTC driving strategy of PROMO leads to a slightly higher maximum speed between the stations Klp and Ed (135.3 km/h compared to 135.0 km/h). This might be caused by the difference in objective between Energymiser and PROMO as discussed in Section 4.2. Furthermore, it can be explained by the use of GPOPS for PROMO where the location of the collocation points is fixed by the amount of points, therefore, PROMO (single-phase part between two stops) might sometimes violate track constraints such as gradients or speed limits. Analysis of the results of PROMO indicate that the location of the collocation points is not exactly the same as the locations of change in speed limit. This causes the model to apply braking a bit too long and apply short acceleration to compensate for the undershoot around the restricted speed limits at 59 km (80 km/h) and 59.5 km (40 km/h), which also explains the difference in the energy-distance profile for the MTTC driving strategy in Fig. 6. Finally, numerical errors might occur due to the numerical accuracy of the algorithms. The computation time of Energymiser (0.03 s) is much lower compared to PROMO (573.89 s). The detailed results of the EETC driving strategy show that PROMO has a slightly lower total energy consumption compared to Energymiser (0.55%). Although the resulting running times are the same, the amount of running time supplements is slightly higher for PROMO (15.0% compared to 14.9%). If we have a closer look at the speed profile, we see a difference between the two models during cruising. Between the stations Db and Klp and between Ed and Ah the optimal cruising speed in Energymiser is the same (128.3 km/h), while for PROMO we see that this is not the case. Between both these two stops PROMO indicates that the cruising speed is lower during uphill gradients and at the change of the gradient increases to a new cruising speed. Therefore, the results of PROMO are not optimal. As explained in Section 4.4 the reason for this is the fact that PROMO with time as independent variable approximates the cruising speeds on different sections separately which can lead to slightly different cruising speeds while the objective value already approximates the optimal value within the given numerical precision. Finally, the computation time of Energymiser is much lower compared to PROMO (0.39 s compared to 679.32 s).

Conclusion and discussion
In this paper we computed the optimal distribution of running time supplements over multiple stops given a total scheduled running time for energy-efficient train driving where the insights can be used for timetable design. Based on the applications of our models on a realistic Dutch case study between the stations Utrecht Central and Arnhem Central with varying speed limits and gradients, we conclude that the optimal distribution of the running time supplements leads to the same optimal cruising speed between each two stops over the trajectory with multiple sections for flat tracks. For tracks with gradients, PROMO approximates the optimal strategy with different cruising speeds around the gradient segments with a slightly bigger energy consumption within the numerical precision, showing the numerical sensitivity of the solution. We also found that there is a clear relationship between the distance between two stops and the relative amount of running time supplements, which up to our knowledge has not been described in the literature yet. The shorter the distance between two stops, the larger the relative amount of running time supplements. In addition, the effect of gradients influence the relative amount of running time supplements. Relatively more supplements are allocated on sections with downhill gradients compared to uphill gradients, because less traction force and thus energy is used to overcome the gradient resistance. We also conclude that the optimal distribution of the running time supplements leads to higher energy savings compared to a uniform distribution of the running time supplements for EETC over multiple-stops. Future research could focus on finding a general mathematical relationship between the relative amount of the running time supplements and the distance between two stops. Furthermore, we compared the direct and indirect solution method in order to compute the optimal control. Although both models have different assumptions to compute the optimal running time supplement distribution, they lead, in general, to the same results. The main differences in results are caused by the location of the collocation points for pseudospectral method, and the accuracy of the models (numerical errors). However, for varying gradients the resulting speed profile of PROMO leads to different cruising speeds with approximately the same energy consumption as the resulting speed profiles of Energymiser with the optimal unique cruising speed. The indirect solution method has lower computation time than the direct solution method, because this method exploits information about the optimal control structure (i.e. the same optimal cruising speed between multiple stops). The direct solution method does not use any information about the optimal control structure but nevertheless provides the costates and Hamiltonian required to evaluate the necessary optimality conditions.
While not as fast as the indirect solution method, the direct solution method is able to find the optimal solutions with the same objective value as the indirect solution method without requiring extensive analysis of the necessary conditions for an optimal strategy, and without requiring highly specialized code to calculate optimal trajectory profiles. The indirect method will be useful for finding optimal solutions to new variants of optimal train control problems. The amount of specialization required to implement practical solutions can then be tailored to the requirements of individual applications. Fig. 6. Real-world case scenario IC (Ut-Ah) speed/gradient-distance profile (left) and energy-distance profile (right) of the MTTC and EETC driving strategies of Energymiser and PROMO.