URBAN RAILWAY TRANSIT TIMETABLE OPTIMISATION BASED ON PASSENGER-AND-TRAINS MATCHING – A CASE STUDY OF BEIJING METRO LINE

Due to the congested scenarios of the urban railway system during peak hours, passengers are often left behind on the platform. This paper firstly brings a proposal to capture passengers matching different trains. Secondly, to reduce passengers’ total waiting time, timetable optimisation is put forward based on passengers matching different trains. This is a two-stage model. In the first stage, the aim is to obtain a match between passengers and different trains from the Automatic Fare Collection (AFC) data as well as timetable parameters. In the second stage, the objective is to reduce passengers’ total waiting time, whereby the decision variables are headway and dwelling time. Due to the complexity of our proposed model, an MCMC-GASA (Markov Chain Monte Carlo-Genetic Algorithm Simulated Annealing) hybrid method is designed to solve it. A real-world case of Line 1 in Beijing metro is employed to verify the proposed two-stage model and algorithms. The results show that several improvements have been brought by the newly designed timetable. The number of unique matching passengers increased by 37.7%, and passengers’ total waiting time decreased by 15.5%.


INTRODUCTION
Recent years have witnessed a tremendous increase in the urban railway transit ridership. In China, by the end of 2017, 17 billion ridership had been carried by urban railway transit [1] (Mao 2018). As for the Beijing Metro, 4.53 billion passengers were transported in 2019. The maximum load factor on Line 1 even reached 100% also in 2019. Thus, during the peak hours in the major metropolitan stations, heavy ridership remains a challenge to the daily regular operational schedule. Besides, a growing number of passengers will return to work after the COVID-19 crisis in 2020. How to deal with heavy ridership in metro stations to guarantee public hygiene is the concern of many scholars. One of the practical approaches is travel reservation [2] ( Han et al. 2020). Travel reservation in metro stations refers to the reservation of passenger's departure time before travelling, which belongs to travel demand management (TDM). Another approach is the fare-reward scheme [3]  ). Passengers will be rewarded a free trip if the travelling period is not during peak hours. Regardless of the travel reservation or the fare-reward scheme, one primary issue is passenger-and-trains matching. This concept refers to providing the probabilities In general, the objective of timetable optimisation is heterogeneous. Yang et al. [15] (2017) proposed a bi-objective model to minimise passengers' total travel time and net energy consumption. Binder et al. [16] (2017) delivered a tri-objective model that considers passenger satisfaction, operational costs, and deviation from the original timetable. Parbo et al. [17] (2014) considered transferring time minimisation in the system. Sels et al. [18] (2016) minimised passengers' travel time to optimise the timetable. However, a limited number of research studies have been devoted to timetable optimisation based on each passenger's train matching behaviour obtained by machine learning (ML). In this study, a model to minimise passengers' total waiting time considering each passenger train matching is designed in the context of the peak hour. Additionally, due to the indeterminate train matching of each passenger, the formula of passengers' total waiting time should be well redesigned considering the probabilities of passengers matching different trains. Unlike the formula proposed by Newell [19] (1971), in this study, the probabilities of passengers matching different trains are added in the passengers' total waiting time.
In summary, the main contribution of this paper is developing a two-stage model to deal with the passenger-and-trains matching problem and timetable optimisation. In detail, (1) in the first stage, a likelihood function of the probabilities is proposed to deal with passenger-and-trains matching problem. (2) In the second stage, passengers' total waiting time is considered as the objective to optimise the timetable. (3) This research fills the gap of timetable optimisation based on passenger-and-trains matching behaviour.
The remainder of this paper is organised as follows. The overall problem statement is presented in Chapter 1. Chapter 2 contains a pre-processing for the AFC data. Chapter 3 introduces the models and algorithms utilised for solving the two-stage model. Chapter 4 is utilised to verify the model and the proposed algorithm. The final chapter concludes with a summary of the findings.

PROBLEM DESCRIPTION
Due to the overcrowding scenarios at the station, some passengers who miss the first train would be categorised as left-behind passengers. A stampede of left-behind passengers would struggle of passengers matching different trains. Moreover, based on the passenger-and-trains matching, timetable optimisation could become more accurate. Thus, the investigation of timetable optimisation combing passenger-and-trains matching merits further discussion.
Besides passenger-and-trains matching, a welldesigned timetable would increase passengers' satisfaction. In addition, a poorly designed timetable would lead to some unexpected situations, e.g., just missing the connecting train [4] (Guo et al. 2016), longer waiting time [5] ( Barrena et al. 2014), etc. With this concern, it is essential to elaborately design an efficient, dynamic timetable for the congested urban railway transit to satisfy passenger demands [6,7]  How to infer these implicit macroscopic and microcosmic indicators from the AFC data remains a major challenge. In this line of research, emphasis is placed on inferring passengers matching different trains from the massive AFC data. Similarly, Kusakabe et al. [14] (2010) proposed the "train choice behaviour" but it did not, however, reflect each passenger's train choice behaviour accurately.
passengers should walk to the origin platform under their different speeds. Passenger access and egress walking time are approximated by the truncated normal distribution, where it reflects the fluctuations in passenger speeds. Due to different circumstances on the platform, the set of alternative trains which the passenger will probably pick up are denoted in black colour in Figure 1. Herein, the train that the passenger picks up is no longer deterministic. Correspondingly, P 1 i,u and P 2 i,u are the probabilities of this passenger matching the two black trains, respectively. In this example, this passenger would not pick up the white trains, because the departure or arrival time of these trains goes beyond the passenger's journey time limit. Thus, the probability of this passenger matching the white trains would be set as zero. The sum of P 1 i,u and P 2 i,u would be equal to one. Generally, the advantages of the proposed passenger-and-trains matching lie in its ability to give better interpretability in accordance with the practical experience.

Passenger types
In public transport, a great amount of useful information is implicit in the data resources. In this paper, we only discuss passenger-and-trains matching where their origins and destinations are on the same line. In other words, passenger routes should be modelled explicitly if passengers have transfer to board the next trains. In essence, this problem belongs to the train matching category, which is the microcosmic issue from the passengers' perspective. Similarly, the passenger flow assignment problem in the metro network is to achieve the macroscopic matching between the passenger volume and the network capacity. However, complexity is a common issue encountered in the traditional passenger flow assignment model [20] (Sun et al. 2015), especially in the context of peak hours. Theoretically, the concept of passenger-and-trains matching is proposed in this paper, motivated by the phenomenon of passengers left behind [21] ( Zhu et al. 2018). The probabilities of passengers matching different trains is gathered from the AFC data records and timetable parameters.
To the best of our knowledge, each passenger's journey time on train, dwelling time at each station, and headway are fundamental factors to affect the probabilities of passengers matching different trains. In general, passenger journey time consists of passenger waiting time, passenger walking time, and in-vehicle consuming time. A simplified diagram (Figure 1), which does not consider passenger transfer behaviour, is applicable to demonstrate the probabilities of passengers matching different trains.
Schematically, passenger and train movements can be described as particular curves temporally and spatially. Indeed, each passenger's departure time t in i,u and arrival time t i,v out are known from the AFC system. After entering the entry gate,  Regarding this type of passengers, their origins and destinations are on the same line, which is why passenger-and-trains matching at the original station is considered.
Without loss of generality, if neither the passengers' origins nor destinations are typically on Line 1, and they would choose Line 1 to reach their destinations, this type of passengers can be categorised as a special combination of Type 1 and Type 2.

Determining routes by adopting BFS
According to the three types of passengers, the premise of calculating the probabilities of passengers matching different trains is to obtain the passenger's route if the passenger has transfer behaviour. In our paper, the passenger's route is assumed to strictly follow a predetermined route, which is obtained by the Breadth-First Search (BFS). In other words, the proposed BFS is not followed by the passenger and neither are the effects of normal deviations by the deterministic journey time. Then, the passenger's determined route would be decomposed into several parts which belong to different lines. For descriptive convenience, passenger's journey time on each decomposed route is approximately calculated by the proportion for which the length of the decomposed route behaviour. In general, three types of passengers should be considered according to their origins and destinations. Type 1: passengers who transfer from Line 1 are represented by the dot line in Figure 2. For this type of passengers, their origins are on Line 1, and in contrast, their destinations are on Line 2. Passenger-and-trains matching at the original station on Line 1 is considered. Type 2: passengers who transfer to Line 1 are represented by the dash line in Figure 2. The destinations of this type of passengers are on Line 1, but their origins, on the other hand, are on Line 4. Passenger-and-trains matching at the transfer station on Line 1 is considered.
Transfer out of Line 1 Transfer into Line 1 No transfer

METHODOLOGICAL FRAMEWORK
In this study, the passenger's route obtained by the BFS is the first step to address the probabilities of passengers matching different trains. Moreover, the passenger's journey time on each decomposed route is also deterministic. Thus, according to the passenger's journey time and timetable parameters at the current stage, the probabilities of passengers matching different trains would be determined by the following proposed models and algorithms. Note that the timetable parameter is one of the basic factors that affect the probabilities of passengers matching different trains. Then, if timetable parameters are changed, the probabilities of passengers would be changed as well, which seems to be a domino effect. Therefore, it is significant to increase the probability of passengers matching the first train to reduce passenger waiting time by adjusting timetable parameters. Obviously, from the perspective of the urban railway management, it is also useful to adjust timetable parameters which include dwelling time of the train at each station and headway between two consecutive trains. With this concern, a two-stage model is proposed to deal with the relationship between the probabilities of passengers matching different trains and timetable optimisation. Specifically, in stage one, the aim is to obtain the probabilities of passengers matching different accounts in the entire route. Therefore, two aspects should be considered. Firstly, in our paper, passenger's journey time on each decomposed route is independent. Secondly, passenger's journey time on each decomposed route also comprises passenger's waiting time, passenger's access walking time, passenger's egress walking time, and in-vehicle consuming time. In other words, passenger's transfer time at the transfer station is roughly separated into three parts (Figure 3), including passenger's egress walking time, passenger's access walking time, and passenger's waiting time.
In general, the BFS is a basic methodological approach that solves graph traversal. The metro network is a complex graph that involves nodes and edges. Specifically, the node represents the station, and the edge represents the traverse between two adjacent stations. Thus, exploring the route between any two stations is the extension of the graph traversal.
In the BFS, firstly, the scheduling discipline of the queue is set as first-in-first-out (FIFO). Secondly, three sets utilised in the BFS are defined to collect different nodes. Namely, W is the set whose nodes are still not accessed; B is the set whose nodes were already accessed; G is the set whose nodes are going to be accessed. Therefore, the algorithm flowchart of the BFS is depicted in Figure 4.  Figure 4 -The flowchart of BFS tion 8, the headway satisfies the minimum headway request and it means that the number of trains operating within a timetable is also sufficient.

Notations
In this study, the following notations are defined to formulate the two-stage model. Sets/Matrix: J -Set of running trains; U -Set of stations, and one practical station is separated into two bi-direction virtual stations, i.e., the number of all station is set as 2N; η u,v (t) -Trip demand matrix, i.e., the number of passengers who depart at station u at å time t heading to station v; P u -The sum of passengers who depart at the station u during the study period [t 0 ,t 0 ,+T]; Parameters: trains. In the stage two, the objective is set to reduce passengers' total waiting time by adjusting the timetable.

Assumptions
Before formulating the two-stage model, several assumptions are provided. 1) In our proposed framework, the minimum dataset should include the AFC data and timetable information. 2) Passenger route is strictly followed by a predetermined route, which is obtained by the BFS. 3) Each passenger's decomposed route is independent. 4) Passenger's access and egress walking time on each decomposed route follows the truncated normal distribution. 5) The number of alternative trains that the passenger will probably pick up is no more than four. 6) Trains are punctual according to the scheduled timetable. 7) Trains follow the even schedule with a constant headway. 8) The number of trains operating within a timetable is sufficient. With regards to the assumption 2, two aspects should be considered. Firstly, the passenger's path choice is another interesting research orientation, which provides the demand forecasting in peak hours. Secondly, the probabilities of which train the passenger will pick up should be based on a predetermined route. Thus, for simplicity, it is exceedingly necessary to model passenger route according to the BFS. For assumption 3, the purpose is to split the passenger's transfer time into three parts, including passenger's egress walking time, passenger's access walking time, and passenger's waiting time, to unify each decomposed route. Therefore, the probabilities of passengers matching different trains on each decomposed route would be determined according to the proposed model and algorithm. Regarding assumption 4, this assumption has been proven by some recent studies [22] (Zhang et al. 2015). For assumption 5, undoubtedly, the more alternative trains are set, the more accurate the result would be. Given that computation efficiency is related to the number of alternative trains, it should be noted that the number of alternative trains should not be too large. For assumption 6, the influence of the train's delay on passengers is not considered. For assump-2) If the passenger's egress walking time is subtracted from the passage time of passenger at the exit gate from the AFC system, the result should be larger than the arrival time of the train j at the destination station. If and only if the above two conditions are satisfied, the probability of passenger matching the train j would be obtained. In other words, the process of calculating the probability of the passenger matching the train j should typically involve three independent parts, namely, the probability of t i,u a ahead of the departure time of the earliest train j, the probability of passenger matching the train j, and the probability of passenger exiting from the destination station successfully by train j.
(i) Arrival time of passenger i on the platform should not exceed the departure time of the earliest train mi at his/her departure station: , , , , , , , , , , , , In our research, passenger's access walking time and egress walking time follow the truncated normal distribution (Equation 4), where ̅μ and ̅σ are respectively the mean and the standard deviation of the normal distribution. a and b are respectively the lower bound and the upper bound of the truncated normal distribution. ψ() is the probability density function (PDF) of the truncated normal distribution. ϕ() is the PDF of the normal distribution. Φ() is the cumulative density function (CDF) of the normal distribution.
(ii) Probability of passenger i matching the train: where the value of P

Passenger-and-trains matching problem
The probability of passengers matching different trains utilised in stage two should be calculated in stage one. In our research, a complete passenger journey time contains four parts, including passenger's access walking time, passenger's waiting time, in-vehicle consuming time, and passenger's egress walking time. In particular, whether the passenger picks up the train j or not is based on two conditions as follows: 1) The arrival time of a passenger on the platform is derived by the passage time of a passenger at the entry gate from the AFC system plus the passenger's access walking time. Moreover, the obtained arrival time of a passenger on the platform should not exceed the departure time of the earliest train j at the departure station.
Due to the unknown PDF expression of the probability of passenger matching different trains, the Bayesian estimation is proposed to deal with this issue. According to the Bayesian framework, the prior distribution of Z i u is assumed, and after training with the real AFC data, the posterior distribution of Z i u would be learned. Since almost no further information would be known about the probabilities in advance, then in our research, it is assumed that the prior distribution of Z i u follows the broad distribution, such as the uniform distribution. Therefore, the value of G(Z i u ) would be equal to one. Then, Expression 11 could be obtained. , , , , , , Herein, to normalise Expression 11, a constant value G norm is utilised in Equation 12. Undoubtedly, it is conceivable that maximising the likelihood of Function 12 would achieve the replication of reality in the metro system. Then, the probabilities of each passenger matching different trains would be determined by the following algorithm.

Timetable optimisation
In stage two, the aim is to reduce passengers' total waiting time by adjusting headway and dwelling time at each station. Firstly, the probabilities of passengers matching different trains should be added to the objective. Secondly, microcosmic and macroscopic constraints should both be taken into accounts in our model. For the microcosmic constraint, it indicates how many passengers would be loaded without exceeding the upper bound of the train capacity. To better delineate passenger-and-trains matching, the unit of time is in seconds. For the macroscopic constraint, it illustrates (iii) Probability of passenger i exiting the destination station successfully by train k: , , , , , (iv) Probability of passenger i tapping-out during his/her journey time at the departure station u:   Due to the independence of (i), (ii), and (iii), this probability (Equation 8) is derived by Equations 5-7. In Equation 9, it should be noted that Z i u =[P 1 i,u , P 2 i,u , P 3 i,u , P 4 i,u ] T is the vector that contains the probabilities of passenger i matching train at the departure station u.
(v) The likelihood function of the probabilities of passengers matching different trains: With the intent of reducing passengers' total waiting time, the objective in stage two is designed to minimise passengers' total waiting time. Due to the indeterminate passengers train matching, the probabilities of passengers matching different trains should be added in Objective 24, and the dwelling time of each station and headway are the decision variables.

Solution algorithm by implementing MCMC-GASA
In stage two, timetable optimisation considering capacity constraint falls in the category of the NPhard class [23] (Niu et al. 2013). In other words, this kind of problem is difficult to be solved by commercial optimisation solvers within a reasonable amount of time. Thus, motivated by the artificial intelligent technique, a genetic algorithm (GA) combining simulated annealing (SA) is implemented to optimise the timetable in our research. In general, the advantage of the GA [24] (Yin et al. 2019) lies in its ability to solve the intractable problem efficiently and provide good extensity. With respect to SA [25] (Kang et al. 2016), it turns out that it does well in searching for the optimal solution. Thus, GASA is utilised to find the suboptimal solution for the stage-two model.
Regarding stage one, the challenge is to determine the posterior distribution to obtain the probabilities of passengers matching different trains. Theoretically, Markov Chain Monte Carlo (MCMC) [26] (Xu et al. 2018) has been widely used in addressing this kind of problem. The step of MCMC is to generate the candidate samples according to prior distribution and to generate the next candidate samples by the random walk process, then to accept the new candidate samples or to reject them based on the selection rules. Therefore, to solve stage two successfully and efficiently, MCMC-GASA is implemented to deal with this model.

MCMC utilised for stage one
For MCMC, the Metropolis-Hastings (MH) technique is typically utilised for sampling. In general, in a recent study [27] (Lee et al. 2015), certain advantages of the MH sampling from the aspects of its efficiency and its feasibility have been that train movements are strictly followed by the scheduled timetable, and correspondingly, the stopskip pattern is not considered in our research.

Microcosmic constraints from the passenger's perspective
Passengers matching different trains are no longer deterministic. In addition, Equation 13 gives the formulation that the number of passengers who match the train j should be explicitly cumulated by the probability of passengers matching the train j. In Equation 14, 0-1 binary variable x i,u,v (t) is determined by the AFC data record. To summarise, the number of passengers on the train j can be calculated as Equation 15. In general, Constraint 16 ensures a finite capacity of a running train to agree with the practical experience.

Macroscopic constraints from an operation perspective
The stop-skip pattern is not considered in our research. Thus, any two consecutive trains should satisfy  Specifically, for Equation 20, it ensures a u-turning operation at the end terminal station; however, for Equation 21, it ensures the u-turning operation at the start terminal station. Generally, dwelling time at each station is the decision variable, and Secondly, for the crossover operation, the replacing method is employed. Herein, the crossover operation indicates that a gene value of the chromosome is replaced by the gene value in the same position of another chromosome.
Thirdly, to coordinate the crossover operation, the mutation operation is adopted to enlarge the range of feasible solutions. Particularly, gene values in the chromosome are replaced by a random number to meet the boundary Constraints 19 and 22. With respect to the Metropolis rule for iteration, this is the core technique for the SA. In that sense, for any iteration, there are two objective values, namely, the new objective value W new and the old objective value W old . Accordingly, it should be noted which objective value should be selected in this iteration. Thus, if the difference between W new and W old is less than zero, then the new objective value W new is accepted with the probability ρ=1. However, if W new is larger than W old , then the new objective value would be accepted with a small probability ρ=exp(-(W new -W old )/t c ), where t c is the current annealing temperature.
To summarise, the detailed steps of the MC-MC-GASA algorithm are described as follows: Step 1: Initialisation 1.1. Set the initial parameters: initial temperature T ini , lowest temperature T end , cooling efficiency λ, population N pop , generation k. 1.2. According to the timetable at the current stage, extract the genes, and generate an initial parent chromosome. 1.3. Copy the parent chromosome in 1.2, perform the crossover operation to these two parent chromosomes, and generate two child chromosomes. 1.4. Repeat 1.3 until the population reaches N pop , mark the initial generation as k=1, calculate the probabilities of passengers matching different trains according to Figure 6 for each chromosome, obtain passengers' total waiting time W i for each chromosome i.
Step 2: Creating new chromosomes by crossover operation and selecting by Metropolis rule. 2.1. If current temperature t c ≤ T end , then go to Step 5; otherwise, go to 2.2. 2.2. For any chromosome i, conduct the crossover operation to obtain a new chromosome j, calculate the probabilities of passengers matching different trains according to Figure 6 for chromosome i and j, obtain passengers' total waiting time W i and W j respectively.
shown. With regard to the efficiency, unlike the basic rejection rule, the MH algorithm would improve the efficiency of the convergence. Concerning its feasibility, the constant value G norm utilised in normalisation (Equation 24) is not required to reduce the complexity of the calculation. Thus, it is suitable to use the MCMC method to address this issue in stage one. The detailed steps of MCMC are shown as follows: Step 1: (Initialisation) Input timetable parameters, AFC data, and maximum iteration number M, for timetable parameters, including h, TJ j,u , TF j,u , for AFC data, including t i,u in , t i,v out ; Step 2: (MH sampling) At the iteration t, generate the new candidate probabilities of passengers matching different trains ( ... , according to the random walk process; Step 3.1: (Metropolis acceptance rule) Calculate the acceptance probability of Step 3.2: Generate a random number u 0 from the uniform (0,1) distribution; Step 3.3: Determine whether Z * should be accepted or not; if , Step 4: (Terminate or not) If t<M, then t=t+1, and return to Step 2; otherwise, go to Step 5; Step 5: Obtain the probabilities of passengers matching different trains.

GASA incorporating MCMC for stage two
In general, the results obtained by the MCMC for stage one are added to the objective in stage two. Then, the main idea of timetable optimisation for stage two is to adjust the headway and train dwelling time at each station by the GASA algorithm. Therefore, it is evident that any iterations of the GASA algorithm for stage two should involve a complete calculating process of the MCMC for stage one. For descriptive convenience, it is essential to specify some core techniques in GASA.
In the framework of GASA for solving stage two, the chromosome, crossover operation, mutation operation, and Metropolis rule for iteration should be emphasised. Firstly, a chromosome involves the decision variables, which are called "genes." Specifically, the following vector forms the genes of a chromosome:  TD TD TD TD  TD  TD  TD   TD  h j J   ,  ,  ,  Step 5: Obtain the optimal solution 5.1. Select the best chromosome from the population as the output result.

CASE STUDY OF LINE 1 IN BEIJING METRO
In this section, the case study of Line 1 in Beijing Metro is selected to demonstrate the proposed models and algorithms during the morning peak hour (7:00-8:00) on a weekday. The snapshot of Line 1 is shown in Figure 6.
Specifically, Line 1 consists of ten transfer stations. To classify passengers into different types (Figure 2), it is necessary to determine the route for each passenger by using the BFS method. Some results are presented in Table 1   train, the second train, the third train, and the fourth train is 0.63, 0.24, 0.09, and 0.04, respectively. The results correspond strictly to those in Figure 7.
After timetable optimisation, in Figure 8, passengers' total waiting time decreased by 15.5%, more precisely, from 1218 hours (4387651 seconds) to 1029 hours (3704584 seconds). Secondly, from the perspective of the probability of passengers matching the first train, a passenger whose AFC ID is 6185**19 is taken as an example to demonstrate the efficiency of the new timetable. This passenger entered the station at 8:46:07, and exited at 8:56:09. In Figure 9, after calculations by using the MCMC, the train number which matches the passenger's journey time is two, although the maximum alternative trains are four. Then, in Figure 9, the probability of this passenger matching the first train increased by 5%, specifically from 0.5 to 0.525. Thirdly, the

Results analysis
The experiments were conducted on a personal computer with an Intel Core i5-6200U and 12GB RAM. With respect to GASA, the initial temperature, lowest temperature, cooling efficiency, population, and generation are 100, 0, 0.9, and 55, respectively. Regarding the basic parameters of the train, the number of the vehicle seats is set as 240, so the prescribed train capacity is 1440 persons/ train, then the allowed full-loaded coefficient of a train is 150%. Furthermore, the minimum headway is 120 seconds. For MCMC, the maximum iteration is 1000. In addition, the lower bound and the upper bound of the truncated normal distribution, the mean and the standard deviation of the normal distribution are set to 0.3min, 2min, 1.5, and 1, respectively.
AFC data indicate a passenger's unlink trip, which means that the passenger's route is unknown. In China, AFC data provides information including the passenger's ID number, departure station, passage time at an entry gate, destination station, passage time at an exit gate, line number of the departure station, and line number of the destination station. Furthermore, based on the AFC data and the current timetable parameters, the probabilities of passengers matching different trains would be calculated by using the MCMC technique.
Before timetable optimisation, a simple example which includes 50 passengers is shown in Figure 7. Obviously, the area of the first train is the largest, which indicates that most passengers would match the first train successfully. It turns out that during the morning peak hours, most passengers would not be willing to wait in case of being late for work or school. However, due to the finite capacity of a running train, a phenomenon in which passengers are left behind typically occurs. Thus, the probabilities of passengers matching the second, third, or fourth train would also be inferred. From Figure 7, the probability of passengers matching the second train would be typically larger than the counterpart matching the third train. Correspondingly, the probability of passengers matching the third train would also typically be larger than that matching the fourth train. Essentially, these results are coherent with passengers' daily habits. Furthermore, a larger experiment during the period 7:00-8:00 which includes 40000 passengers was also conducted. The average probability of passengers matching the first   non-transfer stations is larger than those at transfer stations. Indeed, this phenomenon corresponds with a recent study [28] (Zhang et al. 2018).
Based on the analysis, it can be concluded that the new timetable is more sufficient than the alternatives from the passenger's perspective. More precisely, several improvements are listed in Table 2. Some timetable parameters before and after optimisation are provided in Table 3.

Sensitivity analysis
Given that different allowed full-loaded coefficients of the running train would affect the objective value of the stage-two model, several additional numerical simulations were conducted on the MAT-LAB platform. In Figure 11, passengers' total waiting time would be shorter when the allowed full-loaded coefficient is higher. In particular, the passengers' total waiting time is associated with the probability of passengers matching different trains. Figure 12 passenger whose probability of matching the first train is equal to one is defined as the unique matching passenger. From Figure 10, the number of unique matching passengers after timetable optimisation increased remarkably compared to before. To sum up, the reason why passengers benefit a lot from the new timetable is that the objective of the new timetable aims to reduce passengers' total waiting time. Furthermore, passengers' total waiting time is based on passengers matching different trains. In other words, shorter passengers' total waiting time corresponds with higher probability of passengers matching the first train. Another interesting phenomenon is that the number of unique matching passengers at   Undoubtedly, W 2 i,u in case 2 is larger than W 1 i,u in case 1. It is indicated that the waiting time of a unique matching passenger is shorter than that of a regular matching passenger. Hence, with a higher full-loaded indicates how the full-loaded coefficient affects the number of unique matching passengers. When the full-loaded coefficient of a running train increases, the number of unique matching passengers increases as well. For demonstrative purposes, the following equation is utilised to explain the mechanism underlying the phenomena in which passengers' total waiting time decreases when the allowed full-loaded coefficient increases. Case 1 (unique matching passenger):  The proposed MCMC-GASA is not efficient enough to find the optimal solution. Hence, a more efficient algorithm should be designed to optimise the timetable in the future. Furthermore, the application of MCMC-GASA is limited by the minimum input dataset, and the results accuracy by MC-MC-GASA is also affected by the results obtained by the BFS. Therefore, a general integrated algorithm combing the BFS and MCMC-GASA should be constructed in the future.
Essentially, passengers matching different trains in the intermediate station of a complete route would be categorised as the transfer train matching behaviour. Thus, the proposed models would also be applicable for network optimisation. In future work, the external factors and unpredicted delays by network will also be included, and our models will be extended to a network case.

ACKNOWLEDGEMENT
This work was supported by the Fundamental Research Funds for the Central Universities 2020YJS083. coefficient of a running train, the number of unique matching passengers would increase simultaneously. Thus, passengers' total waiting time would be shorter as well.

CONCLUSION
To summarise, the mathematical model is formulated to characterise each passenger matching different trains according to the AFC data record. Then, passengers' total waiting time based on each passenger matching different trains is delivered as the objective of the timetable optimisation. Accordingly, two elaborately designed algorithms are proposed to estimate each passenger matching different trains and to optimise timetable, respectively. Moreover, a case study of Line 1 in Beijing metro is utilised to verify the proposed models and algorithms. The results show that the new timetable considering passengers matching different trains would be better and more efficient than the alternative timetable. Particularly, passengers' total waiting time decreased from 1218 hours to 1029 hours, and the number of unique matching passengers increased from 14514 persons to 19900 persons.
Specifically, the train loading and timetable parameters are utilised to build the model of passenger-and-trains matching, and the timetable is optimised according to passenger's matching different trains. However, as mentioned in assumption 2, the passenger's route is obtained by the BFS. In future research, random nature of decisions on the choice of route by passengers will be considered. Timetable parameters on different lines are different, and it indicates that the passengers' different routes would affect the probability of passengers matching different trains. Therefore, the probabilities of route choice for a passenger should be considered for affecting passenger's matching different trains in the future.
As for assumption 4, the advantage of the truncated normal distribution lies in successfully characterising the phenomenon in which the passenger's walking time is not too long nor too short. However, the gender and the age of a passenger would affect the passenger's walking time in the station as well. Thus, passenger's walking time obtained by the truncated normal distribution would not be accurate enough. With this concern, signalling data of the mobile phone will be utilised to verify a passenger's walking time in the future.