Real-Time Train Scheduling With Uncertain Passenger Flows: A Scenario-Based Distributed Model Predictive Control Approach

Real-time train scheduling is essential for passenger satisfaction in urban rail transit networks. This paper focuses on real-time train scheduling for urban rail transit networks considering uncertain time-dependent passenger origin-destination demands. First, a macroscopic passenger flow model we proposed before is extended to include rolling stock availability. Then, a distributed-knowledgeable-reduced-horizon (DKRH) algorithm is developed to deal with the computational burden and the communication restrictions of the train scheduling problem in urban rail transit networks. For the DKRH algorithm, a cost-to-go function is designed to reduce the prediction horizon of the original model predictive control approach while taking into account the control performance. By applying a scenario reduction approach, a scenario-based distributed-knowledgeable-reduced-horizon (S-DKRH) algorithm is proposed to handle the uncertain passenger flows with an acceptable increase in computation time. Numerical experiments are conducted to evaluate the effectiveness of the developed DKRH and S-DKRH algorithms based on real-life data from the Beijing urban rail transit network. The simulation results indicate that DKRH can be used to achieve real-time train scheduling for the urban rail transit network, while S-DKRH can handle the uncertainty in the passenger flows with an acceptable sacrifice in computation time.

the infrastructure limitations of urban rail transit networks.With the rapid expansion of network scale and the growing passenger demands in urban rail transit systems, it becomes increasingly challenging to achieve real-time train scheduling while considering uncertain time-dependent passenger origindestination (OD) demands and operational costs.

A. Passenger-Oriented Train Scheduling for a Single Line
Several methods are reported in the literature to optimize arrival and departure times of trains at each platform in a single line.One important trend is to develop more practically implementable train scheduling strategy by including more attributes of train operation and infrastructure restrictions, e.g., train speed profiles [1], [2], rolling stock circulation [3], [4], train stopping plan [5].Wang et al. [1] explored the train scheduling problem of a metro line while taking train capacity and speed profiles into account, and then an iterative convex programming approach is proposed to solve the resulting nonlinear noncovex optimization problem.Shi et al. [6] investigated a flexible train capacity allocation strategy for a metro line where carriages are reserved for different stations based on time-dependent passenger demands, and the resulting nonlinear integer programming problem is solved through a variable neighborhood search algorithm.Zhou et al. [7] incorporated rolling stock circulation into the train scheduling problem considering passenger demands on a tidal oversaturated metro line, so that passenger demands in different phases can be satisfied.
The above studies are limited to passenger-oriented train scheduling problems of a single line.For an urban rail transit network, different lines typically interact with each other through transfer passengers.Therefore, train scheduling considering detailed passenger origin-destination (OD) demands in urban rail transit networks is regarded as an important direction to further improve passenger satisfaction [8].

B. Passenger-Oriented Train Scheduling for Networks
Train scheduling in urban rail transit networks with timedependent passenger OD demands is challenging due to the requirement for network coordination and the scale of the resulting problem.In order to minimize the energy consumption of trains and the total travel time of passengers, Wang et al. [9] formulated time-dependent passenger OD demands in an urban rail transit network by an event-driven model, where arrival events, departure events, and passenger arrival rates change events are proposed to describe the movement of trains and passengers.Yin et al. [10] proposed a mixed-integer linear programming (MILP) formulation to handle the over-crowdedness of stations in an urban rail transit network, and a decomposition-based adaptive large neighborhood search approach was developed to improve the computational efficiency.Luan and Corman [11] included the train scheduling and passenger routing process in an integrated model, and the resulting mixed-integer nonlinear programming (MINLP) problem is reformulated as an MILP problem to minimize passenger disutility (i.e., passenger delay, travel time, and the number of stranded passengers) and total train delay.
Considering the computational complexity of explicitly integrating departure and arrival times in an urban rail network with time-dependent passenger OD demands, optimizing train departure frequencies of each line has become a promising direction in passenger-oriented train scheduling [8], [12].Canca et al. [8] optimized line frequencies and capacities by solving an MINLP problem.Liu et al. [13] developed a novel passenger flow model to determine train departure frequencies, i.e., the number of trains per unit time in each line, where timedependent passenger OD demands and train capacities are included.The resulting optimization problem can be exactly transformed into an MILP problem, which can be solved efficiently by state-of-the-art MILP solvers [13].Nevertheless, most existing studies in passenger-oriented train scheduling of urban rail networks do not include rolling stock availability due to the computational complexity issue, leaving an open gap for generating a practically implementable timetable.

C. MPC for Real-Time Railway Traffic Management
The train scheduling problem is a typical constrained control problem [14].Model predictive control (MPC) is a methodology for addressing real-time constrained control problems [15], [16].Based on a switching max-plus-linear model, a real-time train scheduling method was developed in [17] to minimize train delays and operational costs.Caimi et al. [18] dealt with train rescheduling problems for complex railway station areas by using MPC.However, as it is an optimizationbased control approach, centralized MPC can be difficult to implement in real-life railway networks because of its computational complexity and global information requirements.These issues become more challenging in the case of largescale networks.
For general large-scale systems, many researchers have been developing non-centralized methods that coordinate subsystems in a decentralized, distributed, or hierarchical manner to achieve fast and effective solutions for the overall system [19], [20], [21].Non-centralized control methods have also been used in railway train scheduling problems.Kersbergen et al. [22] developed several distributed MPC methods for the railway traffic management problem where the arrival and departure times, breaking connections, and train orders in the railway network were jointly optimized.Luan et al. [23] applied three distributed optimization approaches, i.e., an alternating direction method of multipliers approach, a priority-rule-based approach, and a cooperative distributed robust safe but knowledgeable (CDRSBK) algorithm for realtime traffic management of railway networks.Numerical experiments show that the CDRSBK approach with trainbased decomposition performs best on the basis of feasibility, optimality, and computational efficiency.
The train scheduling of urban rail transit networks with time-dependent passenger OD demands is challenging because of the large computational burden.The advanced non-centralized control methods [19], [20], [21] and their successful applications in railway [22], [23] have open opportunities to develop a new efficient distributed MPC method for passenger-oriented train scheduling problems.

D. Train Scheduling Under Uncertainties
There are many uncertain attributes in railway networks, e.g., uncertain passenger flows and uncertain delays, that could influence the performance of train schedules.Cacchiani et al. [24] developed three different MILP formulations based on light robustness (where uncertainty is handled by inserting different protection levels) to reduce passenger inconvenience caused by uncertain passenger demands in a high-speed railway line.The scenario approach [25], [26] is a general data-driven decision-making methodology that can deal with uncertainties of a system.The scenario approach typically captured uncertainties by a collection of representative scenarios, and the decision is then made by considering these representative scenarios.By using different scenarios to capture the uncertain train operation time in the network, Yang et al. [27] developed a two-stage stochastic integer programming model to minimize the expected passenger travel time and transfer activities, where the potential transfer stations are found at the first stage while the least time paths are provided at the second stage.Gong et al. [28] formulated an MINLP problem to optimize the operational costs on an urban rail transit line where passenger distribution is represented via several different scenarios.However, most research only considered uncertain passenger demands for a single line.Passenger demands in urban rail transit networks exhibit highly dynamic and random characteristics because trains typically operate with high density, and passengers can choose different routes and different trains to reach their destinations.Therefore, efficient approaches that can explicitly include uncertain passenger demands in urban rail networks still require further research.

E. Paper Contributions and Structure
The current paper deals with the real-time train scheduling problem considering uncertain time-dependent passenger origin-destination demands in urban rail transit networks.By extending the passenger absorption model developed in [13], the train scheduling problem with rolling stock availability can be addressed by using model predictive control where the optimization problem at each time step is formulated Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
as a mixed-integer linear programming problem.Considering the computational issues, we develop a distributed model predictive control approach where each line is regarded as one subsystem.Furthermore, as passenger flows generally exhibit some degree of uncertainty, a scenario-based approach is incorporated into the distributed model predictive control approach to deal with these uncertainties.
The main contributions of the paper are as follows: 1) A novel distributed-knowledgeable-reduced-horizon (DKRH) algorithm is developed for the train scheduling problem, where a new cost-to-go function is proposed considering computational complexity, prediction horizon, and future performance.2) We incorporate a scenario-based distributed control scheme into the DKRH algorithm, and a scenario-based distributed-knowledgeable-reduced-horizon algorithm is developed to handle uncertain passenger flows in largescale urban rail transit networks.
3) The passenger absorption model of [13] is extended to include rolling stock availability by taking into account the total number of available trains so as to generate practically implementable control strategies.The remaining part of the paper is organized as follows: Section II introduces the mathematical model used in this paper.In Section III, a distributed knowledgeable-reducedhorizon algorithm is developed.In Section IV, we propose a scenario-based distributed knowledgeable-reduced-horizon algorithm.In Section V, the effectiveness of the developed approaches is evaluated based on real-life data from a part of the Beijing urban rail transit network.The paper is concluded with final remarks in Section VI.

II. MATHEMATICAL MODEL
This section starts with the description of the mathematical model proposed by the authors in [13], followed by an extension of the model to include rolling stock availability.Some general explanations for the research problem of this paper are as follows: 1) This paper aims to adjust train schedules for urban rail transit networks online based on real-time passenger demands.We assume the routes of passengers are given a priori.Disturbances and disruptions are not in the scope of this paper.2) The current paper is based on the passenger absorption model developed in [13], which has been developed to determine train departure frequencies (i.e., the number of trains departing from each platform per unit time) for urban rail transit networks.3) After obtaining the departure frequency of each platform, a dedicated lower-level controller [29] can determine the detailed departure and arrival times of trains, where the departure interval during each phase is determined according to the corresponding departure frequency.We start with introducing the notations for the model formulation in Section II-A.Then, the passenger absorption model is summarized in Section II-B.Section II-C introduces the constraints for the model and further extends the model to include rolling stock availability.In the passenger absorption model, the number of passengers n p,d (k) waiting at platform p with station d as their destination at the start of each phase is updated by:

Indices and
where ρ p,d (k) is the average passenger arrival rate at platform p with station d as their destination during phase k; T is the length of a phase; n trans,arrive where ρ station o,d (k) denotes passenger origin-destination demands at phase k with o and d as the origin station and the destination station, respectively; P sta o defines a set of platforms at station o; and λ o, p,d (k) is the proportion 1 of passengers at station o who choose platform p for their travel to destination d; cop( p) defines a set of platforms located at the same station as platform p; t transf q, p denotes the average transfer time for passengers from platform q to platform p; n transf p,q,d (k) is the number of passengers transferring from platform p to platform q with destination d during phase k; α p,d (k) is the fraction of passengers absorbed by trains at platform p with destination d during phase k; n absorb p (k) denotes the total number of passengers absorbed by trains at platform p during phase k.
For the variable n absorb p (k) in ( 4), we have 1 As passenger route choices observed from metro data collection systems typically exhibit consistent patterns, we assume that the proportions of passengers choosing each route are given a priori.Thus, λ o, p,d (k) can be estimated from historical data or obtained according to the shortest paths. with where n want p (k) is the total number of passengers that want to board trains at platform p during phase k; C p (k) is the total remaining capacity of trains that visit platform p during phase k; f p (k) is the number of trains that visit platform p during phase k; C train is the maximum capacity of a train, S denotes the set of stations in the urban rail transit network, and we have where r p pla ( p) refers to the average running time of trains from the preceding platform p pla ( p) to platform p, and T ≫ r p pla ( p) ; sta( p) defines the station of platform p; χ p,q,d is the proportion for passengers transferring from platform p to q ∈ cop( p) with station d as their destination; cop( p) defines a set of platforms located at the same station as platform p; m p (k) denotes the total number of passengers departing from platform p during phase k.
C. Constraints for the Absorption Model 1) Departure Frequency Constraints: In this paper, we only consider the case that each line has one depot to accommodate trains.In general, each train at a line will visit every platform of the line before it returns to deport or starts as a new train service.In this context, the number of trains running on a line can be determined by the number of trains departing from the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
depot.Therefore, the number of trains f p (k) departing from platform p can be calculated by where fst ( p) defines the first platform of the line corresponding to platform p, i.e., the platform connected with the depot of the line, γ p denotes the average time for a train from platform fst ( p) to platform p.
To ensure the safe operation of urban rail transit systems, the number of trains departing from platform p during phase k should be constrained by where h min p and τ min p are the minimum headway and the minimum dwell time at platform p, respectively.
2) Rolling Stock Availability Constraints: In real-life operations, the number of trains used for each line is restricted by the total number of available trains, i.e., the total number of trains running on the line should be smaller than or equal to the total number of available trains.Therefore, the rolling stock availability should be included in order to generate a practically implementable timetable.Considering p as the platform connected with a depot, the train departing from platform p typically visits every platform of the line and requires an average time interval c p to return to the depot, and we define c p as the circulation time.Then, for the passenger absorption model, the trains departing from a depot during the circulation time should satisfy where dep( p) is the set of platforms that use the same depot with platform p; N rs p is the total number of available trains for the line corresponding to platform p.

III. DISTRIBUTED KNOWLEDGEABLE-REDUCED-HORIZON ALGORITHM FOR TRAIN SCHEDULING
Based on the model predictive control (MPC) framework, in this section, we first develop a knowledgeable-reducedhorizon (KRH) approach where a novel cost-to-go function is designed to shorten the prediction horizon.A distributed control framework is then proposed to further reduce the computational burden of solving the MPC optimization problem, thereby achieving real-time train scheduling in the urban rail transit network.In the distributed control framework, each local agent generates its control decisions based on its local information and information from its neighbor agents.Such a framework is in accordance with the real-life situation where global information is typically not available in large-scale urban rail transit networks.

A. Problem Formulation in MPC Set-Up
In an urban rail transit network, passenger satisfaction is strongly related to the total time spent in the network.Based on the absorption model, the total travel time of passengers in the urban rail transit network during phase k is represented by where n p (k)T represents the total waiting time at platform p during phase k, m p (k)r p denotes the total running time until the next platform for passengers departing from platform p during phase k, and g p (k)t transf p represents the total transfer time of passengers at platform p during phase k.
The operational cost of an urban rail transit system is highly related to the energy consumption of trains.Based on the absorption model, the total energy consumption for trains departing from the platform during phase k is computed by where E p represents the average energy consumption for a train to run from platform p to its succeeding platform.Therefore, the MPC optimization problem P MPC k 0 for realtime train scheduling of urban rail transit networks is formulated as subject to (1) − ( 14), ( 16) where N 0 is the prediction horizon, and ξ is a weight balancing the objectives.As explained in [13], the nonlinear optimization problem P MPC k 0 can be transformed into a mixed-integer linear programming (MILP) problem P MILP k 0 with the following form, which is exactly equivalent to the original optimization problem: subject to where x(k) and f (k) respectively concatenate the state variables (i.e., the variables related to the passengers) and decision variables (i.e., the number of trains) of all platforms in the network in phase k; δ(k) and z(k) respectively represent the vector of auxiliary binary variables and auxiliary continuous variables in phase k.The compact equation (23) represents the linear and mixed-integer linear formulations of the equations in ( 1)-( 14).Constraint ( 24) collects all the linear and mixedinteger linear model constraints and operational constraints in a matrix form.Constraint (25) collects the constraints of decision variables, i.e., ( 14) and ( 17), in a matrix form, where K = max p∈P σ p .
For detailed information of transforming nonlinear terms of the model into mixed-integer linear inequalities, we refer the interested readers to [30], [31].

B. Knowledgeable-Reduced-Horizon Algorithm for Train Scheduling
The computational complexity of solving MILP problem P MILP k 0 increases rapidly with the prediction horizon N 0 due to the increasing number of variables.Solving P MILP k 0 at every MPC step is not tractable for large prediction horizons because of the real-time feasibility restriction.Shortening the prediction horizon to reduce the computational burden; however, a short prediction horizon may negatively affect the performance of the controller as less future information can be included in the decision-making process.
Inspired by the robust-safe-but-knowledgeable (RSBK) algorithm proposed in [20], [32], we develop a knowledgeablereduced-horizon (KRH) algorithm to shorten the prediction horizon of the original MPC controller by a customized costto-go function.The optimization problem P KRH k 0 for the KRH algorithm is defined as min where L N (k 0 ) denotes the cost-to-go function associated with the terminal states of passengers at the end of the shortened horizon.
As the target of the controller is to minimize the total travel time of the passengers, the cost-to-go function is designed to determine the cost associated with the passengers that remain at the platforms at the end of the reduced prediction window, i.e., a reasonable estimate of the remaining travel time for passengers waiting at the platforms at the end of the prediction time window.
The cost-to-go function for the remaining passengers at the platforms is defined as: where R p,d represents the set of possible routes for passengers from platform p to their destination d (see Remark 1 below for an example of R p,d ), η p,d, j is defined as the percentage of passengers at platform p that will travel to station d through route j, and we have where P pair j represents the set of platform pairs at a transfer station in route j, and χ q,q ′ ,d is the proportion for passengers transferring from platform q to q ′ .As the route of passengers can be represented by several pairs of platforms, (31) calculates the percentage of passengers that intend to travel from p to d through route j.Since χ q,q ′ ,d is estimated based on historical data, η p,d, j can be calculated offline.
Then, t total p,d, j represents the average travel time for passengers from platform p to their destination d through route j, and t total p,d, j can be calculated offline based on the average dwell times, the average running times, and the average transfer times related to the platforms in route j: where t avrg p, j denotes the average time for passengers from platform p to reach either the next transfer station or the destination station in route j.
The construction of the sets R p,d and P pair j is now illustrated in Remark 1 through an example.Remark 1: An example network is shown in Fig. 1.For passengers waiting at platform a with destination h at the end of the prediction window, there are two possible routes in the example network of Fig. 1.Thus, the set of possible routes for passengers from platform a with destination = {(c 1 , c 2 ), (g 2 , g 1 )}.Then, the corresponding cost-to-go function can be calculated according to (30)- (32).
Comparing P KRH k 0 and P MPC k 0 , we can find that the number of variables and constraints in ( 27) and ( 28) are reduced as the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
prediction horizon is reduced from N 0 to N .Similar to P MILP k 0 , the optimization problem P KRH k 0 for the KRH algorithm is an MILP problem.

C. Distributed KRH Algorithm for Train Scheduling in Urban Rail Transit Network
For large-scale urban rail transit networks, it may not be feasible to solve problem P KRH k 0 in a centralized manner due to the computational burden and the communication restrictions for collecting global information.In the urban rail transit network, different lines typically interact with their neighbor lines through transfer passengers as described in (3).In this section, a distributed-knowledgeable-reduced-horizon (DKRH) algorithm is developed for passenger-oriented realtime train scheduling of urban rail transit networks.
In urban rail transit networks, we can regard each line as a subsystem, where different subsystems interact with each other through transfer passengers.The corresponding objective functions associated with the travel time and energy consumption of subsystem l during phase k are where P line l is the set of platforms of line l.The cost-to-go functions corresponding to the terminal states of passengers of subsystem l is The proposed DKRH algorithm is an iterative algorithm.In every control step of the proposed DKRH algorithm, different subsystems exchange information with their neighbor several times over several iterations.In each iteration, different subsystems solve their local problems in parallel, and then they exchange the new computed solution for the next iteration until the stopping criterion is met.At iteration step ϑ, the l-th subsystem calculates its control inputs through the following optimization problem, denoted as P D l,k 0 , by setting the variables of other subsystems as the corresponding values of the last iteration ϑ − 1: subject to Algorithm 1 describes the DKRH algorithm, where l max is the total number of lines in the network; ε is a small positive value which can be the machine precision.An initial estimate for the decision variable can be that of the basic timetable, i.e., the timetable with regular departure frequencies, which is typically used in the daily operation.As each line is independent from the other lines, i.e., they do not share track and/or platforms with the other lines, trains in different lines will not conflict with each other.In this context, the regular departure frequencies are always feasible.
Algorithm 1 DKRH for Real-Time Train Scheduling Input: k end ; ϑ max ; l max ; ε; initial estimate for the decision variable: for l = 1, . . ., l max do 6: solve problem P D l,k 0 and get f ϑ l (k) and J ϑ l 7: update ( 37), (38), and (39) for l by using f ϑ l (k) end for 9: ϑ ← ϑ + 1 10: apply control decision f l (k) to each subsystem l 12: k ← k + 1 13: until k = k end Lemma 1: As we start with a feasible solution of the overall system and as the initial values of the decision variables are always feasible at every step, a feasible solution of problem P D k 0 can always be found.

IV. SCENARIO-BASED DKRH ALGORITHM
In this section, a scenario-based distributed-knowledgeablereduced-horizon (S-DKRH) algorithm is developed to improve service quality in the presence of uncertain passenger flows.
For a large-scale urban rail transit network, the uncertainties generally consist of global uncertainties (e.g., the uncertainties caused by different weather conditions), and local uncertainties of each subsystems (i.e., the uncertainties due to different line conditions).Both global uncertainties and local uncertainties can be captured as several representative scenarios over the prediction window, which can be defined as global scenarios and local scenarios, respectively, based on historical data [33], [34].If we include all combinations of global scenarios and local scenarios, the total number of combinations N com is where N glo denotes the number of global scenarios; N loc,l is the number of scenarios for subsystem l; l max is the total Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.number of subsystems in the network; In this context, each subsystem should consider the complete set of scenarios, i.e., N com scenarios, when generating its decision variables, which would rapidly increase the computational burden.
In order to address the computational complexity issue arising from the increasing number of scenarios for urban rail transit networks, we adopt a scenario reduction approach [35] into the DKRH algorithm.For subsystem l, the N loc,l scenarios will be directly used for subsystem l in the scenariobased approach.However, when considering the impact from subsystem l ′ (l ′ ̸ = l) on subsystem l, we use the scenario reduction approach to reduce the number of representative scenarios of subsystem l ′ from N loc,l ′ to N l ′ ,l , i.e., N l ′ ,l ≪ N loc,l ′ .In this context, subsystem l only needs to consider N total,l = N glo N loc,l l ′ ̸ =l N l ′ ,l representative scenarios, which can be much smaller than that of original scenario approach with N glo l max l=1 N loc,l representative scenarios.For example, Fig. 2 has three subsystems, and subsystem 2 only considers 3 .Therefore, the computational burden of each subsystem is reduced significantly.
Based on the above scenario reduction approach, we develop the S-DKRH algorithm.For subsystem l with scenario s, the corresponding objective functions are where n p,s (k), m p,s (k), g p,s (k), and E p,s respectively represent the values of n p (k), m p (k), g p (k), and E p under scenario s.The corresponding cost-to-go functions is with n p,d,s (k 0 + N ) denoting the variable n p,d (k 0 + N ) under scenario s.
In the S-DKRH algorithm, subsystem l considers only one representative scenario for each neighbor subsystem, and the variables of the neighbor subsystems are set as the corresponding values of the last iteration.At phase k 0 , the l-th subsystem generates its control decisions by solving the following chance-constraint optimization problem P S l,k 0 : subject to where P {s} denotes the probability of s, and N total,l is the total number of scenarios for agent l after scenario reduction.Eq. (45) represents the linear and mixed-integer linear formulations of the model explained in (1)-( 14) for subsystem l under scenario s; (46) collects the corresponding hard constraints; (47) denotes the chance constraints, i.e., the constraints related to operational performance, 1(•) defines the indicator function,2 and θ l ∈ (0, 1) indicates the minimally required probability that there is no constraint violation; (48) collects the hard constraints of decision variables, i.e., ( 14) and ( 17), for subsystem l with scenario s.By solving P S l,k 0 , we minimize the expected value of objective function (44) while including the corresponding constraint satisfaction in (46).Problem P S l,k 0 for the S-DKRH algorithm is also an MILP problem and can be solved efficiently by using existing MILP solvers.
Algorithm 2 provides the process of the S-DKRH algorithm, where L l represents the neighboring subsystems of l, i.e., lines connected with line l via transfer stations.

V. CASE STUDY
To evaluate the performance of the developed approaches, numerical experiments are conducted based on real-life data of the Beijing urban rail transit network.First, we present the urban rail transit network and some basic settings we use in the case study.Then, simulations are conducted to illustrate the effectiveness of the developed KRH and DKRH algorithms.Finally, we include uncertainty in the passenger Algorithm 2 S-DKRH Algorithm for Real-Time Train Scheduling Input: k end ; ϑ max ; N glo ; N loc,l ; N l ′ ,l ; ε; initial estimate for the decision variable: f 0 l (k), l = 1, . . ., l max ; Output: optimal value f l (k), J l 1: for l = 1, . . ., l max do 2: construct N local,l scenarios for local controller 3: construct 1 combined scenario for its neighbors 4: end for 5: repeat end for 13: apply control decision f l (k) to each subsystem l 16: flows in the simulation to show the performance of the S-DKRH algorithm.

A. Setup
The network we consider includes four bidirectional lines of the Beijing urban rail transit network, i.e., Changping Line, Line 8, Line 13, and Line 15 (see Fig. 3).Therefore, we have four subsystems for the distributed control approaches.The depot for each line is set at the beginning of down direction.The main parameters for the case study are shown in TABLE I, where the circulation time c p mentioned in (17) and ( 18) is estimated based on the average running time and the regular dwell time.The basic timetable is generated by implementing the regular headway and the regular dwell time in TABLE I.
The passenger origin-destination (OD) demands are obtained based on the real-life passenger data of the Beijing urban rail transit network.In particular, we use the real-life data on passengers entering and exiting flows of each station in the network of Fig. 3.The data is updated every 30 minutes.In the case study, we consider passenger flows from 7:00-12:00, which includes situations of both hours and off-peak hours.We directly use the passenger OD demands for the simulation of the deterministic case, while for the uncertain case, we generate uncertain passenger OD demands using Poisson distribution [36] based on the passenger flow data.
After generating the number of trains departing from each platform during each phase, we generate the detailed departure and arrival times of each train by a lower-level controller (e.g., the controller developed in [29]).We use the passenger absorption model as the prediction model and an elaborate model from the literature (i.e., the model in [9] and [37]) as the simulation model to evaluate the effectiveness of the developed approaches.In each MPC step, the resulting mixedinteger linear programming problem is solved by the gurobi solver called from MATLAB (R2019b).The simulations are performed on a computer with an Intel Xeon W-2223 CPU and 8GB RAM.

B. Real-Time Train Scheduling for the Deterministic Case
We conduct simulations for the deterministic case to show the effectiveness of the developed knowledgeable-reducedhorizon (KRH) algorithm and the distributed knowledgeablereduced-horizon (DKRH) algorithm.For comparison, we also perform simulations for the basic timetable as well as the original MPC approach.
According to the circulation time of each line, the prediction horizon of all MPC approaches should be N ≥ 4 (i.e., the length of the prediction time window satisfies t ≥ 7200 s) to ensure that the MPC optimization problem can cover every station in the network.The prediction horizon of the original MPC approach is set as N = 6, while the prediction horizon for KRH and DKRH is reduced to N = 4.For the DKRH approach, we use three subsystems, where each line in Fig. 3 is regarded as one subsystem.Considering the realtime implementation, we set the maximum solution time for each MPC step to 3600 s to meet the real-time feasibility requirement.
The simulation results are displayed in TABLE II, where the value of objective function and computation time of each approach are collected.The value of objective function in each MPC step is shown in Fig. 4.These results show that MPC, KRH, and DKRH can improve the performance of the basic timetable, with an improvement of 16.52%, 15.36%, and 15.88%, respectively.As a real-time control approach, the online computational burden is an essential issue for MPC, which is significantly influenced by the prediction horizon.The original MPC approach with prediction horizon N = 6 cannot calculate its optimal solution within 3600 s.By using the costto-go function in the developed KRH algorithm, the prediction horizon and the solution space are reduced.Thus, the CPU time of the KRH algorithm is reduced significantly while ensuring an acceptable level of solution quality.
As we divide the original problem into three smaller subproblems in the DKRH algorithm, the computational burden of each subproblem is further reduced.Compared with the KRH algorithm, the average CPU time for the DKRH algorithm is reduced from 250.7 s to 35.5 s, and the maximum CPU time is reduced from 636.0 s to 37.8 s.The solution time of the DKRH algorithm is further reduced while maintaining the same level of control performance.
The total travel time of passengers is shown in Fig. 5.To further illustrate the results, the number of trains departing from the depot of Line 13 is given in Fig. 6.In Fig. 5 and Fig. 6, time steps 1-3 represent the morning peak hours at 7:00-8:30.Compared with the basic timetable, more trains are scheduled to attend the large passenger demand in the morning peak hours.Since the maximum number of available trains for Line 13 is 32, and the circulation time for Line 13 is 7101.9s, which is approximately equal to the length of 4 phases, the maximum number of trains scheduled for each phase is restricted.Compared with peak hours, fewer trains are scheduled in off-peak hours to reduce operational costs with an acceptable increase in the total passenger travel time.Based  on the developed approaches, we can obtain the number of trains departing from each platform during each phase, and the corresponding timetable can be further generated.Examples of the timetable are shown in Appendix A.
The simulation results indicate that both KRH and DKRH can be used for real-time train scheduling for urban rail transit networks.In particular, when there are no communication restrictions between different lines, KRH can be used to get a high-quality solution; otherwise, especially for large-scale networks when centralized control for the whole network is not possible due to the communication restrictions, DKRH can be used to achieve real-time train scheduling for the urban rail transit network.

C. Real-Time Train Scheduling Considering Uncertain Passenger Flows
In general, passenger demands in urban rail transit networks satisfy a Poisson distribution [36].In this section, we perform simulations when there exists uncertainty in passenger flows to evaluate the effectiveness of the developed scenariobased distributed knowledgeable-reduced-horizon (S-DKRH) algorithm.
We first start simulations for one uncertain scenario.To have a baseline, we also conduct a simulation with perfect Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.knowledge of the uncertainties, which is indicated as P-DKRH below.It is worth noting that P-DKRH is not realistic as it is not possible to have perfect knowledge of the uncertainties in real life.For the DKRH algorithm, we use the expected value of the passenger demands to calculate the timetable.Using the simulation results in Section V-B, the prediction horizon for P-DKRH, DKRH, and S-DKRH is set as N = 4. TABLE III and Fig. 7 show the simulation results of different approaches under uncertain passenger flows.Compared with the basic timetable, an improved performance can be observed for both DKRH and S-DKRH, with an improvement of 10.38% and 12.90%, respectively.Compared with DKRH, the objective function value of S-DKRH is closer to that of P-DKRH, which implies the effectiveness of the scenario-based approach.Both DKRH and S-DKRH satisfy the real-time feasibility requirement for the given case study.The computational burden of S-DKRH is larger than that of DKRH, and the average CPU time increases from 34.4 s to 347.6 s for S-DKRH.The simulation results demonstrate that a suitable choice is required in real-life applications, i.e., when the CPU power is sufficient, S-DKRH is a better choice to obtain a higher-quality solution; otherwise, when the CPU power is not sufficient, DKRH can be used to calculate a timetable within a shorter period of time with acceptable performance.
The number of trains departing from the depot of Line 13 in the uncertain case is shown in Fig. 8. Time steps 1-3 are associated with the morning peak hours at 7:00-8:30, and it can be observed that more trains are scheduled at time steps 1-3 to attend the large passenger demands.We can also obtain a timetable based on the above results; the timetables  To further demonstrate the effectiveness of the developed S-DKRH algorithm, simulations are carried out in 10 different scenarios.The 10 scenarios are generated based on Poisson distribution with the real-life passenger entering and exiting flow data as the expected value.The average value and the standard deviation of the objective function values for the basic timetable, and the timetable obtained by P-DKRH, DKRH, and S-DKRH are calculated.Compared with the average objective function value of the basic timetable, P-DKRH, DKRH, and S-DKRH yield an improvement of 14.01%, 11.92%, and 13.67%, respectively.Although P-DKRH outperforms DKRH and S-DKRH with respect to both the average value and the standard deviation, as stated before, P-DKRH is not realizable in real life. 3It can be observed in Table IV that the average objective function value and the standard deviation of S-DKRH are smaller than that of DKRH.The simulation results imply that S-DKRH can be a suitable choice to handle uncertain passenger flows.

VI. CONCLUSION
In this paper, we have investigated the real-time train scheduling problem for urban rail transit networks considering uncertain time-dependent passenger OD demands.The passenger absorption model of [13] has been extended to include the rolling stock availability to generate more practically implementable timetables by considering the total  number of available trains.To reduce the prediction horizon of the real-time train scheduling problem, a novel cost-to-go function has been developed.By considering different lines as different subsystems, a distributed-knowledgeable-reducedhorizon (DKRH) algorithm has been proposed considering the computational complexity and communication restrictions in practical urban rail transit networks.Furthermore, a scenariobased distributed-knowledgeable-reduced-horizon algorithm (S-DKRH) has been developed to deal with uncertain passenger flows.Numerical experiments have been conducted to illustrate that 1) DKRH can be used for real-time train scheduling of urban rail transit networks and 2) the S-DKRH algorithm yields better performance than DKRH with an acceptable increase in computation time for uncertain cases.
The results in this paper can help the operator to optimize train schedules to handle uncertain time-dependent passenger demands.Future research includes developing efficient solution approaches for the resulting optimization problems to further improve the real-time feasibility of the approach.In particular, integrating learning-based strategies to learn integer variables can be a possible choice to speed up the optimization process.Furthermore, next to optimizing the train    Section V-C.The timetables correspond to time steps 1-2 in Fig. 8.

( k )
Number of passengers on board of trains, when trains arrive at platform p, with destination d during phase k n alight p,d (k) Number of passengers alighting from trains at platform p with station d as their destination during phase k Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.n transf p,q,d (k) Number of passengers transferring from platform p to q with station d as their destination during phase k n trans,arrive p,d (k) Number of transfer passengers arriving at platform p with station d as their destination during phase k g p (k) Total number of transfer passengers arriving at platform p during phase k n depart p,d (k) Number of passengers departing from platform p with station d as destination during phase k m p (k) Total number of passengers departing from platform p during phase k B. Passenger Absorption Model ) is the number of transfer passengers arriving at platform p with destination d during phase k, and n absorb p,d (k) is the number of passengers at platform p with destination d absorbed by trains during phase k.Then, ρ p,d (k), n trans,arrive p,d (k), and n absorb p,d (k) can be computed by ρ k) is the number of passengers on board of trains at platform p with destination d during phase k, and n alight p,d (k) is the number of passengers alighting from trains at platform p with destination d during phase k.The number of passengers n depart p,d (k) departing from platform p with destination d during phase k is
and the set of platform pairs for route a − b 1 − c 1 − c 2 − g 2 − g 1 − h (named as route 2) is P pair 2

Fig. 2 .
Fig. 2. Reduced scenarios for agent 2 in an example with 3 agents.
for l = 1, . . ., l max do 10: solve problem (44) and get f ϑ l (k) and J ϑ l 11: update constraints in problem P S l,k 0 for l ∈ L l 12:

Fig. 5 .
Fig. 5.Total travel time of passengers at each time step.

Fig. 6 .
Fig. 6.Number of trains departing from the depot of Line 13.

Fig. 8 .
Fig. 8. Number of trains departing from the depot of Line 13 in the uncertain case.

Fig. 13 .
Fig. 13.Timetable for Line 13 generated by DKRH under the uncertain case.

TABLE I PARAMETERS
OF THE NETWORK FOR THE CASE STUDY

TABLE II SIMULATION
RESULTS FOR DIFFERENT APPROACHES UNDER THE DETERMINISTIC CASE Fig. 4. Value of the objective function at each time step.

TABLE III SIMULATION
RESULTS FOR DIFFERENT APPROACHES UNDER THE UNCERTAIN CASE Fig. 7. Value of the objective function at each time step.

TABLE IV COMPARISON
OF THE OBJECTIVE FUNCTION VALUES FOR DIFFERENT APPROACHES of DKRH and S-DKRH for Line 13 at 7:00-8:00 are given in Appendix B.