Real-Time Bus Departure Prediction Using Neural Networks for Smart IoT Public Bus Transit
Abstract
:1. Introduction
- The integration of multiple datasets, transit operations data, meteorological data, and bus stop data, to enhance predictive accuracy. By combining these three datasets, the present study leverages diverse sources of information to improve the predictions. Comprehensive preprocessing was performed on these datasets to ensure data consistency. Additionally, feature extraction techniques were applied to the integrated data, allowing for the generation of relevant input features that significantly enhance model performance, as illustrated in Figure 3.
- The introduction of a unified fully connected neural network (FCNN) with a one-bus stop lookback window aimed at predicting bus departure times across numerous bus lines within a single bus transit network. This approach effectively utilizes the FCNN’s capability to capture temporal dependencies by processing relevant input features.
- Optimizing the model’s size and performance for deployment on IoT devices, balancing accuracy with resource efficiency.
2. Related Works
3. Materials
3.1. Transit Operations Data
- Service Date refers to the date when the trip occurred.
- Route ID serves as the unique identifier for each route.
- Direction ID indicates whether the trip is inbound or outbound.
- Half-Trip ID uniquely identifies the one-way trip.
- Stop ID identifies the specific stop in the General Transit Feed Specification (GTFS) format.
- Timepoint ID is the code assigned to a specific bus stop within a particular trip.
- Timepoint Order indicates the sequence of this timepoint in the trip.
- Point Type specifies whether the stop is the starting point, midpoint, or the endpoint for the trip.
- Standard Type identifies whether the trip should be evaluated on the schedule standard or headway standard.
- Scheduled Time denotes the scheduled departure time of the trip.
- Actual Time indicates the time when the trip actually departed from the timepoint.
- Scheduled Headway represents the scheduled time gap between this trip and the previous trip at the stop.
- Headway represents the actual time gap between this trip and the previous trip at the stop.
3.2. Meteorological Data
3.3. Bus Stop Data
4. Methodology
4.1. Dataset Analyzing and Preprocessing
4.2. Feature Extraction and Data Preparation for Model Implementation
- Time-related features:As previously mentioned, the bus departure records from this dataset were collected over three months, resulting in a wide range of time variations. To minimize potential noise, time is categorized into two distinct features rather than being directly incorporated. Firstly, the variable “day type” is introduced into the input features, distinguishing between “weekend” and “workday” operations based on the day of bus operation.Additionally, another time-related variable, “rush hour status”, identifies whether each record corresponds to bus operations during rush hour. Rush hour in Boston is defined as the period from 7 a.m. to 9 a.m. and from 4 p.m. to 6 p.m. [36]. We also include another input variable, “current stop lateness status”, which indicates whether the bus is behind or ahead of schedule. This variable is derived from the status of the previous stop and is determined by whether the deviation from the scheduled departure time at the current stop is positive or negative. Additionally, the model incorporates the current stop departure time deviation as an input, calculated as the difference between the actual departure time and the scheduled departure time, allowing it to assess the degree of delay or advancement in the bus schedule.
- Distance-related features:Our model incorporates two distance-related features. The first feature is the “stop-to-stop distance”, which quantifies the distance in meters between consecutive bus stops. This distance is calculated using the X and Y coordinates of both the current and next stop. The second variable, termed “far status”, is a binary indicator based on a threshold derived from the mean distance between bus stops in Boston, reported as 1488 meters according to [36]. In this dataset, the average distance between stops is 1233.26 meters. This binary variable reflects whether the distance between two consecutive bus stops exceeds or falls below this threshold.
- Weather-related features:To handle weather-related features, categorized as conditions including cloudy, rainy, clear day, snowy, and windy, we employ one-hot encoding. This method converts each weather condition into binary variables, thereby adding 5 additional variables to the input features of the model.
- Traffic-related features:One-hot encoded inbound and outbound directions, as well as Route IDs, are the features categorized in this group. With 151 routes in the dataset, this approach introduces 151 input features for routes and 2 input features for directions. Furthermore, the model incorporates the X and Y coordinates of the current and next bus stop, enabling the analysis of traffic patterns across diverse geographical areas.
- Output variable:The final target variable in our model is the next stop departure time, as illustrated in Figure 8. Since the scheduled departure time for each stop is available, the algorithm is designed to predict the departure time deviation of the next stop. Assuming that bus n is currently between stop i and , the predicted departure time deviation for the next stop allows us to compute the actual departure time using the following formula:
5. Experimental Results and Discussion
5.1. Network Architectures
5.2. Metrics
5.3. Model Performance
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
FCNNs | Fully connected neural networks |
RMSE | Root Mean Square Error |
MSE | Mean Square Error |
ANNs | Artificial neural networks |
GTFS | General Transit Feed Specification |
AI | Artificial intelligence |
MBTA | Massachusetts Bay Transportation Authority |
IoT | Internet of Things |
References
- Brough, R.; Freedman, M.; Phillips, D.C. Understanding socioeconomic disparities in travel behavior during the covid-19 pandemic. J. Reg. Sci. 2021, 61, 753. [Google Scholar] [CrossRef] [PubMed]
- Covington, K.L. Overcoming spatial mismatch: The opportunities and limits of transit mode in addressing the black–white unemployment gap. City Community 2018, 17, 211–235. [Google Scholar] [CrossRef]
- Lee, Y.; Lee, B. What’s eating public transit in the United States? Reasons for declining transit ridership in the 2010s. Transp. Res. Part Policy Pract. 2022, 157, 126–143. [Google Scholar] [CrossRef]
- Erhardt, G.D.; Hoque, J.M.; Goyal, V.; Berrebi, S.; Brakewood, C.; Watkins, K.E. Why has public transit ridership declined in the United States? Transp. Res. Part Policy Pract. 2022, 161, 68–87. [Google Scholar] [CrossRef]
- AllTransit. Available online: https://alltransit.cnt.org/ (accessed on 1 April 2024).
- Shi, X.; Li, Z.; Xia, E. The impact of ride-hailing and shared bikes on public transit: Moderating effect of the legitimacy. Res. Transp. Econ. 2021, 85, 100870. [Google Scholar] [CrossRef]
- Diab, E.I.; Badami, M.G.; El-Geneidy, A.M. Bus transit service reliability and improvement strategies: Integrating the perspectives of passengers and transit agencies in North America. Transp. Rev. 2015, 35, 292–328. [Google Scholar] [CrossRef]
- The Real Reason Buses Were Losing Riders Even before COVID-19—Streetsblog USA. Available online: https://usa.streetsblog.org/2020/08/26/the-real-reason-buses-were-losing-riders-even-before-covid-19 (accessed on 17 September 2024).
- Transport, data analytics and AI: Why TfL’s Latest Initiative Is Good News. Available online: https://www.tsg.com/insights/transport-data-analytics-and-ai-why-tfls-latest-initiative-is-good-news/ (accessed on 1 April 2024).
- Ziedan, A.; Brakewood, C.; Watkins, K. Will transit recover? A retrospective study of nationwide ridership in the United States during the COVID-19 pandemic. J. Public Transp. 2023, 25, 100046. [Google Scholar] [CrossRef] [PubMed]
- RidershipReport-American Public Transportation Association. Available online: https://www.apta.com/research-technical-resources/transit-statistics/ridership-report/ (accessed on 17 September 2024).
- Qi, Y.; Liu, J.; Tao, T.; Zhao, Q. Impacts of COVID-19 on public transit ridership. Int. J. Transp. Sci. Technol. 2023, 12, 34. [Google Scholar] [CrossRef]
- Bi, S.; Hu, J.; Shao, L.; Feng, T.; Appolloni, A. Can public transportation development improve urban air quality? Evidence from China. Urban Clim. 2024, 54, 101825. [Google Scholar] [CrossRef]
- Tirachini, A.; Cats, O. Covid-19 and public transportation: Current assessment, prospects, and research needs. J. Public Transp. 2020, 22, 1. [Google Scholar] [CrossRef] [PubMed]
- Rashvand, N.; Hosseini, S.S.; Azarbayjani, M.; Tabkhi, H. Real-Time Bus Arrival Prediction: A Deep Learning Approach for Enhanced Urban Mobility. In Proceedings of the 13th International Conference on Operations Research and Enterprise Systems-Volume 1: ICORES, Rome, Italy, 24–26 February 2024; pp. 123–132. Available online: https://arxiv.org/abs/2303.15495 (accessed on 1 July 2024).
- Jiao, J.; Dillivan, M. Transit deserts: The gap between demand and supply. J. Public Transp. 2013, 16, 2. [Google Scholar] [CrossRef]
- Fadaei Oshyani, M.; Cats, O. Real-Time Bus Departure Time Predictions: Vehicle Trajectory and Countdown Display Analysis. In Proceedings of the 2014 17th IEEE International Conference on Intelligent Transportation Systems, ITSC 2014, Qingdao, China, 8–11 October 2014; pp. 2556–2561. [Google Scholar] [CrossRef]
- Hosseini, S.S.; Rahimi Ardabili, B.; Azarbayjani, M.; Tabkhi, H. Demographic Disparities, Service Efficiency, Safety, and User Satisfaction in Public Bus Transit System: A Survey-based Case Study in the City of Charlotte, NC. Res. Sq. Prepr. 2024. [Google Scholar] [CrossRef]
- MBTA Struggles to Recover Ridership Post-Pandemic-Axios Boston. Available online: https://www.axios.com/local/boston/2023/12/18/transit-ridership-mbta-pandemic-recovery (accessed on 3 August 2024).
- MBTA Slow to Bring Riders Back Post-Pandemic-NBC Boston. Available online: https://www.nbcboston.com/news/local/mbta-trails-other-major-transit-agencies-in-bringing-back-riders-data-shows/3013493/ (accessed on 3 August 2024).
- Boston’s Monthly Public Transportation Ridership Has Rebounded by 63. Available online: https://www.avisonyoung.us/w/bostons-monthly-public-transportation-ridership-has-rebounded-by-63-compared-to-prepandemic-levels (accessed on 3 August 2024).
- MBTA Ridership Trends Compared to Public Transportation Agencies Nationwide|Blog Latest News. Available online: https://pioneerinstitute.org/blog/mbta-ridership-trends-compared-to-public-transportation-agencies-nationwide/ (accessed on 3 August 2024).
- Hosseini, S.S.; Azarbayjani, M.; Lawrence, J.; Tabkhi, H. Towards Understanding the Benefits and Challenges of Demand Responsive Public Transit: A Case Study in the City of Charlotte, NC. arXiv 2023, arXiv:2304.06467. [Google Scholar]
- Basak, S.; Sun, F.; Sengupta, S.; Dubey, A. Data-driven optimization of public transit schedule. In Proceedings of the Big Data Analytics: 7th International Conference, BDA 2019, Ahmedabad, India, 17–20 December 2019; Proceedings 7. Springer: Berlin/Heidelberg, Germany, 2019; pp. 265–284. [Google Scholar] [CrossRef]
- Jabamony, J.; Shanmugavel, G.R. IoT based bus arrival time prediction using Artificial Neural Network (ANN) for smart public transport system (SPTS). Int. J. Intell. Eng. Syst. 2020, 13, 312–323. [Google Scholar] [CrossRef]
- Abdi, A.; Amrit, C. A review of travel and arrival-time prediction methods on road networks: Classification, challenges and opportunities. PeerJ Comput. Sci. 2021, 7, e689. [Google Scholar] [CrossRef] [PubMed]
- Yin, T.; Zhong, G.; Zhang, J.; He, S.; Ran, B. A prediction model of bus arrival time at stops with multi-routes. Transp. Res. Procedia 2017, 25, 4623–4636. [Google Scholar] [CrossRef]
- Taparia, A.; Brady, M. Bus Journey and Arrival Time Prediction based on Archived AVL/GPS data using Machine Learning. In Proceedings of the 2021 7th International Conference on Models and Technologies for Intelligent Transportation Systems (MT-ITS), Crete, Greece, 16–17 June 2021; pp. 1–6. [Google Scholar] [CrossRef]
- Serin, F.; Alisan, Y.; Erturkler, M. Predicting bus travel time using machine learning methods with three-layer architecture. Measurement 2022, 198, 111403. [Google Scholar] [CrossRef]
- Zibaeirad, A.; Koleini, F.; Bi, S.; Hou, T.; Wang, T. A Comprehensive Survey on the Security of Smart Grid: Challenges, Mitigations, and Future Research Opportunities. arXiv 2024, arXiv:2407.07966. [Google Scholar]
- Rashvand, N.; Witham, K.; Maldonado, G.; Katariya, V.; Marer Prabhu, N.; Schirner, G.; Tabkhi, H. Enhancing automatic modulation recognition for iot applications using transformers. IoT 2024, 5, 212–226. [Google Scholar] [CrossRef]
- Bai, C.; Peng, Z.R.; Lu, Q.C.; Sun, J. Dynamic Bus Travel Time Prediction Models on Road with Multiple Bus Routes. Comput. Intell Neurosci. 2015, 2015, 432389. [Google Scholar] [CrossRef] [PubMed]
- MBTA Bus Arrival Departure Times 2023. Available online: https://mbta-massdot.opendata.arcgis.com/datasets/ef464a75666349f481353f16514c06d0/about (accessed on 5 April 2024).
- Available online: https://www.visualcrossing.com/?gadsource=1gclid=CjwKCAjwNa1BhAlEiwAM-dm7HkIrDOd3ysU85B2MVzFV2grWKdpUSHVzYhovSgGlddXwf7dUd2xoCLnEQAvDBwE (accessed on 10 April 2024).
- Available online:. Available online: https://www.mass.gov/info-details/massgis-data-mbta-bus-routes-and-stops (accessed on 20 April 2024).
- Stops-Spacing-Location-and-Design. Available online: http://www.transit.dot.gov/research-innovation/stops-spacing-location-and-design (accessed on 10 April 2024).
Original MBTA Bus Departure Times 2023 [33] | Preprocessed MBTA Bus Departure Times 2023 | |
---|---|---|
Number of data points | 6,361,455 | 5,954,486 |
Number of tracked trips | 940,908 | 921,829 |
Number of total bus routes | 151 | 151 |
Number of bus stops | 1111 | 1111 |
Mean of departure time deviation | 261.84 s | 211.866 s |
Standard deviation of departure time deviation | 309.996 s | 189.016 s |
Architecture Details | Test RMSE | Number of Parameters | Computational Complexity Measured in FLOPs |
---|---|---|---|
One hidden layer (H1-256N) | 87.2219 | 44.801 K | 44.544 M |
Two hidden layers (H1-256N, H2-32N) | 80.98 | 52.801 K | 52.512 M |
Two hidden layers (H1-256N, H2-64N) | 79.5718 | 61.057 K | 60.736 M |
Three hidden layers (H1-512N, H2-128N, H3-64N) | 77.8312 | 163.073 K | 162.368 M |
Four hidden layers (H1-1024N, H2-512N, H3-64N, H4-32N) | 76.8411 | 737.921 K | 736.288 M |
Five hidden layers (H1-512N, H2-256N, H3-128N, H4-64N, H5-32N) | 76.8323 | 263.681 K | 262.688 M |
Five hidden layers (H1-1024N, H2-512N, H3-128N, H4-64N, H5-32N) | 76.9803 | 779.009 K | 777.248 M |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Rashvand, N.; Hosseini, S.S.; Azarbayjani, M.; Tabkhi, H. Real-Time Bus Departure Prediction Using Neural Networks for Smart IoT Public Bus Transit. IoT 2024, 5, 650-665. https://doi.org/10.3390/iot5040029
Rashvand N, Hosseini SS, Azarbayjani M, Tabkhi H. Real-Time Bus Departure Prediction Using Neural Networks for Smart IoT Public Bus Transit. IoT. 2024; 5(4):650-665. https://doi.org/10.3390/iot5040029
Chicago/Turabian StyleRashvand, Narges, Sanaz Sadat Hosseini, Mona Azarbayjani, and Hamed Tabkhi. 2024. "Real-Time Bus Departure Prediction Using Neural Networks for Smart IoT Public Bus Transit" IoT 5, no. 4: 650-665. https://doi.org/10.3390/iot5040029
APA StyleRashvand, N., Hosseini, S. S., Azarbayjani, M., & Tabkhi, H. (2024). Real-Time Bus Departure Prediction Using Neural Networks for Smart IoT Public Bus Transit. IoT, 5(4), 650-665. https://doi.org/10.3390/iot5040029