Train Interactions
Total Page:16
File Type:pdf, Size:1020Kb
Short Term Delay Prediction in Passenger Railways Using Machine Learning; Applied in the Dutch Rail Network E. Lehká December 2019 in partial fulfilment of the requirements for the degree of Master of Science in Transport, Infrastructure and Logistics at the Delft University of Technology Faculty of Civil Engineering & Geosciences Faculty of Mechanical, Maritime and Materials Engineering Evaluation committee: Prof. Dr. Ir. Serge P. Hoogendoorn TU Delft Chairman Dr. Ir. Niels van Oort TU Delft Supervisor Ir. Mark Duinkerken TU Delft Supervisor Pieter-Jan Fioole Nederlandse Spoorwegen Supervisor Preface and acknowledgments People like to ask others about their plans for the future. Some may have a clear idea and know exactly what they want to do. That is not my case. Instead, I am open to any turn in my life that feels right. This way, I got to study transportation and eventually I found myself at the Technical University in Delft. Although it was not always an easy path, I am very grateful I had the chance to study there and I am especially grateful that I got the opportunity to do an internship at NS as a part of my graduation. Despite, or maybe thanks to, the difficulties I encountered, it was an incredible and enriching experience. Not only because I gained insight into a new field, machine learning and specifically decision tree ensemble methods. I also had a chance to be a part of an amazing team ‘PI’, to whom I would like to say thank you for the warm and welcoming atmosphere I was accepted into. Furthermore, I could not even start and certainly finish my thesis without guidance, advices and academic and moral support I received from my supervision committee, who I would like to thank as well. I would like to thank all the people that made my stay in Delft possible and thanks to whom I had such a great time there. At the first place, it is my parents and my brother whose support to me cannot be described by words. Next, it is my boyfriend who endured even the most stressful times with me and always showed up with chocolate and a glass of wine at the right moment. It is also my close friends who always cheered me up and ensured me that I was doing fine. A special thanks also belongs to my colleagues at a three-dotted pizza restaurant chain who scheduled my working hours to fit them perfectly in my academic agenda. And finally, my thanks goes to OHMies, an amazing yoga group that always uplifted my spirit and kept my body, mind and soul in balance. Thank you. Short Term Delay Prediction in Passenger Railways Using Machine Learning; Applied in the Dutch Rail Network Eva Lehká – Transport, Infrastructure and Logistics –Delft University of Technology Abstract— We test the effect of a variety of feature et al. (2018), whose work served as a starting point sets representing passenger volumes, weather of our research. conditions and train interactions, when defined as Our research has been conducted in cooperation features and used in a gradient boosting model to with Nederlandse Spoorwegen, commonly referred predict passenger train delays 20 minutes to the to as NS, the principal passenger railway operator in future from the last registration point. Effects of the features and their combinations on the prediction the Netherlands who provided us with data, quality are analyzed and the best performing feature resources and valuable knowledge to carry out our sets selected. The results showed that the passenger study, and to test and assess our models on the volumes features (in the form as defined in our work) Dutch passenger railway network. Besides NS, do not have any prediction power and rather valued support was accommodated also by ProRail, introduced noise in the predictions. The weather a rail infrastructure manager in the Netherlands, features resulted in reduced expected delay change who contributed by providing a substantial part of with a slight positive effect on precision of the the data we used in our work. classification task while worsening the recall. The largest positive effect was observed when train --- structure of the paper ---- interaction features were introduced despite their highly simplified form. Considering the low II. MOTIVATION AND PRIOR WORK computational efforts necessary to retrieve the The most commonly used factors in delay features, we conclude there is a potential for prediction in railways are network- and timetable- application of similarly defined train interactions based such as departure and arrival times, location features in other models. identification, event type, train identification and Keywords— Train delays, Machine learning, similar (Hansen, Goverde, & Van Der Meer, 2010; XGBoost, Gradient Boosting, Weather conditions, Kecman, 2014; Kecman & Goverde, 2015a; Passenger counts, Train interactions Lessan, Fu, & Wen, 2019; Nair et al., 2019; Oneto et al., 2016; Wang & Work, 2015; Yaghini, Khoshraftar, & Seyedabadi, 2013). Similar I. INTRODUCTION attention has been paid to delay propagation and its Our work engages in short term delay prediction prediction (Berger, Gebhardt, Müller-Hannemann, in passenger railway, specifically prediction of & Ostrowski, 2011; Corman & Kecman, 2018; delays of all regularly scheduled passenger trains. Goverde, 2010; Peters, Emig, Jung, & Schmidt, Although delay prevention should be a primary 2006; Jianxin Yuan, 2007). However, in contrary to concern. However, prior knowledge of upcoming the lengthy list of publications considering the earlier factors in train delay prediction models, delays may mitigate inconvenience induced to the weather conditions were considered in much fewer passengers by providing them with an opportunity models (Nair et al., 2019; Oneto et al., 2016) with a to change their itineraries, or possibly might even support of an observed correlation between weather eventually help to prevent delay propagation by conditions and train delays (Ling, Peng, Sun, Li, & prompt dispatching interventions. Wang, 2018). Passenger counts and the effects of The objective of our research is to define and crowding attract a lot of attention among transport evaluate sound feature sets reflecting effects of researchers. In general, especially dwell time passenger counts, weather conditions and train (Kecman & Goverde, 2015b; San & Mohd Masirin, interactions on passenger trains delays, which are to 2016) and psychological effects of crowding (Cox, be used along with features derived from data Houdmont, & Griffiths, 2006; Tirachini, Hensher, available in the RAS competition (INFORMS, & Rose, 2013) are in the spotlight. However, 2018), on which our research builds on, to forecast application of the passenger counts and crowding passenger trains’ delays 20 minutes to the future. in the railway delay prediction is rather scarce Effects of the individual features and their (Albert, Kraus, Müller, & Schöbel, 2017), though combinations are reflected upon. Note that the span some examples can be found in the bus transit of 20 minutes to the future refers to the last domain (M. Chen, Liu, Xia, & Chien, 2004; M. registration point within a 20-minutes time window Chen, Yaw, Chien, & Liu, 2007). since the last registration point. All the selected factors, passenger counts, For this purpose, we use a decision trees based weather and train interactions (in the meaning of gradient boosting method XGBoost (T. Chen & delay propagation) were somehow implemented in Guestrin, 2016). Selection of the method is based on some delay prediction model. However, none of the the conclusions drawn by Van den Bulk publications reviewed presented an attempt to include all the factors into one model. Furthermore, many types of models were presented in the consisted of the timetable, the realization data reviewed publications such as stochastic models (automatic vehicle location data), weather data (Berger et al., 2011; Huisman & Boucherie, 2001; J (historical hourly measurements), passenger data Yuan, Goverde, & Hansen, 2002), Bayesian (passenger count estimations based on smart card networks (Corman & Kecman, 2018; Lessan et al., data) and minimum required headways between 2019), data mining techniques (Hansen et al., 2010) pairs of train series at specific locations. or Neural network (Peters et al., 2006; Yaghini et The resulting features were divided into a al., 2013; Oneto et al., 2016). Decision trees based number of feature sub-sets which were then models appeared mainly in the form of a random combined into feature sets for the prediction forest model (Oneto et al., 2016; Nair et al., 2019). models development. Furthermore, some of the No application of gradient boosting model, such as sub-sets were defined in multiple variations. The XGBoost, was found in the context of train delay features belonging into the categories along with prediction, and especially not in a combination the number of variations created (in the brackets) with all the factors affecting delays as mentioned are as follows: above. Finally, most of the publications that were • Basic features (1): Day of the week, Hour, offering any comparison of multiple models Minute, Location, Direction, Current delay, focused on assessment of the differences in the Delay 1 before, Delay 2 before. models’ architecture rather than comparing an impact of various factors considered in the models. • Locations features (2): Number of the The consequent research gap was found in the activities to come or their frequency in the following three aspects: 1) Application of a timetable: V (departure), K_V (Short gradient boosting