Subway passenger flow prediction based on optimized PSO-BP algorithm with coupled spatial-temporal characteristics
-
摘要: 为提高地铁客流预测的准确性,以西安地铁1号线为例,分析了地铁客流的耦合时空特征,提取了影响地铁客流变化的5个主要因素,包括节日、非节日、时间段、站点和天气,构建了反向传播(BP)神经网络,预测了地铁客流;利用引入自适应变异与均衡惯性权重的粒子群优化(PSO)算法,优化了BP神经网络,形成了考虑复杂因素影响的地铁客流预测系统;选取了换乘站、非换乘站的首站与中间站,引入天气、节日、非节日因素,对比了不同时间段下的BP神经网络模型,优化了PSO-BP神经网络模型的预测误差。研究结果表明:考虑天气、节日、非节日因素,换乘站点分时段优化PSO-BP神经网络模型预测的平均绝对误差、均方根误差和平均绝对百分比误差,较不分时段的优化PSO-BP神经网络模型分别平均下降了40.13%、31.46%和23.89%,较分时段的BP神经网络模型分别平均下降了17.50%、17.86%和17.32%;非换乘站点分时段优化PSO-BP神经网络模型预测的平均绝对误差、均方根误差和平均绝对百分比误差,较不分时段的优化PSO-BP神经网络模型分别平均下降了16.50%、20.99%和32.59%,较分时段的BP神经网络模型分别平均下降了11.48%、12.10%和17.73%;各站点分时段优化PSO-BP神经网络模型预测的平均绝对误差、均方根误差、平均绝对百分比误差,较不分时段的优化PSO-BP神经网络模型分别平均下降了24.37%、24.48%和29.69%,较分时段的BP神经网络模型分别平均下降了13.49%、14.02%和17.59%,因此,利用考虑多影响因素的优化PSO-BP神经网络模型能提高地铁客流预测的准确性。Abstract: To improve the accuracy of subway passenger flow prediction, by considering the Xi'an Metro Line 1 as an example, five main factors affecting subway passenger flow variations, such as festival, non-festival, time period, station, and weather, were extracted to analyze the coupled spatial-temporal characteristics of subway passenger flow. A back propagation (BP) neural network was constructed to predict the subway passenger flow. The proposed BP neural network was further optimized by using a particle swarm optimization (PSO) algorithm that introduced adaptive mutation and balanced inertia weights to form a subway passenger flow prediction system that could consider complex influence factors. Transfer stations and non-transfer stations including a first and an intermediate station were selected, the weather, festival, and non-festival factors were considered, and the BP neural network models for different time periods were compared. Then, the prediction errors of the PSO-BP neural network model were optimized. Research results show that by considering the weather, festival and non-festival factors, the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) of the optimized PSO-BP neural network model predictions at transfer stations within the optimized time periods decrease by 40.13%, 31.46% and 23.89%, respectively, compared with the optimized PSO-BP neural network models prediction errors without the time periods, decrease by 17.50%, 17.86% and 17.32% compared with the BP neural network models prediction errors within the optimized time periods. The MAE, RMSE, and MAPE of the optimized PSO-BP neural network model predictions in the non-transfer stations within the optimized time periods decrease by 16.50%, 20.99% and 32.59%, respectively, compared with the optimized PSO-BP neural network model prediction errors without time periods, and decrease by 11.48%, 12.10% and 17.73%, respectively, compared with the BP neural network model prediction errors within the optimized time periods. The MAE, RMSE, and MAPE of the optimized PSO-BP neural network model predictions at each station within the optimized time periods decrease by 24.37%, 24.48% and 29.69%, respectively, compared with the optimized PSO-BP neural network model prediction errors without time periods, and decrease by 13.49%, 14.02% and 17.59%, respectively, compared with the BP neural network model prediction errors within the given time periods. Therefore, using the optimized PSO-BP neural network model and considering the influencing factors can improve the accuracy of subway passenger flow prediction. 8 tabs, 12 figs, 30 refs.
-
表 1 站点早晚高峰类型划分
Table 1. Classification of morning and evening peak types at stations
工作日早晚高峰类型 站点 双峰早高峰客流较多 后卫寨、纺织城、三桥、皂河、枣园、汉城路、开远门、劳动路、半坡、北大街、五路口 双峰晚高峰客流较多 朝阳门 双峰早晚高峰客流一致 通化门 单峰为早高峰 长乐坡、浐河 单峰为晚高峰 康复路 早晚高峰客流基本一致 玉祥门、洒金桥、万寿路 表 2 雨雪天气与客流之间量的Spearman相关系数
Table 2. Spearman correlation coefficients between rainy/snowy day and passenger flow
天气类型 相关系数 显著性(双侧) 雨天 -0.813 0 雪天 -0.913 0 表 3 通化门站周内欧氏距离
Table 3. Euclidean distances in a week at Tonghuamen Station
星期 一 二 三 四 五 六 日 一 0.000 0 0.999 0 1.235 9 1.504 2 7.233 6 7.709 5 7.361 4 二 0.999 0 0.000 0 0.714 7 1.468 2 6.887 1 7.336 9 6.901 5 三 1.235 9 0.714 7 0.000 0 1.835 4 7.154 4 7.597 4 6.958 5 四 1.504 2 1.468 2 1.835 4 0.000 0 7.175 1 7.554 2 7.344 3 五 7.233 6 6.887 1 7.154 4 7.175 1 0.000 0 4.846 8 8.070 4 六 7.709 5 7.336 9 7.597 4 7.554 2 4.846 8 0.000 0 4.679 1 日 7.361 4 6.901 5 6.958 5 7.344 3 8.070 4 4.679 1 0.000 0 表 4 站点不同日期聚类结果
Table 4. Clustering results on different dates at each station
站点 周一 周二 周三 周四 周五 周六 周日 五路口 L1 L1 L1 L1 L2 L3 L4 通化门 L1 L1 L1 L2 L3 L4 L5 北大街 L1 L2 L2 L2 L3 L4 L5 后卫寨 L1 L2 L2 L2 L3 L4 L5 三桥 L1 L1 L2 L2 L3 L4 L5 皂河 L1 L2 L2 L2 L3 L4 L5 枣园 L1 L2 L1 L2 L3 L4 L5 汉城路 L1 L2 L2 L2 L3 L4 L5 开远门 L1 L2 L2 L2 L3 L4 L5 劳动路 L1 L1 L2 L2 L3 L4 L5 玉祥门 L1 L2 L1 L1 L3 L4 L5 洒金桥 L1 L1 L1 L2 L3 L4 L5 朝阳门 L1 L2 L2 L2 L3 L4 L5 康复路 L1 L1 L1 L2 L3 L4 L5 万寿路 L1 L2 L2 L2 L3 L4 L5 长乐坡 L1 L2 L2 L1 L3 L4 L5 浐河 L1 L2 L1 L1 L3 L4 L5 半坡 L1 L2 L2 L2 L3 L4 L5 纺织城 L1 L1 L2 L2 L3 L4 L5 表 5 换乘站不同时间段聚类结果
Table 5. Clustering results in different time periods at transfer station
时间段 周一至周三 周四 周五 周六 周日 06:00~07:00 M1 M1 M1 M1 M1 07:00~08:00 M2 M2 M2 M2 M2 08:00~ 09:00 M2 M2 M3 M3 M2 09:00~10:00 M3 M3 M1 M2 M2 10:00~11:00 M3 M3 M1 M2 M2 11:00~12:00 M3 M3 M1 M2 M2 12:00~13:00 M3 M3 M1 M3 M3 13:00~14:00 M3 M3 M2 M3 M3 14:00~15:00 M3 M3 M2 M3 M3 15:00~16:00 M3 M3 M2 M3 M3 16:00~17:00 M3 M3 M2 M3 M3 17:00~18:00 M2 M2 M3 M3 M3 18:00~19:00 M2 M2 M3 M3 M3 19:00~20:00 M3 M3 M2 M3 M3 20:00~21:00 M3 M3 M1 M2 M2 21:00~22:00 M3 M3 M1 M2 M2 22:00~23:00 M1 M1 M1 M2 M2 23:00~24:00 M1 M1 M1 M1 M1 表 6 劳动路站客流预测误差
Table 6. Passenger flow prediction errors at Laodonglu Station
客流预测 不分时段 分时段 BP神经网络模型 优化PSO-BP神经网络模型 BP神经网络模型 优化PSO-BP神经网络模型 误差评价指标 E1/[人次·(30 min)-1] 28.98 27.40 26.48 24.52 22.24 23.42 19.61 20.68 29.95 23.81 22.86 22.20 23.26 23.27 25.16 20.24 E2/[人次·(30 min)-1] 39.70 37.33 34.49 32.72 29.71 32.27 27.82 28.60 40.50 32.59 31.34 29.81 31.78 31.08 35.76 28.18 E3/% 8.69 8.81 8.78 8.13 6.78 6.96 6.86 6.62 8.73 8.42 6.75 7.10 9.00 7.20 7.36 5.91 表 7 后卫寨站客流预测误差
Table 7. Passenger flow prediction errors at Houweizhai station
客流预测 不分时段 分时段 BP神经网络模型 优化PSO-BP神经网络模型 BP神经网络模型 优化PSO-BP神经网络模型 误差评价指标 E1/[人次·(30 min)-1] 35.57 36.01 29.01 25.16 23.52 23.44 21.05 20.80 36.55 29.27 25.61 20.53 35.91 26.19 21.20 20.82 E2/[人次·(30 min)-1] 40.26 40.20 35.04 34.38 27.82 27.85 25.21 24.28 41.98 32.56 26.53 23.06 38.35 35.54 29.19 24.57 E3/% 8.03 8.07 7.11 7.23 5.94 5.56 3.58 3.86 7.61 7.58 5.38 3.93 8.56 7.00 5.35 4.06 表 8 五路口站客流预测误差
Table 8. Passenger flow prediction errors at Wulukou Station
客流预测 不分时段 分时段 BP神经网络模型 优化PSO-BP神经网络模型 BP神经网络模型 优化PSO-BP神经网络模型 误差评价指标 E1/(人次·h-1) 47.80 47.98 40.51 41.17 30.28 29.88 24.37 24.65 47.26 42.49 29.54 25.06 48.89 40.52 29.81 24.52 E2/(人次·h-1) 56.64 56.04 49.84 47.99 41.02 40.04 32.79 32.89 54.84 48.88 39.58 33.24 56.65 45.26 39.52 32.65 E3/% 4.75 4.79 3.35 3.39 3.02 3.06 2.81 2.53 4.82 3.38 3.19 2.74 4.79 3.45 2.98 2.05 -
[1] LU Jia, REN Gang, XU Ling-hui. Analysis of subway station distribution capacity based on automatic fare collection data of Nanjing Metro[J]. Journal of Transportation Engineering Part A: Systems, 2020, 146(2): 04019067. doi: 10.1061/JTEPBS.0000304 [2] KALKSTEIN A J, KUBY M, GERRITY D, et al. An analysis of air mass effects on rail ridership in three US cities[J]. Journal of Transport Geography, 2009, 17(3): 198-207. doi: 10.1016/j.jtrangeo.2008.07.003 [3] LIU Cheng-xi, SUSILO Y O, KARLSTRÖM A. Investigating the impacts of weather variability on individual's daily activity-travel patterns: a comparison between commuters and non-commuters in Sweden[J]. Transportation Research Part A: Policy and Practice, 2015, 82: 47-64. doi: 10.1016/j.tra.2015.09.005 [4] GUO Yong-qing, WANG Xiao-yuan, XU Qing, et al. Weather impact on passenger flow of rail transit lines[J]. Civil Engineering Journal, 2020, 6(2): 276-284. doi: 10.28991/cej-2020-03091470 [5] PEREIRA F C, RODRIGUES F, BEN-AKIVA M. Using data from the web to predict public transport arrivals under special events scenarios[J]. Journal of Intelligent Transportation Systems, 2015, 19(3): 273-288. doi: 10.1080/15472450.2013.868284 [6] WANG Hai-yang, LI Long-yuan, PAN Ping-jun, et al. Early warning of burst passenger flow in public transportation system[J]. Transportation Research Part C: Emerging Technologies, 2019, 105: 580-598. doi: 10.1016/j.trc.2019.05.022 [7] JUN M J, CHOI K, JEONG J E, et al. Land use characteristics of subway catchment areas and their influence on subway ridership in Seoul[J]. Journal of Transport Geography, 2015, 48: 30-40. doi: 10.1016/j.jtrangeo.2015.08.002 [8] ZHANG Jian, GUO Wei-hao. Research on railway passenger flow prediction method based on GA improved BP neural network[J]. Journal of Computer and Communications, 2019, 7(7): 283-292. doi: 10.4236/jcc.2019.77023 [9] 梅妍玭, 张得才, 傅荣. 一种准确预测船舶交通流的自适应遗传算法优化的BP神经网络模型研究[J]. 电子器件, 2020, 43(2): 452-455. doi: 10.3969/j.issn.1005-9490.2020.02.038MEI Yan-pin, ZHANG De-cai, FU Rong. A BP neural network model for adaptive genetic algorithm optimization for predicting ship traffic flow[J]. Chinese Journal of Electron Devices, 2020, 43(2): 452-455. (in Chinese) doi: 10.3969/j.issn.1005-9490.2020.02.038 [10] 秦琪怡, 郭承湘, 吴帅, 等. 基于粒子群和布谷鸟搜索的BP神经网络优化方法研究[J]. 广西大学学报(自然科学版), 2020, 45(4): 898-905. https://www.cnki.com.cn/Article/CJFDTOTAL-GXKZ202004024.htmQIN Qi-yi, GUO Cheng-xiang, WU Shuai, et al. On BP neural network optimization based on particle swarm optimization and cuckoo search fusion[J]. Journal of Guangxi University (Natural Science Edition), 2020, 45(4): 898-905. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-GXKZ202004024.htm [11] LYU Yong-yang, LIU Wen-ju, WANG Ze, et al. WSN localization technology based on hybrid GA-PSO-BP algorithm for indoor three-dimensional space[J]. Wireless Personal Communications, 2020, 114(1): 167-184. doi: 10.1007/s11277-020-07357-4 [12] XU Xin-yue, LI Hai-ying, LIU Jun, et al. Passenger flow control with multi-station coordination in subway networks: algorithm development and real-world case study[J]. Transportmetrica B: Transport Dynamics, 2019, 7(1): 446-472. doi: 10.1080/21680566.2018.1434020 [13] 毛焕宇, 王文东. 融合隶属度函数的自适应惯性权重模式的粒子群优化算法[J]. 计算机应用与软件, 2020, 37(1): 277-283. https://www.cnki.com.cn/Article/CJFDTOTAL-JYRJ202001046.htmMAO Huan-yu, WANG Wen-dong. Particle swarm optimization based on adaptive inertia weight model with membership function[J]. Computer Applications and Software, 2020, 37(1): 277-283. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JYRJ202001046.htm [14] CHEN Hai-tao, WANG Wen-chuan, CHEN Xiao-nan, et al. Multi-objective reservoir operation using particle swarm optimization with adaptive random inertia weights[J]. Water Science and Engineering, 2020, 13(2): 136-144. doi: 10.1016/j.wse.2020.06.005 [15] 尹芹, 孟斌, 张丽英. 基于客流特征的北京地铁站点类型识别[J]. 地理科学进展, 2016, 35(1): 126-134. https://www.cnki.com.cn/Article/CJFDTOTAL-DLKJ201601014.htmYIN Qin, MENG Bin, ZHANG Li-ying. Classification of subway stations in Beijing based on passenger flow characteristics[J]. Progress in Geography, 2016, 35(1): 126-134. https://www.cnki.com.cn/Article/CJFDTOTAL-DLKJ201601014.htm [16] 马超群, 张爽, 陈权, 等. 客流特征视角下的轨道交通网络特征及其脆弱性[J]. 交通运输工程学报, 2020, 20(5): 208-216. https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202005021.htmMA Chao-qun, ZHANG Shuang, CHEN Quan, et al. Characteristics and vulnerability of rail transit network from the perspective of passenger flow characteristics[J]. Journal of Traffic and Transportation Engineering, 2020, 20(5): 208-216. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202005021.htm [17] 赵阳阳, 夏亮, 江欣国. 基于经验模态分解与长短时记忆神经网络的短时地铁客流预测模型[J]. 交通运输工程学报, 2020, 20(4): 194-204. https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202004020.htmZHAO Yang-yang, XIA Liang, JIANG Xin-guo. 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 [18] ZHANG Wen-yao, WEI Zong-wen, WANG Bing-hong, et al. Measuring mixing patterns in complex networks by Spearman rank correlation coefficient[J]. Physica A: Statistical Mechanics and its Applications, 2016, 451: 440-450. doi: 10.1016/j.physa.2016.01.056 [19] 胡伟. 改进的层次K均值聚类算法[J]. 计算机工程与应用, 2013, 49(2): 157-159. doi: 10.3778/j.issn.1002-8331.1106-0299HU Wei. Improved hierarchical K-means clustering algorithm[J]. Computer Engineering and Applications, 2013, 49(2): 157-159. (in Chinese) doi: 10.3778/j.issn.1002-8331.1106-0299 [20] 杨辉华, 王克, 李灵巧, 等. 基于自适应布谷鸟搜索算法的K-means聚类算法及其应用[J]. 计算机应用, 2016, 36(8): 2066-2070. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY201608003.htmYANG Hui-hua, WANG Ke, LI Ling-qiao, et al. K-means clustering algorithm based on adaptive cuckoo search and its application[J]. Journal of Computer Applications, 2016, 36(8): 2066-2070. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY201608003.htm [21] MORIN L, GILORMINI P, DERRIEN K. Generalized Euclidean distances for elasticity tensors[J]. Journal of Elasticity, 2020, 138(2): 221-232. doi: 10.1007/s10659-019-09741-z [22] WANG Wen-wu, CICHOCKI A, CHAMBERS J A. A multiplicative algorithm for convolutive non-negative matrix factorization based on squared Euclidean distance[J]. IEEE Transactions on Signal Processing, 2009, 57(7): 2858-2864. doi: 10.1109/TSP.2009.2016881 [23] KLØVE T, LIN T T, TSAI S C, et al. Permutation arrays under the Chebyshev distance[J]. IEEE Transactions on Information Theory, 2010, 56(6): 2611-2617. doi: 10.1109/TIT.2010.2046212 [24] 苏崇宇, 汪毓铎. 基于改进的自适应遗传算法优化BP神经网络[J]. 工业控制计算机, 2019, 32(1): 67-69. doi: 10.3969/j.issn.1001-182X.2019.01.027SU Chong-yu, WANG Yu-duo. BP neural network optimized by improved adaptive genetic algorithm computer engineering and applications[J]. Industrial Control Computer, 2019, 32(1): 67-69. (in Chinese) doi: 10.3969/j.issn.1001-182X.2019.01.027 [25] 龚麒鉴, 郭亚宾, 陈焕新, 等. 基于粒子群优化算法和BP神经网络的变频压缩机功率预测[J]. 制冷学报, 2020, 41(1): 89-95. https://www.cnki.com.cn/Article/CJFDTOTAL-ZLXB202001013.htmGONG Qi-jian, GUO Ya-bin, CHEN Huan-xin, et al. Prediction of variable-speed compressor power based on particle swarm optimization and back propagation neural network[J]. Journal of Refrigeration, 2020, 41(1): 89-95. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-ZLXB202001013.htm [26] YANG Liu, CHEN Han-xin. Fault diagnosis of gearbox based on RBF-PF and particle swarm optimization wavelet neural network[J]. Neural Computing and Applications, 2019, 31(9): 4463-4478. doi: 10.1007/s00521-018-3525-y [27] HU Yu-sha, LI Ji-geng, HONG Men-na, et al. Short term electric load forecasting model and its verification for process industrial enterprises based on hybrid GA-PSO-BPNN algorithm—a case study of papermaking process[J]. Energy, 2019, 170: 1215-1227. doi: 10.1016/j.energy.2018.12.208 [28] KHAIR U, FAHMI H, AL HAKIM S, et al. Forecasting error calculation with mean absolute deviation and mean absolute percentage error[C]//IOP. Journal of Physics Conference Series. Bristol: IOP, 2017: 012002. [29] PISHDAD L, LABEAU F. Analytic minimum mean-square error bounds in linear dynamic systems with gaussian mixture noise statistics[J]. IEEE Access, 2020, 8: 67990-67999. doi: 10.1109/ACCESS.2020.2986420 [30] WAGNER K, DOROSLOVAČKI M. Proportionate-type normalized least mean square algorithms with gain allocation motivated by mean-square-error minimization for white input[J]. IEEE Transactions on Signal Processing, 2011, 59(5): 2410-2415. doi: 10.1109/TSP.2011.2106123