Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 5, No. 2, 2023 200 Short‐term Prediction of Suzhou Rail Transit Passenger Flow Based on Combination Model Jiawei Jiang1, Jinbao Zhao1, 2, *, Wenjing Liu1, Yuejuan Xu1, Mingxing Li1 1 School of Transportation and Vehicle Engineering, Shandong University of Technology, Zibo, Shandong, 255000, China 2 School of Transportation, Southeast University, Nanjing, 210009, Jiangsu, 210009, China * Corresponding author Abstract: With the increasing economic development of China, the country encourages to develop public transport strongly, and urban rail transit has become a choice for more and more cities. But for rail transit operations, passenger flow prediction is becoming more and more important and has become a key issue in transportation planning. However, the effect of a single model on predicting short-term passenger flow is not ideal. Therefore, this study proposes a combined model based on GA-BP neural network and forecasts the passenger flow of Suzhou Urban Rail Transit Line 1 according to weather, holidays, and other factors. Meanwhile, the study compares with the ARIMA and BP neural network models. The results show that the accuracy of GA-BP model improved by 6.06% and 8.69% respectively which compared with the former, and the results have improved the accuracy of passenger flow prediction effectively. It is proved that the combined model has certain practical value. Keywords: Urban Rail Transit, Passenger Flow Forecast, Time Series, Neural Network, Combination model. 1. Introduction In recent years, China’s economy has grown rapidly, and the number of cars has increased gradually, which has caused a series of urban traffic problems such as traffic congestion and serious pollution. Therefore, many cities choose to build subway systems to solve urban traffic problems. With the rapid development of the urban rail transit system, the system network is becoming more and more complex, and the passenger flow of the subway is increasing day by day, which brings higher challenges to the operation of urban rail transit. How to predict the short-term passenger flow accurately is important for a reasonable planning and operation plan especially. Zhang et al. [1] improved the ARIMA model for the poor regularity and significant nonlinear characteristics of the short-term passenger flow data, and predicted the passenger flow of the Tianfu Square Station of Chengdu Rail Transit, thus proving that the improved ARIMA model has more advantages for short-term passenger flow prediction; Shi[2] et al. analyzed and predicted the passenger flow of rail transit through random forest (RF), BP neural network, Long-term short-term memory neural network (LSTM), and compared MAE, R2 and other indicators to prove that the LSTM model fits better; Lv et al.[3] used a two-way LSTM prediction model, based on the passenger flow data of Guangzhou South Railway Station, Zhuhai Station and Xiaolan Station, and improved the prediction accuracy by adjusting the model step size. The results of the study show that the accuracy of the improved Bi-LSTM model is better than that of the LSTM model; Zhao et al. [4] proposed IPSO-LSTM model to solve the problem that particle swarm optimization (PSO) is prone to fall into local optimization. By adding a dynamic adaptive inertia weight to prevent falling into local optimization, the passenger flow of rail transit is predicted. The experimental results show that the prediction accuracy of the combined model is better than that of PSO-LSTM model; Halyal et al. [5] used AFC system to forecast passenger flow based on LSTM model and seasonal autoregressive moving average model (SARIMA). The research results show that the model can be well applied to the traffic conditions of developing countries, Guo et al. [6] proposed SVM-LSTM combined model to solve the problem of difficult prediction of abnormal passenger flow. The results show that the SVM-LSTM model is more sensitive to abnormal changes of passenger flow than the single model, and the prediction accuracy is higher. To sum up, the existing methods for short-term passenger flow prediction of rail transit are mainly to improve the prediction accuracy by combining time series and neural network with other algorithms. According to the characteristics and practicability of genetic algorithm, this paper combines it with neural network to build a GA-BP combination model to predict the passenger flow. Based on the passenger flow data of Suzhou Metro Line 1, we use python to the program and make a short-term prediction of passenger flow. 2. Model Method 2.1. ARIMA Method ARIMA (p, d, q) model is a differential autocorrelation moving average model. It is one of the commonly used methods for short-term passenger flow prediction of rail transit[7]. ARIMA model is composed of the AR model and the MA model. Its general form is shown in formula (1): 1 1 p q t i t i t i t i i i y y             (1) In the above formula, ty is the current value,  is a constant term, p and q are orders, i and i are the correlation coefficients of AR and MA models, respectively, t is the residual sequence. The basic flow of the model prediction is shown in Figure 1. 201 Figure 1. ARIMA Model Modeling Process 2.2. BP Neural Network Model BP neural network is a basic and widely used model at present. It is mainly divided into two processes: forward transfer of calculation results and reverse transfer of calculation errors [8]. Forward propagation is mainly responsible for calculating the final predicted value according to the input value, backpropagating the main error feedforward, and constantly adjusting each weight in this process [9]. The model structure is shown in figure 2. X1 X2 X3 Xp ... Z1 Z2 Zm ... Y1 Y2 Yk ... Input Layer Hidden Layer Output Layer input ∑ f an b Neuron with bias w1 w2 wp p Single neuron ihw how Figure 2. BP Neural Network Model Structure BP neural network has many advantages: (1) In the process of network training, BP neural network compares the difference between the output value and the label to improve the prediction accuracy constantly. (2) The BP neural network has strong fault tolerance, that is, the abnormal weight of a neuron in the neural network will not have a great influence on the prediction of the network. (3) BP neural network is effective in fitting nonlinear data, and only one hidden layer can fit many nonlinear problems in real life. It makes BP neural network suitable for solving short-term passenger flow forecasting problems [10]. However, the algorithm also has some shortcomings: (1) The core of BP neural network algorithm lies in error feedback and gradient decline, so the convergence speed is slow. (2) It is difficult to determine the number of nodes in BP neural network. (3) The weight of BP neural network is adjusted along the direction of local improvement, which will make the algorithm fall into a local minimum [11]. Therefore, when using BP neural network, we should combine other algorithms to optimize it, considering that BP neural network randomizes the initial weight and is very sensitive to the initial weight. Therefore, genetic algorithm can be used to solve the optimal initial weight. 2.3. GA-BP Neural Network Combination Model Genetic algorithm is a global optimization technique that mimics the law of natural selection in which the fittest organisms survive. It can solve complex combinatorial optimization problems and provide faster optimization results than traditional single optimization algorithms effectively. Currently, genetic algorithms are extensively used in combinatorial models. In the GA-BP combinatorial model, the genetic algorithm can efficiently search for the optimal initial weight and threshold in the BP model, as well as preventing the BP network from getting trapped in local optimization. The main training steps of the GA-BP model are as follows [12]: (1) Generate the initial population randomly. (2) Calculate the fitness value. The measurement of fitness value f is based on the difference between the predicted value and the real value of passenger flow, and its calculation formula is as shown in the formula: (2) Where, ˆiy is the predicted value and iy is the real value. (3) Select operation. The selection operation utilizes the roulette method. As formula (2), the fitness value is based on the difference between the predicted and actual passenger flow values. It means that the higher the fitness value, the greater the chance of being selected [13]. The selection probability can be calculated using the following formulas (3)-(4): (3) 1 i i n i i F p F    (4) (4) Cross operation. The crossover operation takes place on   1 ˆ k i i i f y y    1 i i F f  202 a random gene segment of two chromosomes, allowing for the exchange of genes within the population and providing new opportunities to discover the global optimal solution. For example, the chromosome and the chromosome are crossed at the position. The formula for the crossover operation is given by formula(5):       1 0 1 1 xl xl yl yl yl xl g g - z g z z , g g - z g z         (5) Where, z is a random number in the interval [0,1]. (5) Mutation operation. The mutation operation typically affects a specific gene segment within a single chromosome, and aims to introduce more variability into the population of genes, allowing for escape from local optima. (6) Calculate the fitness function. If the termination condition is met, the initial weight and threshold are returned. Otherwise, the selection operation is repeated from step (3). (7) Once the initial weight and threshold have been determined, the process continues with the BP neural network, which is outlined in detail in Figure 3. Figure 3. GA-BP Neural Network Flow Chart The above outlines the complete workflow of the GA-BP neural network. 3. Analysis of the Characteristics of Passenger Flow at the Site 3.1. Introduction of Suzhou Rail Transit Suzhou Rail Transit, which began operation on April 28, 2012, is the 15th city in mainland China to open urban rail transit lines. It is also the first prefecture-level city in China to build and operate subways. As of June 2021, five urban rail transit lines in operation in Suzhou, with a total length of 210 km. This study focuses on passenger flow data for Suzhou Metro Line 1 between June 7, 2020 and September 14, 2020 primarily [14]. The route of Suzhou Metro Line 1 is displayed in Figure 4. Figure 4. Metro Line 1 in Suzhou 203 3.2. Time Distribution Law of Passenger Flow The daily passenger flow of rail transit typically reflects the daily routine of urban residents, resulting in bimodal characteristics, as displayed in Figure 5. The passenger flow of rail transit during the week also follows certain patterns. On lines primarily used for commuting and studying, non- working day passenger flow is lower than that of working days, while on lines serving shopping malls and tourist attractions, non-working day passenger flow exceeds that of working days, as illustrated in Figure 6. Figure 5. Variation Law of Daily Passenger Flow Figure 6. Variation Law of Weekly Passenger Flow Furthermore, there is a seasonal variation pattern in passenger flow, weather and holidays are significant influencing factors. Therefore, when utilizing the BP neural network to forecast passenger flow, the impact of weather and holidays is considered. The classification of air temperature is mainly based on comparison with the temperature difference from the previous day, and is quantified on a scale of 0 to 3 according to the magnitude of the temperature difference, from large to small. The precise quantitative criteria are demonstrated in Table 1. Table 1. Quantitative Criteria for Some Factors Quantitative indicators Quantitative processing standard Weather Condition Bad :0 Rain and Snow:1 Overcast Sky:2 Clear day:3 Air Temperature Extreme Temperature Difference:0 Large Temperature Difference:1 Small Temperature Difference:2 Minimal Temperature Difference:3 Festival and Holiday Not a holiday: 0 Is it a holiday: 1 3.3. Spatial Distribution Characteristics In general, passenger flow varies across rail lines with different land use significantly, due to the facilities in the station's surrounding area. Additionally, there are variations in passenger flow between stations on the same line, particularly during morning and evening peak hours. Furthermore, passenger flow differs across various sections of the line due to differences in the number of passenger distribution points and line density coverage in the station's radiation area. If there is a substantial difference in passenger flow between sections, it may be necessary to consider large 204 and small intersections. 4. Passenger Flow Forecast 4.1. Determination of Parameters The BP neural network has 10 input neurons, which include the passenger flow of the previous 7 days, as well as weather conditions, temperature, and holiday information. The output layer consists of 1 neuron, which predicts the passenger flow. There is only 1 hidden layer, and the number of neurons in this layer can be determined by referring to an empirical formula [15], as shown in formula (6): h m n a   (6) where m and n are the number of neurons in the input and output layers, respectively, and a is a constant between 1 and 10 that allows fine-tuning the number of neurons. The combined model is based on the BP neural network and employs the genetic algorithm to optimize the initial network weights. Real number encoding is used for the encoding method, and the hyperparameters are specified in Table 2: Table 2. Super parameter setting Hyperparameter type Hyperparameter value Population size 8 Maximum Iterations 10 Crossover rate 0.8 Variation rate 0.1 4.2. Evaluation Criteria In order to evaluate the fitting effect of different models more objectively, the study uses a series of indexes such as mean square error to evaluate the model [16], and its formula is shown in (7) to (10). Mean square error: (7) Mean absolute error:   2 1 1 n i i i ˆMAE y y n    (8) Average absolute percentage error: 1 1 n i i i ˆMAPE y y n    (9) R-squared:     2 1 1 1 n i i i n i i ŷ y R y y         (10) The variable n represents the sample size of the research data, where iy is the real passenger flow on the i-th day, iŷ is the predicted passenger flow on the i-th day, and y is the average passenger flow. The MSE, MAE, and MAPE measure the deviation between the real values and the predicted values [17]. The closer the R-squared is to 1, the better the fitting effect of the model, and vice versa. However, as the sample size increases, the R-squared is bound to increase, making it impossible to accurately judge the accuracy of the model. Therefore, it is necessary to use multiple indicators to analyze and evaluate the model. 4.3. Analysis of Model Results 4.3.1. Prediction Result of Time Series Figure 7. Prediction result of time series Based on Figure 7, it is evident that time series prediction can identify the trend and development patterns of variables, thereby enabling effective future prediction. However, this approach disregards the influence of external conditions typically. In actual prediction, the historical and present development patterns may differ, leading to a significant deviation. The MSE value for this time series prediction is 0.8545, the MAE value is 0.6492, and the R2 value is 0.9158, indicating relatively accurate overall prediction. However, the maximum error can reach 3.3531. This could be due to the sudden surge in passenger traffic caused by some holidays (such as May Day Golden week) or sharp decreases in public emergencies (such as the COVID-19 pandemic), which can   2 1 1 ˆ n i i i MSE y y n    205 invalidate the method in some cases. Therefore, we need models with stronger generalization ability. 4.3.2. Prediction Result of BP Neural Network Figure 8. Prediction result of BP neural network Based on Figure 8, it is evident that the BP neural network has a better fitting effect for some specific points as compared to time series prediction. This can be attributed to the excellent learning ability of the BP neural network. The maximum error of this fitting result is 2.8097, which is lower than the 3.3531 error observed for time series prediction. However, the traditional BP neural network has a slow convergence speed and relatively low fitting efficiency. The fitting MSE is 1.1961 and MAE is 0.8771, which are both higher than the results obtained from time series fitting. Additionally, the R2 value of the BP neural network is 0.8901, which is lower than the R-squared value obtained from time series prediction. Therefore, the fitting effect of traditional BP neural network is not optimal and requires improvement to enhance its prediction accuracy. 4.3.3. Prediction Results of GA-BP Neural Network Combination Model Figure 9. GA-BP Neural Network Prediction Based on Figure 9, it is apparent that the neural network improved by genetic algorithm is more suitable for actual passenger flow and has a superior fitting effect. Its MSE is 0.2427, MAE is 0.4147, maximum error is 1.4416, and R2 is 0.9749, which is better than the results obtained by time series prediction and BP neural network prediction. This model can effectively predict various changes in passenger flow. 4.3.4. Analysis of Forecast Results Based on Figure 10, it is evident that the improved combination model has a higher degree of fitting to the predicted value. Furthermore, the model's advantages include fast convergence speed, high algorithm efficiency, and an ability to avoid local optima, as illustrated in Figure 11. 206 Figure 10. Comparison Between Various Algorithms And Real Values Figure 11. Comparison of Loss Functions The comparison of the combined model evaluation and the evaluation of the other two algorithms is presented in Figure 12. It is evident from the figure that the GA-BP combined model has better prediction results than the other two models. The specific values in Table 3 indicate that the maximum error of the time series prediction is the highest, indicating a higher probability of urban rail operations facing overloading or insufficient capacity on a certain day. However, the low training efficiency of the traditional neural network model generally leads to lower accuracy compared to the time series prediction. Therefore, the improved GA-BP combination model solves the problem of the traditional neural network by calculating the initial weight and threshold instead of generating them randomly, leading to faster convergence of the network. Figure 12. Comparison of Loss Functions 207 Table 3. Comparison of Different Evaluation Indexes Prediction Model MSE MAE Max Error MAPE R2 Time series model 0.8545 0.6492 3.3531 2.4% 0.9158 BP neural network model 1.1961 0.8771 2.8097 2.9% 0.8901 GA-BP neural network model 0.2427 0.4147 1.4416 1.7% 0.9749 Additionally, it is worth noting that the GA-BP neural network not only has the smallest overall error, but also has a daily MAPE error of less than 0.05, which is consistently low and stable over time, as depicted in Figure 13. This stability can prevent significant deviations between the predicted and actual passenger flow values effectively. Otherwise, it could result in capacity shortages or overloading issues. Figure 13. Daily MAPE Error Comparison 5. Conclusion Short-term passenger flow forecasting is critical for the operation and management of urban rail transit. However, passenger flow in urban rail transit stations exhibits remarkable characteristics of nonlinearity, complexity, and periodicity. Therefore, a single-model forecasting method cannot capture the changing patterns of passenger flow fully and is not suitable for daily passenger flow forecasting [18]. To address the issue of insufficient accuracy in short-term passenger flow forecasting, this study proposes a combined model that utilizes a GA-BP neural network along with objective factors like weather and holidays. The model obtains the initial optimal value of weight by applying genetic algorithm, thereby improving the neural network's ability to learn and iterate. The findings demonstrate that compared to the single time series prediction model and traditional BP neural network model, the GA-BP combined model enhances passenger flow prediction accuracy by 6.06% and 8.69% respectively. The improvement reduces prediction error and captures the changing patterns of passenger flow accurately. Consequently, the proposed model benefits the subway operation management department in devising better train operation plans, which prevent issues of insufficient and overloaded transport capacity. This not only ensures passenger comfort but also aligns with the call for national green and low-carbon development by harnessing the potential of energy savings and emission reduction, thereby enhancing energy efficiency. References [1] ZHANG Guoyun, JIN Hui. RESEARCH ON THE PREDICTION OF SHORT-TERM PASSENGER FLOW OF URBAN RAIL TRANSIT BASED ON IMPROVED ARIMA MODEL[J]. Computer Applications and Software, 2022,39(01): 339-344. [2] SHI Xuerong, WANG Chonghui, LIU Dongjie, et al. Prediction and visualization of rail transit passenger flow based on deep neural network[J]. Electronic Technology & Software Engineering, 2020(19):182-185. [3] LV Qiuxia, ZHONG Xiaoqing, REN Yasi. A Short-term Passenger Flow Prediction Method for Guangzhou-Zhuhai Intercity Railway Based on Bi-LSTM Network[J]. JOURNAL OF WUYI UNIVERSITY(Natural Science Edition), 2022,36(01):50-56. [4] ZHAO Mingwei, ZHANG Wensheng. Short-Term Passenger Flow Prediction of Urban Rail Transit Based on IPSO-LSTM Combined Model[J]. RAILWAY TRANSPORT AND ECONOMY, 2022,44(02):123-130. [5] HALYAL S, MULANGI R H, HARSHA M M. Forecasting public transit passenger demand: With neural networks using APC data[J]. Case Studies on Transport Policy, 2022,10(2). [6] JIANYUAN G, ZHEN X, YONG Q, et al. Short-Term Abnormal Passenger Flow Prediction Based on the Fusion of SVR and LSTM.[J]. IEEE Access, 2019,7. [7] FAN Xueqiang. Research on Forecast of Short-term Passenger Flow of Urban Rail Transit[D]. Lanzhou:Lanzhou Jiaotong University, 2015. 208 [8] LIU Chengxi, NI Shaoquan. Short-time passnger flow prediction of high-speed railway based on BP-GRU combined model[J]. China Transportation Review, 2022:1-7. [9] ZONG Junzhen. Research on passenger flow forecast of Urban Rail Transit Based on BP neural network [J]. Western China Communications Science & Technology, 2021, (09): 163-164. [10] ZHANG Yiming, CHEN Mingming, SHI Lei, et al. A Forecast of Short-term Passenger Flow of Rail Transit Based on IGWO- BP Algorithm[J]. Journal of Transport Information and Safety, 2021,39(03):85-92 [11] Xiao Mingliang. Research on subway passenger flow forecast based on improved BP neural network [D]. Nanchang : Nanchang University, 2021. [12] MA Yue. An intelligent bus dispatch system based on fuzzy genetic algorithms [D]. Inner Mongolia:: Inner Mongolia University, 2016. [13] QIANG Tiangang, LIU Tao, PEI Yulong. Combined Prediction Model of SARIMA and GA- BP Neural Network for Subway Passenger Flow [J]. Railway Transport and Economy. , 2021, 43(12): 134-142. [14] ZHUANG Chutian, WU Chenchen, Gu Tianqi, et al. Analysis on Characteristics of Rail Transit and Conventional Bus Transfer in Suzhou [J]. Traffic & Transportation, 2021, 37(04): 51-55. [15] TANG Qiusheng, WANG Chuan. Optimized of BP neural network based on cloud genetic algorithm to predict orbital passenger flow [J]. Journal of Guilin University of Technology, 2021, 41(02): 403-408. [16] SUN Yue, SONG Xiaoyu, JIN Liting, et.al. RAILWAY PASSENGER FLOW FORECAST BASED ON ARMA- LSTM COMBINED MODEL [J]. Computer Applications and Software, 2021, 38(12): 262-267. [17] GONG Lanlan, LING Xinghong. Experimental design of short- term bus passenger flow forecasting based on LSTM[J]. Modern Electronics Technique, 2021, 38(12): 262-267. [18] CHEN Wangqiang. Research on Short-term Passenger Flow Forecasting Method Based on Deep Learning[D]. Beijing: Beijing Jiaotong University, 2021.