Minimizing Metro Transfer Waiting Time with AFCS Data Using Simulated Annealing with Parallel Computing

Coordinating train arrivals at transfer stations by altering their departure times can reduce transfer waiting time (TWT) and improve level of service.This paper develops a method to optimize train departure times from terminals thatminimizes total TWT for an urban rail network with many transfer stations. To maintain service capacity and avoid operational complexity, dispatching headway is fixed. An integrated Simulated Annealing with parallel computing approach is applied to perform the optimization. To demonstrate model applicability and performance, the Shenzhen metro network is applied, where passenger flows (i.e., entry, transfer, and exit) at stations are approximated with the automatic fare collection system (AFCS) data. Results show that the total TWT can be significantly reduced.


Introduction
For large-scale metro networks, large numbers of passengers arrive simultaneously at transfer stations, especially during peak periods.Transfer time incurred by passengers has been considered as an index of service quality.Synchronizing vehicle arrival times to facilitate effective timed transfer is desirable.
Transfer time is defined in this study as the elapsed time between a passenger alighting from a "delivery" train to boarding a "pickup" train, which consists of walking time between platforms and transfer waiting time (TWT) for the "pickup" train.Walking time is dependent on the layout of the station and walking speed, while TWT is affected by the arrival/departure times of the trains and walking time.To minimize TWT for a large metro network, the relationship between demand (i.e., spatiotemporal transfer passenger distribution) and supply (i.e., network configuration, service frequency, and departure time) must be carefully formulated.
Automatic fare collection systems (AFCS) have been applied in many metro systems (i.e., Metro Card in New York, Oyster Card in London, etc.).With the AFCS data in this study, the temporal and spatial passenger entry/exit distributions and transfer volumes at stations can be determined.We aim to seek a quick and easy-to-implement method to effectively reduce TWT without increasing operator's cost and operational complexity.To this end, we alter the train departure times from terminals but fix the dispatching headways.The research problem is combinatorial, which is difficult to solve with classic optimization methods.An integrated Simulated Annealing (SA) with parallel computing (PC) approach is developed to search for the solution that minimizes TWT.
The remainder of this paper is structured as follows.Section 2 describes previous research and practices related to this study.The development of the proposed model and solution method to solve the study problem are discussed in Sections 3 and 4, respectively.In Section 5, the Shenzhen Metro in China is employed as a case study to demonstrate the effectiveness of the solution algorithm and the benefits of the optimized solution.Finally, the paper concludes with a summary of findings and future research needs.

Literature Review
Coordinating train arrivals to facilitate transfer activities in a transit network offers an effective way to reduce transfer time.Transfer time is an important indicator representing the service quality and the efficiency of public transit systems [1][2][3].Previous studies have focused on minimizing total waiting time [4][5][6][7][8] or maximizing the number of synchronized vehicle arrivals [9,10] at transfer nodes.Recently, several studies focused on the first and last trains timetabling optimization, with objectives such as maximizing passenger transfer connection headways [11], minimizing the connection time between first trains [12], incorporating bilevel objectives in which the upper level maximizes social benefit (the number of passengers transferring to the last trains successfully) with minimum total subsidy and the lower level minimizes revenue loss for the operating companies [13], and maximizing the total number of successful transfer passengers and minimizing waiting times for rail-to-bus passengers [14].
Several studies optimized coordination of transfers at a single hub station.Feng et al. [15] developed an optimization model for the arrival and departure times of connecting trains, which minimized average waiting time.Liu et al. [16] developed a multiobjective optimization model to minimize the total transfer waiting time, train operating cost, and fluctuation of departure interval with given transfer volumes.The optimized results were found using a genetic algorithm (GA).Chen and Wang [17] minimized passenger waiting time via synchronizing train arrivals and departures and revealed the relationships between three influencing factors (transfer forms, walking distance in the station, and congestion degree of passenger flow) and transfer time.
Optimizing coordination among multiple transfer stations was conducted by previous studies.Assuming uniform passenger arrivals, Wong et al. [18] presented a mix-integer programming model to optimize nonperiodic timetable.A heuristic approach was employed to minimize the waiting time by justifying the train running time between stations, dwell times at stations, and departure and turnaround times at terminals.Fang et al. [19] minimized total waiting time yielded by the optimized vehicle arrival and departure times at transfer stations.Aksu and Akyol [20] optimized integerratio headways to minimize total cost.Considering random passenger arrivals, Liu et al. [21] minimized total waiting time by altering the train departure times found by SA.To improve transfer efficiency, Wu et al. [22] optimized vehicle departure time, headway, running time, and dwell time using GA.
Considering probabilistic vehicle travel time, Chowdhury and Chien [23,24] synchronized vehicle arrivals for an intermodal transit network to minimize total cost.The study network consisted of a train line with multiple transfer stations and multiple feeder bus routes connecting at the station.Shrivastava and Dhingra [25,26] used GA to coordinate an integrated bus-train service which minimized total cost consisting of user and vehicle operating costs.Li et al. [27] optimized bus timetables for a feeder route which minimized total transfer wait time.Using GA and the Frank-Wolfe algorithm, Xiong et al. [28] synchronized arrivals of community shuttles linking with a metro service, which yielded the minimum total cost.Due to the absence of the AFCS data, the distribution of passenger arrivals at stations in most previous studies discussed above was either simplified or assumed.Few studies have applied the AFCS data for analyzing passenger demand and route choices [29][30][31] and optimizing timetable [32].
The primary contribution of this study is to collect, process, and generate the spatiotemporal origin-destination (OD) demand with the AFCS data, approximate transfer volumes at stations, and apply that to minimize total TWT for a large metro network with many transfer stations.Optimizing such a coordinated transfer problem is challenging because it is combinatorial and difficult to solve with classic optimization methods.A method that integrates SA with PC (SAPC) is developed and implemented to search for the optimal solution.

Methodology
The mathematical model is formulated and discussed in this section, and the objective is to minimize total TWT.To maintain service capacity and avoid operational complexity, the preplanned dispatching headways are fixed.The decision variables therefore consist of train departure times from the beginning terminals of all lines in the study network.The development of the proposed model is discussed next, and the variables used to formulate the model are summarized in Table 1.

A General Metro Network.
A general metro network consists of many routes defined as 푅  and a set of stations defined as 푁.A route is represented by two unidirectional lines (i.e., outbound and inbound).Line 푙 belongs to a set of lines denoted as 퐿  .Each line consists of a set of stations 푁  , and 푁  ∈ 푁.Each station is given a unique station ID.For example, station ID of line 1 begins with 1 and ends at 푁 1 , and then the IDs of stations on line 2 start from 푁 1 + 1 and end at 푁 2 .Thus, stations of line l (푙 = 2, 3, . . ., 퐿) are labeled from 푁 -1 + 1 through 푁  .For line l, the hourly service frequency is denoted as 퐹  , and a train is indexed by m (푚 = 1, 2, . . ., 퐹  ).To formulate TWT incurred by passengers at a transfer station, a link-node diagram is shown in Figure 1 where transfer station 푠 is also labelled as 푢  for line 푙 as well as 푢   for line 푙  (푢  , 푢   ∈ 푁).Transfer station 푠 has four IDs associated with four connecting lines.
To formulate the proposed model, the following assumptions are made and subsequently explained: (1) The platform-to-platform walking time at a transfer station is given (obtainable from a survey or field observations), which may vary among stations (2) Passenger arrival distributions at stations will not be affected by the change of train departure time (3) The choice of transfer location(s) is determined based on the shortest travel time, which is the sum of initial waiting time, in-vehicle time, and TWT

Indirect Passenger Arrival Distribution.
With the AFCS data, the temporal passenger arrival distribution at any station 푖 and their destination (station j) can be determined; however, the transfer location is not available.As discussed in assumption (3), passengers would use the shortest travel time paths to reach their destinations.Since passenger arrival time at station 푖 and posted train schedule are known, the travel path and transfer location(s) for each passenger can be determined by employing a time-dependent shortest path algorithm which will be discussed later in Section 3.2.2.Once the transfer location(s) is determined, the passengers who enter station 푖 at time 푡 and exit station 푗 via transfer station 푠 denoted as 푞   (see Figure 2) can be approximated.Considering required platform-to-platform walking time, passengers can take train 푚  of line 푙  to transfer station 푠 and wait for train 푚 of line 푙.For example, as train 푚  -1 of line 푙  departs from station 푖 at time 퐷   −1,,  and the following train 푚  of line 푙  departure time is 퐷     , the number of indirect passengers (i.e., the shaded area in Figure 2) from station 푖 to station 푗 via transfer station s (denoted as 푟     ,, ) can be determined by time interval and transfer connection availability 휆     ,, .Thus, Note that 휆     ,, is a binary variable.It is equal to 1 indicating that train 푚  of line 푙  arrives early, so that   successful transfer can be made to train 푚 line 푙 at s; otherwise, it is 0. Thus,

Enhanced Dijkstra Algorithm (EDA).
The shortest path of a network where the travel time is not time-dependent can be found by applying the Dijkstra algorithm (DA) [33].
Otherwise, an enhanced Dijkstra algorithm (EDA) shall be developed for dealing with the time-dependent travel time.The train arrival and departure time at various stations will be recorded using actual time schedule, which is different from starting at zero time used in DA.A brief discussion of the proposed EDA is summarized below.
The travel time of a path is dependent on the passengers' arrival time at the origin station.To determine the shortest in-vehicle time from station 푖 to station k, all links which have their start station ID equal to station 푖 and end station ID equal to station 푘 can be searched through the network layout (note that the metro network has specific direction of operation for each line).For each of these links, the first train departure time at station 푖 which is greater than the passenger arrival time at station 푖 can be obtained by the timetables.The train and passenger arrival time at station 푘 when traveling by this link is equal to the corresponding departure time of the start station 푖 plus the travel time from the start station 푖 to the end station 푘 of the link which can be extracted by the timetables, too.
If a transfer is needed at a station, transfer time must be included in the travel time of the appropriate link.Note that transfer times vary with different transfer stations.The link which gets the shortest travel time (including the passenger initial waiting time at origin station, in-vehicle time, and transfer waiting time) from stations 푖 to 푘 is chosen as the shortest path.The proposed algorithm will find the shortest paths for all passengers from the origin station to destination station.
Transfer passengers 푞   will select the best transfer location 푠 to minimize their travel time denoted as 푡  .Thus, min 푡  , ∀푖,푗,푠 Note that 푡  is the sum of initial waiting time, in-vehicle time, and TWT.Thus, where the initial waiting time, 푤  , is the time for passengers who wait for boarding on train 푚  of line 푙  at station i, which is the elapsed time from passenger arrival time 푡 to the train departure time 퐷     .Thus, The in-vehicle time, denoted as 푡  , includes the invehicle time from station 푖 of line 푙  to transfer station 푠 and then to station 푗 of line 푙.Thus, where 퐴  and 퐷  represent the arrival and departure times of train 푚 on line 푙 at station i, respectively.Finally, 푡     ,, can be calculated by (7).

Transfer Passengers.
As discussed earlier, we assume that passengers would use transfer station(s), if necessary, which minimizes their travel time.For passengers who expect to transfer from train 푚  of line 푙  to train 푚 of line 푙 at s, the TWT denoted as 푡     ,, is determined by the departure time of pickup train 푚 denoted as 퐷  and the arrival time of delivery train 푚  denoted as 퐴     , the platform-to-platform walking time is 푡    , and transfer connection availability is 휆     ,, .Thus, In the interest of simplicity, the average walking time is distance divided by walking speed.Since each "route" is split into two unidirectional lines, there are eight transfer flows at a general station 푠.The number of transfer passengers from train 푚  of line 푙  to train 푚 of line 푙 at 푠 is denoted as 푟     ,, , which can be calculated by Note that 푟     ,, can be determined by (1).

Objective Function.
It is worth noting that the average access time for passengers swiping metro cards, entering the station, and walking to the boarding area is given, which will not affect the optimized solution and thus can be omitted.The objective total TWT denoted as 푅 is the sum of TWT incurred by all transfer passengers.Thus, where 푡     ,, is affected by the justification of train departure times at the beginning terminal of line l (i.e., the decision variable, denoted as V  ).The objective is to minimize R; therefore, the objective function is min 푅 (10) 3.4.Constraints.To maintain service capacity without increasing the operation cost, the service headway of each line is not varied.Therefore, the constraints considered in most previous studies, such as capacity and fleet size constraints, will not be our concerns.The relation among the "delivering" train arrival time, walking time, and "pickup" train departure time will be employed to minimize total TWT.When the departure time of train 푚 of line 푙 at station s (퐷  ) is greater than the arrival time of train 푚  line 푙  (퐴     ) plus walking time (푡    ), transfers can be successfully made and 휆     ,, is equal to 1. Thus, Note that only one pickup train 푚 of line 푙 has connectivity with delivery train 푚  of line 푙  .Thus, where 퐹  represents the service frequency on line l.

Performance Analysis.
To evaluate the effectiveness of the optimized solution on system operation, we propose to investigate total and average TWT at different level of detail.Equations to assess system performance are formulated and discussed below.

Transfer Waiting Time (TWT).
The station-based total TWT, denoted as 푅  , is the sum of TWT incurred by transfer passengers at transfer stations 푠.Thus, The line-based total TWT, denoted as 푅  , is the sum of TWT incurred by transfer passengers at all transfer stations from other lines to line 푙.Thus, where 훾  equal to 1 means that station 푠 is on line l; otherwise, it is 0. Thus, The route-based total TWT, denoted as 푅  , is the sum of TWT consumed on the two lines associated with route 푟.Thus, where 휂  equal to 1 means that line 푙 is associated with route 푟.Otherwise, it is 0. Thus,

Average Transfer Waiting Time.
The average TWT at s, denoted as 푟  , is total TWT divided by the number of transfer passengers.Thus, The average TWT of line l, denoted as 푟  , is 푅  divided by the number of transfer passengers of line 푙.Thus, Similarly, the average TWT of route r, denoted as 푟  , is 푅  divided by the number of transfer passengers of route 푟.Thus,

Solution Algorithm
To minimize total TWT for a large metro network consisting of multiple lines intersecting at many stations, the study problem is combinatorial with large feasible solution spaces.The developed model is therefore difficult to solve with classic optimization methods.With SA, the computation time could be long due to large passenger demand, number of running trains, and the size of the study network.The primary reasons for using PC (splitting large problems into smaller ones that are solved simultaneously) are to save time, to solve larger problems, and to provide concurrency [34].We thus apply an integrated SA with PC (using MATLAB software) to search for the optimized solution and compute the objective total TWT.The procedure is discussed below and illustrated in Figure 3.
Step 1 (initialization).Input SA parameters (i.e., initial solution, temperature, upper and lower bounds, etc.) and baseline model parameter values (i.e., train arrival and departure times of the existing timetable. Step 2. With initialized information, open the parallel pool and calculate total TWT denoted as 푅 (0) (see (9)) with PC (split the execution of calculation in serial over the workers in a parallel pool).Let 푅  = 푅 (0) .Set the index of SA temperature iteration z = 0.
Step 3. Search for a provisional V  with SA, determine 퐷 1 , and calculate total TWT denoted as 푅  with PC.Let 푢 = 푢+1.Note that 퐷 1 is updated based on V  , which must be satisfied with where the planning time horizon of departure time is denoted as [0, T].Therefore, the adjusted departure time 퐷  and arrival time 퐴  at each station can be derived accordingly based on the existing departure time 퐷 (0)  and arrival time 퐴 (0)  .Thus, where the allowable adjustment range of V  is deviating within the dispatching headway of line l, denoted as ℎ  .Thus, Step 4. Compare 푅  and 푅  .If 푅  ⩾ 푅  , go to Step 5; otherwise, let 푅  = 푅  and denote the current solution as the provisional solution; then go to Step 6.
Step  by the operating agency, including a spatiotemporal passenger OD demand matrix, timetables, and average passenger walking time from one line to another at each transfer station.

Case Study
The ridership distribution over time on a typical weekday is shown in Figure 5.In addition to minimizing total TWT, the benefit before and after the implementation of the optimized solution will be assessed.
To demonstrate the model performance applied in different levels of congestion for the metro network, we apply the AFCS data collected in the AM peak (i.e., 8:00 am ∼ 9:00 am) and off-peak (i.e., 12:00 pm ∼ 1:00 pm).There are 111,887 and 17,984 transfer passengers in AM peak and off-peak, respectively, which resulted in transfer volumes of 138,702 and 22,107 because some passengers need more than one transfer.The input data include train departure and arrival times, transfer walking time, and other operator parameters, which are summarized in Appendices A and B.

Passenger Demand.
When a passenger either enters or exits a station, the time is reported and archived in  AFCS.Thus, the passenger in-and out-flow distributions can be accurately derived.As shown in Table 3, the transfer demand matrix at a transfer station 푠 1 records transfer volume at each of 8 transfer directions (see Figure 1).

Optimized Results.
The SA parameter values include initial temperature 푡 0 =10,000, reduction parameter of temperature 훼=0.9, number of temperature iterations Z = 1,000, and number of iterations at current temperature U=100.
For the AM peak, the computation time to search for the optimized solution using SA requires 85.7 hours to yield the minimum total cost (Intel(R) Xeon(R) CPU E5-1620 v4 @3.50 GHz 3.50 GHz with 32.0 GB RAM and 64bit Operating System).However, SAPC requires 8.5 hours to yield the optimized result.
For the off-peak, the computation time with SA only was 8.5 hours, which is significantly less than that for the AM peak because of less transfer demand and reduced service frequency.It was found in Table 4 that as the transfer demand is reduced (i.e., off-peak) using SAPC seems inefficient (i.e., 9.5 hours) which costs more computation time to find the optimized solution than that of solely using SA (i.e., 8.5 hours).This computing in serial loops generally does not benefit from conversion into PC method for a relatively simple computational task in off-peak.Because the time  needed for data transfer is significant compared with the time needed for computation, therefore, the results show that the PC method can be useful for some loop iterations that require long times to execute with big data.The total TWT of the studied AM peak and off-peak were significantly reduced by 41,851.9minutes and 9,822.8minutes, respectively, after implementing the adjusted train departure times at the beginning stations.The yielded minimum total TWT by the solutions found using SA and SAPC are fairly close, which indicates that SAPC is very efficient.
Figure 6 shows the relationship between total TWT and the number of iterations using SAPC.It is notable that total TWT was reduced quickly at the first 200 iterations and then stably converged to a constant after the 500th iteration.
Results under existing operation (EO) and optimized operation (OO) are compared in this section.EO refers to train departures following the existing timetable, while OO refers to the fact that trains will be dispatched based on the optimized departure times.The difference between the departure times at the beginning terminal with EO and OO of line 푙 denoted as V  is shown in Figure 7.It was found that the trains of lines 1, 4, 5, 8, and 10 should be dispatched later than the existing schedule (i.e., 32, 150, 14, 29, and 43 seconds, respectively), while trains operating on lines 2, 3, 6, 7, and 9 should be dispatched earlier (i.e., -2, -104, -50, -72, and -45 seconds) in the AM peak.However, in the off-peak hour all the trains' departure times should be dispatched earlier than  the existing schedule (i.e., negative values: -179, -174, -103, -55, -209, -142, -38, -82, -46, and -112 sec).

Before and after Analysis.
With SAPC, the proposed model is applied to optimize train departure times from the terminals in the studied time periods.There are 148 trains dispatched during the AM peak and 85 trains dispatched in the off-peak.

TWT at Transfer Stations.
As indicated in Table 5 and Figure 8, total TWT was reduced by 13.2% (i.e., 41,851.9minutes) after adjusting the departure times within the AM peak.The greatest TWT saving occurred at station 푠 10 , whereas increased TWT was found at 푠 6 , 푠 8 , and 푠 13 with relatively low transfer volumes.
In the off-peak period (see Table 5), total TWT was reduced by 13.0% (9,822.8minutes) compared to that with EO.The greatest saving was found at 푠 5 and the least average TWT was found at 푠 10 .It is worth noting that the choice of transfer location(s) is based on the shortest travel time, which has been discussed in the assumptions.The transfer volumes before and after optimization at transfer stations have changed because passengers selected different locations to make transfer, since the justified train departure times have altered their shortest paths.

TWT by Lines.
The comparison of TWT by lines is shown in Table 6.For the AM peak on line 1 (outbound direction of route A, Figure 9), there is a transfer volume of 33,183 passengers who transfer from lines 3 through 10, which accounts for 23.9% of the total transfer demand.After adjusting the train departure times from the beginning terminal, the TWT consumed on line 1 was reduced by 21,778.2minutes, thus yielding the greatest saving of any line.However, for line 2 (the opposite direction of line 1), only 2,069.1 minutes were reduced, even though there is a transfer volume of 20,023 passengers.Since the average TWT of line 2 is the shortest (1.39 min) among all lines at EO, the room to reduce average TWT was limited.
On the other hand, in the off-peak, there is a transfer volume of 3,525 passengers who transfer from lines 3 through 10 to line 1, which accounts for 15.9% of total transfer demand.Under OO, the TWT reduced by 2,228.6 minutes and 2,529.0minutes on lines 1 and 2, respectively.The average TWT in the AM peak is less than that in the off-peak because of shorter headways.However, the reduction of average TWT in the offpeak is greater than that of the AM peak.It appears that longer headway in the off-peak offers more flexibility to justify the departure times at the beginning terminals.

TWT by Routes.
The comparison of TWT on a route basis with EO and OO is conducted and the results are summarized in Table 7.It seems that routes with heavy demand experience the greatest reductions in TWT; however, it increases at some light-demand routes.
For route A in the AM peak, there is a transfer volume of 53,206 passengers from routes B through E, which accounts for 38.4% of the total transfer demand.After implementing the adjusted departure times, TWT reduced by 23,847.3minutes (57.0% of the total reduced TWT).However, for route E with a transfer volume of 14,765 passengers (the least transfer volume among the 5 routes), TWT increased by 2,828.9minutes (5.8%).

Conclusions
This study develops a quick and easy-to-implement method to minimize total TWT with the AFCS data provided by Shenzhen Metro in China in which the train departure times from the beginning terminals were optimized.The metro users can gain substantial benefit (reduced TWT) without bearing additional operator's cost.
Since the transfer information is not available in AFCS, an enhanced Dijkstra algorithm (EDA) was developed to search for transfer station(s) for each indirect passenger based on their arrival time at station and posted train schedule.With that, the transfer volume at each station can be estimated.
The average TWT was found to be reduced more in the off-peak period than the AM peak period because longer headway offers more flexibility to justify the train departure time.The average and total TWT based on station, line, and route were assessed.In general, more TWT can be saved at stations with greater transfer volume, albeit increasing at stations with light transfer volume.
In addition, the developed SAPC is fairly efficient in searching for the solution.It significantly outperforms SA, especially in the peak period when the transfer demand is large.As would be expected, the computational efficiency is highly dependent on the size of solution spaces.
As an immediate extension of this study, we intend to enhance the developed model by considering realistic train operational issues (i.e., probabilistic train travel time between stations and dwell time at stations), probabilistic passenger walking time [35] within the transfer station, and passengers making more than two transfers to reach their destination.This enhancement would permit the developed model to better optimize dynamic train departure times at the beginning station and holding times at intermediate stations.

Figure 1 :
Figure 1: Configuration of a general transfer station.

Figure 2 :
Figure 2: Temporal distribution of transfer passenger arrivals at origin station i.

Figure 7 :
Figure 7: Optimized adjustment of departure times with SAPC (AM and off-peak).

Figure 8 :
Figure 8: Total TWT with EO and OO at various transfer stations.

Figure 9 :
Figure 9: Total TWT with EO and OO at transfer stations on line 1.

Table 1 :
Notations. , and 푟 = 1, 2, . . ., 푅  ) 푟     ,, pass Number of transfer pass from train 푚  line 푙  to train m line l at s 푟     ,, pass Number of pass from sta. i to j on train 푚  line 푙  via train m line l at s 푟  /푟  /푟      ,, min TWT from train 푚  of line 푙  to train m of line l at station s 푡    min Walking time from line 푙  to l at transfer station s

Table 2
tion type.The sample data represent trips initiated by two passengers (i.e., ID 32286198 and ID 322357672).Passenger 32286198 began his/her journey from Station 218 and ended at Station 230 on line 9, who traveled without transfer.The same passenger initiated the 2nd trip in the afternoon on the same day.On the other hand, passenger 322357672 began his/her trip from Station 33 of line 2, transfer at station 푠 2 , and then ended that trip at Station 86 of line 3.

Table 2 :
Sample data from AFCS.

Table 3 :
Train-to-train transfer demand at station 푠 1

Table 4 :
Results from different solution algorithms.

Table 5 :
Comparison of station-based TWT.

Table 6 :
Comparison of line-based TWT with EO and OO.

Table 7 :
Comparison of route-based total TWT with EO and OO.

Table 9 :
Baseline values of model parameters.