A Forecast of Short-term Passenger Flow of Rail Transit Based on IGWO-BP Algorithm
-
摘要: 轨道交通短时客流具有随机性和非线性的特点。为提高轨道交通短时客流预测结果的准确度,研究了基于改进的灰狼优化算法(IGWO)与BP神经网络的短时客流预测算法(IGWO-BP)。计算轨道交通客流不同时间序列的相关系数,确定了BP神经网络的输入和输出方式;用余弦思想和动态权重策略对原始灰狼优化算法改进,提高算法的全局搜索能力和寻优效率;用IGWO算法优化BP神经网络的初始权值和阈值,提高短时客流预测结果的准确性。预测了西安轨道交通2号线龙首原站周三早高峰15 min时间粒度的短时客流量,并将IGWO-BP算法的预测结果与其他5种模型(KF,GM,SVM,BPNN,GWO-BP)比较。结果表明,IGWO-BP算法的均方根误差为89.65,平均绝对百分比误差为1.16%,预测结果的精度和稳定性均为最优。Abstract: Short-term passenger flow of rail transit has the characteristics of randomness and nonlinearity. An IGWO-BP algorithm is developed to forecast short-term passenger flow based on improved grey wolf optimization (IGWO) and BP neural network to improve the accuracy of predicting the short-term passenger flow of rail transit. The correlation coefficients of different time series of the rail-transit passenger flow are calculated to determine the input and output modes of the BP neural network. The cosine thought and dynamic weighting strategy are used to improve the orginal grey wolf optimization algorithm, thus enhancing the algorithm's global search and optimization. The IGWO algorithm is used to optimize the initial weights and thresholds of the BP neural network, which can improve the accuracy of predicting the short-term passenger flow. The work predicts the short-term passenger flow at the 15-min time granularity of the LONGSHOUYUAN Station of Xi'an Rail Transit Line 2 on Wednesday morning peak. The predicting results of the IGWO-BP algorithm are compared with those of the other five models (KF, GM, SVM, BPNN, and GWO-BP). For the IGWO-BP algorithm, the RMSE is 89.65, and the MAPE is 1.16%. The results show that the IGWO-BP algorithm has optimal accuracy and stability.
-
Key words:
- rail transit /
- short-term passenger flow /
- correlation coefficient /
- IGWO algorithm /
- BP neural network
-
表 1 同1 d工作日不同时段客流量相关系数
Table 1. Correlation coefficient of the passenger flow at different time of the same working day
时段 07:00—07:15 > 07:15—07:30 > 07:30—07:45 > 07:45—08:00 > 08:00—08:15 > 08:15—08:30 > 08:30—08:45 > 08:45—09:00 07:00—07:15 1.00 > 07:15—07:30 0.55 1.00 > 07:30—07:45 0.24 0.74 1.00 > 07:45—08:00 0.42 0.71 0.75 1.00 > 08:00—08:15 -0.52 -0.02 0.23 -0.02 1.00 > 08:15—08:30 -0.67 -0.32 0.06 -0.12 0.63 1.00 > 08:30—08:45 -0.42 -0.61 -0.14 -0.36 0.41 0.29 1.00 > 08:45—09:00 -0.69 -0.61 -0.67 -0.41 0.08 0.47 -0.02 1.00 表 2 同1 d工作日同一时段客流量相关系数
Table 2. Correlation coefficient of the passenger flow at the same time of the same working day
工作日 11月1日 11月8日 11月15日 11月22日 11月29日 12月6日 12月13日 12月20日 12月27日 11月1日 1.00 11月8日 1.00 1.00 11月15日 0.99 0.98 1.00 11月22日 1.00 0.99 0.99 1.00 11月29日 0.98 0.98 0.99 0.99 1.00 12月6日 1.00 0.99 0.99 1.00 0.99 1.00 12月13日 0.99 0.98 0.99 0.99 0.99 1.00 1.00 12月20日 0.97 0.96 0.98 0.97 0.98 0.99 0.99 1.00 12月27日 0.97 0.96 0.99 0.97 0.99 0.98 0.99 0.99 1.00 表 3 IGWO-BP算法权值和阈值计算值
Table 3. Calculated values of the weight and threshold of the IGWO-BP algorithm
输入层到隐含层权值 隐含层到输出层权值 隐含层阈值 输出层阈值 -0.02 0.04 0.26 0.10 -0.78 0.02 -0.02 0.24 0.03 0.10 -0.02 0.25 0.88 -0.39 0.19 1.00 0.01 0.02 -0.04 0.09 0.34 -0.03 0.12 -0.03 -0.05 0.08 -0.31 -0.03 0.11 -0.06 0.19 -0.42 0.16 -0.03 0.01 -0.03 -0.02 -0.06 1.00 -0.05 -0.07 -0.09 -1.00 -0.03 0.29 -0.03 表 4 IGWO-BP算法预测结果评价指标
Table 4. Evaluation of the forecast results of the IGWO-BP algorithm
评价指标 最大值 最小值 平均值 标准差 MAE 82.75 64.84 75.02 4.93 RMSE 98.53 77.92 89.65 5.62 MAPE 1.97% 0.46% 1.16% 0.01 表 5 预测结果评价指标对比
Table 5. Comparison of evaluation indices for predicting results
评价指标 KF GM SVM BPNN GWO-BP IGWO-BP MAE 131.97 244.25 119.83 113.14 80.42 75.02 RMSE 149.36 302.55 128.37 136.92 97.76 89.65 MAPE/% 3.68 4.97 3.18 2.75 1.24 1.16 -
[1] 王明生. 城市轨道交通概论[M]. 北京: 人民交通出版社, 2012.WANG Mingsheng. Introduction to urban rail transit[M]. Beijing: China Communications Press, 2012. (in Chinese) [2] 张亚运. 基于客流短时预测的城市轨道交通运营组织[D]. 西安: 长安大学, 2016.ZHANG Yayun. Operation organization of urban rail transit based on the passenger flow short-term prediction[D]. Xi'an: Chang'an University, 2016. (in Chinese) [3] ROOS J, GAVIN G, BONNEVAY S. A dynamic Bayesian network approach to forecast short-term urban rail passenger flows with incomplete data[J]. Transportation Research Procedia, 2017(26): 53-61. http://www.sciencedirect.com/science/article/pii/S2352146517308670 [4] 白伟华, 张传斌, 张塽旖, 等. 基于异常值识别卡尔曼滤波器的短期交通流预测[J]. 计算机应用研究, 2021, 38(3): 817-821. https://www.cnki.com.cn/Article/CJFDTOTAL-JSYJ202103034.htmBAI Weihua, ZHANG Chuanbin, ZHANG Shuangyi, et al. Outlier-identified kalman filter for short-term traffic flow forecasting[J]. Application Research of Computers: 2021, 38(3): 817-821. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JSYJ202103034.htm [5] 帅斌, 张玥, 张永超. 我国市郊铁路客流特征分析及需求预测[J]. 铁道工程学报, 2014(1): 20-23+106. doi: 10.3969/j.issn.1006-2106.2014.01.004SHUAI Bin, ZHANG Yue, ZHANG Yongchao. Analysis of suburban railway passenger flow characteristics and demand forecast in china[J]. Journal of Railway Engineering Society, 2014(1): 20-23+106. (in Chinese) doi: 10.3969/j.issn.1006-2106.2014.01.004 [6] 王兴川, 姚恩建, 刘莎莎. 基于AFC数据的大型活动期间城市轨道交通客流预测[J]. 北京交通大学学报, 2018, 42(1): 87-93. https://www.cnki.com.cn/Article/CJFDTOTAL-BFJT201801013.htmWANG Xingchuan, YAO Enjian, Liu Shasha. Urban rail transit passenger flow forecasting for large special event based on AFC data[J]. Journal of Beijing Jiaotong University, 2018, 42(1): 87-93. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-BFJT201801013.htm [7] 郭旷, 王雪梅, 张宁. 城市轨道交通短时客流不确定性预测模型[J]. 城市轨道交通研究, 2020, 23(1): 22-26. https://www.cnki.com.cn/Article/CJFDTOTAL-GDJT202001008.htmGUO Kuang, WANG Xuemei, ZHANG Ning. Uncertainty prediction model of short-term passenger flow in urban rail transit[J]. Urban Mass Tranit, 2020, 23(1): 22-26. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-GDJT202001008.htm [8] SUN Yuxing, LENG Biao, GUAN Wei. A novel wavelet-SVM short-time passenger flow prediction in Beijing subway sys-tem[J]. Neurocomputing, 2015(166): 109-121. http://dl.acm.org/citation.cfm?id=2794209 [9] 赵阳阳, 夏亮, 江欣国. 基于经验模态分解与长短时记忆神经网络的短时地铁客流预测模型[J]. 交通运输工程学报, 2020, 20(4): 194-204. https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202004020.htmZHAO Yangyang, XIA Liang, JIANG Xinguo. Short-term metro passenger flow prediction based on EMD-LSTM[J]. Journal of Traffic and Transportation Engineering, 2020, 20(4): 194-204. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202004020.htm [10] HAO S, LEE D, ZHAO D. Sequence to sequence learning with attention mechanism for short-term passenger flow pediction in large-scale metro system[J]. Transportation Research Part C: Emerging Technologies, 2019(107): 287-300. http://www.sciencedirect.com/science/article/pii/S0968090X19300245 [11] 赵建立, 石敬诗, 孙秋霞, 等. 基于混合深度学习的地铁站进出客流量短时预测[J]. 交通运输系统工程与信息, 2020, 20(5): 128-134. https://www.cnki.com.cn/Article/CJFDTOTAL-YSXT202005019.htmZHAO Jianli, SHI Jingshi, SUN Qiuxia, et al. Short-time inflow and outflow prediction of metro stations based on hybrid deep learning[J]. Journal of Transportation Systems Engineering and Information Technology, 2020, 20(5): 128-134. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-YSXT202005019.htm [12] PENG Yanni, XIANG Wanli. Short-term traffic volume prediction using GA-BP based on wavelet denoising and phase space reconstruction[J]. Physica A: Statistical Mechanics and its Applications, 2020(549): 123913. http://www.sciencedirect.com/science/article/pii/S0378437119321715 [13] ZHOU Xingyu, LI Hongmei, ZHENG Weihao, et al. Short-term traffic flow prediction based on the IMM-BP-UKF model[J]. Journal of Highway and Transportation Research and Development(English Edition), 2019, 13(2): 56-64. doi: 10.1061/JHTRCQ.0000679 [14] 李建森, 沈齐, 范馨月. 城市道路短时交通流量预测[J]. 数学的实践与认识, 2019, 49(5): 192-197. https://www.cnki.com.cn/Article/CJFDTOTAL-SSJS201905021.htmLI Jiansen, SHEN Qi, FAN Xinyue. Forecast of short-term traffic flow on urban roads[J]. Mathematics in Practice and Theory, 2019, 49(5): 192-197. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-SSJS201905021.htm [15] MIRJALILI S, MIRJALILI S M, LEWIS A. Grey Wolf Optimizer[J]. Advances in Engineering Software, 2014, 69(3): 46-61. http://www.sciencedirect.com/science/article/pii/s0965997813001853 [16] 傅蔚阳, 刘以安, 薛松. 基于灰狼算法与小波神经网络的目标威胁评估[J]. 浙江大学学报(工学版), 2018, 52(4): 680-686. https://www.cnki.com.cn/Article/CJFDTOTAL-ZDZC201804010.htmFU Weiyang, LIU Yian, XUE Song. Target threat assessment using grey wolf optimization and wavelet neural network[J]. Journal of Zhejiang University(Engineering Science), 2018, 52(4): 680-686. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-ZDZC201804010.htm [17] 梁强升, 许心越, 刘利强. 面向数据驱动的城市轨道交通短时客流预测模型[J]. 中国铁道科学, 2020, 41(4): 153-162. https://www.cnki.com.cn/Article/CJFDTOTAL-ZGTK202004018.htmLIANG Qiangsheng, XU Xinyue, LIU Liqiang. Data-driven short-term passenger flow prediction model for urban rail transit[J]. China Rail Way Science, 2020, 41(4): 153-162. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-ZGTK202004018.htm [18] 何正风. MATLAB R2015b神经网络技术[M]. 北京: 清华大学出版社, 2016.HE Zhengfeng. MATLAB R2015b neural network technology[M]. Beijing: Tsinghua University Press, 2016. (in Chinese) [19] NIU Peifeng, NIU Songpeng, LIU Nan, et al. The defect of the grey wolf optimization algorithm and its verification method[J]. Knowledge-Based Systems, 2019(171): 37-43. http://www.sciencedirect.com/science/article/pii/S0950705119300188