# Urban Rail Transit Scheduling under Time-Varying Passenger Demand

Authors: Xing Zhao; Zhongyan Hou; Jihuai Chen; Yin Zhang; Junying Sun
Journal: Journal of Advanced Transportation
 (2018)

---

## Abstract

In view of the conflict between the time-variation of urban rail transit passenger demand and the homogeneity of the train timetable, this paper takes into account the interests of both passengers and operators to build an urban rail transit scheduling model to acquire an optimized time-dependent train timetable. Based on the dynamic passenger volumes of origin-destination pairs from the automatic fare collection system, the model focuses on minimizing the total passenger waiting time with constraints on time interval between two consecutive trains, number and capacity of trains available, and load factor of trains. A hybrid algorithm which consists of the main algorithm based on genetic algorithm and the nested algorithm based on train traction calculation and safety distance requirement is designed to solve the model. To justify the effectiveness and the practical value of the proposed model and algorithm, a case of Nanjing Metro Line S1 is illustrated in this paper. The result shows that the optimized train timetable has advantage compared to the original one.


---

## Body

## 1. Introduction

In recent years, with the rapid increase of urban population, the contradiction between transportation supply and demand is becoming more and more prominent, which leads to the rapid development of urban rail transit in China. The efficiency of a public transport system depends on several elements, such as available technology, government policies, the planning process, and real-time control strategies [1]. Similarly, whether the urban rail transit system can operate efficiently depends not only on the infrastructure conditions such as rails and trains, but also on the advancement of the operation management and its technology. The train scheduling is the core of rail transit operation and management and a cohesive tie between passenger and operation companies. Thus, the optimization technology of train scheduling attracted more and more attention.Combined with the characteristics of urban travel pattern, on the one hand, the train scheduling should be formulated based on the time-variation of urban rail transit passenger demand. A part of existing researches focused on how to design a bus periodic timetable scientifically and reasonably. Ceder [2] proposed a graphical method to optimize bus departure time and reduce the number of bus required synchronously according to the uniform passenger demand. Ceder [3] provided a comprehensive framework to acquire the optimized bus periodic timetable with reasonably solving the problem of bus number variations in different time periods. Cordone and Redaelli [4] developed a nonlinear mixed integer model to design a regular timetable with constant train arrival/departure intervals. However, although a periodic train timetable with constant departure interval could show the conciseness and effectiveness under the condition of passengers arriving at stations at a steady rate, but when the passenger arrival rate varies with time, especially in oversaturation condition, a periodic train timetable would lead to passengers waiting time to increase sharply during peak hours and the load factor of trains reduced in the off-peak period. Then, a multiphase, semiperiodic scheduling method which could deal with the problem of demand difference between peak and off-peak hours was arisen. In this kind of timetable, the daily operation time was divided into multiple time periods, and a constant departure interval was set for each time period. Most recent researches concentrated on time-dependent and noncyclic timetable. Zhang et al. [5] analyzed the time-varying characteristics and queuing behavior of passengers to put forward the application framework of timetable optimization technology for urban rail transit. Niu et al. [6, 7] and Niu and Zhou [8] have optimized the train timetable for all-stop pattern and skip-stop pattern on the basis of spatial and temporal distributed passenger demands. Sun et al. [9] formulated three models to design demand-sensitive timetables and found that dynamical timetable built with capacity constraints is more advantageous than the uncapacitated model and the peak/off-peak timetable. Wang et al. [10] built an optimal model to schedule the departure time of each bus service based on time-dependent traffic and customer demand.On the other hand, aiming at the optimization objective of scheduling, although factors of fairness [11], energy efficiency [12], and so on were considered, two types of indicators including reducing the operating costs and enhancing the service quality for passengers were most commonly used. Cacchiani and Toth [13] designed railway timetables to minimize the deviations from an ideal timetable or minimize the services’ running times. However, the latter type of indicator from the view of passenger-oriented was applied more frequently than the former one. Aiming at reducing the waiting time of passengers, Liebchen [14] used a mature analysis model combining with a periodical script of emergency events to optimize the schedule of Berlin subway, which improved the reliability of train timetable. Wong et al. [15] noticed the problem of transferring between urban rail transit lines; thus, they focused on how to optimize the train timetable on the whole network synchronously, in order to minimize the waiting time of transferring passengers. Lee et al. [16] proposed a mathematical model that coordinated the stopping and skipping stations for skip-stop rail operation to minimize user travel time. Wang et al. [10] verified that, compared with the existing bus scheduling system, their model could help reduce the waiting time by a wide margin. Besides, some researchers combined the two types of indicators as a comprehensive optimization objective to formulate a timetable. Zhou and Zhong [17] put a random accident script into the train timetable optimization model, which could simultaneously optimize the passenger waiting time of the high-speed train and the total running time of high-speed and medium-speed trains. Leiva et al. [18] established a nonlinear optimization model to optimize the bus timetable for a skip-stop pattern, which was aimed at shortening the waiting time, travel time, and the cost of line operators.In the aspect of solution algorithm, Sun et al. [9] employed standard solvers (e.g., CPLEX) to solve the uncapacitated and capacitated metro service timetable design problems. Niu et al. [7] used the General Algebraic Modeling System (GAMS) and package AMPL to design a train timetable with time-dependent demand and skip-stop patterns. However, more literatures used heuristic algorithms for scheduling on larger scale networks, Barrena et al. [19] designed a fast adaptive large neighborhood search (ALNS) metaheuristic to optimize single-line rail rapid transit timetable under dynamic passenger demand, and they demonstrated the computational superiority of ALNS compared with a truncated branch-and-cut algorithm and a CPLEX-based algorithm. Genetic algorithms had also been widely applied in scheduling. Wang et al. [20] took the departure time as variables to proceed the intelligent scheduling of bus based on genetic algorithm, and, for the fitness function, he used penalty functions to add a variety of constraints into the objective function, which simplified the amount of calculation. Niu and Zhou [8] presented local improvement and dynamic programming methods to find optimal timetables for individual station cases and also developed a genetic algorithm to solve the multistation problem. Zhu et al. [21] set up a bilevel model, designed a genetic algorithm and MSA algorithm to solve the upper and lower model, respectively, and analyzed the sensitivity of the expected arrival time of passengers.According to the time-variation of urban rail transit passenger demand, this paper takes into account the interests of both passengers and operators to build an urban rail transit scheduling model to acquire an optimized time-dependent train timetable. The proposed model is aimed at minimizing the total passenger waiting time based on the dynamic passenger volumes of origin-destination pairs (OD) from the automatic fare collection (AFC) system. Constraints on time interval between two consecutive trains, number and capacity of trains available, and load factor of trains are contained in this model. A hybrid algorithm is designed to solve the model, which consists of the main algorithm based on genetic algorithm to solve the train departure time at the starting stations of up and down directions and the nested algorithm based on train traction calculation and safety distance requirement to solve the train departure time at other stations. Compared with the existing time-dependent scheduling models, the model is more consistent with the dynamic performance while train traction, idle running, and brake; the constraint of the load factor of trains is added to ensure the benefits of operation enterprises; the model is appropriate for any passenger flow condition either unsaturated or oversaturated; and turn-back process of trains is considered to realize the synchronization scheduling of both up and down directions.


## 2. Model Formulation

On the basis of the known travel OD in minutes, the model with an objective of minimizing the total passenger waiting time and constraints of time interval between two consecutive trains, number and capacity of trains available, and load factor of trains is proposed.


### 2.1. Notations

#### 2.1.1. Parameters

G: Number of trains available (including standby) g: Train ID (g=1,2,3........G) k: Up and down train number (for up, k∈1,3,⋯2M-1; for down, k∈2,4,⋯2N) c: The maximum carrying capacity of train n: Total number of rail transit stations in one direction i: Station number in up and down directions (for up, i∈1,2,⋯n; for down i∈n+1,n+2,…,2n) B 0: The minimum train turn-back time h m i n / h m a x: The minimum or maximum departure interval between two consecutive trains β v: Safety distance between two consecutive trains for a speed v of the train behind λ: Safety stopping distance between two consecutive trains θ m i n: The minimal load factor of trains x i: Regular travel time from station i to station i+1 (xn=0, x2n=0) y i: Stopping time for trains at station i p a s i , i + s , t: Number of passengers arriving at station i heading to station i+s during time period (t-1, t).


#### 2.1.2. Variables

θ k i: Load factor of train k between station i and station i+1 u k i , i + s: Number of passengers boarding on train k at station i heading to station i+s w k i: Number of passengers boarding on train k at station i O k i: Number of passengers getting off train k at station i P k i: Number of passengers remaining on train k when the train departs from station i q k i: Number of passengers remaining at station i when the train k departs from the station h 1: Departure interval between two consecutive trains at the starting station T k: Train turn-back time E t: Number of trains running online at time t E m a x: The maximum number of trains running online simultaneously r k i: Running time of train k from station i to station i+1 A k i: Arrival time of train k at station i D k i: Departure time of train k from station i T W t 1 , t 2: Waiting time of passengers arriving at stations during time period t1,t2.


### 2.2. Assumptions

Two underlying assumptions for the proposed model are stated in the following. Firstly, the urban rail transit line is assumed a single line, or the passenger volumes transferring from other lines on the network could be obtained. Secondly, the process of passengers arriving at stations and boarding on trains is assumed to be satisfied the First-In-First-Out rule (FIFO).


### 2.3. Objective Function

Minimizing the passenger total waiting time is considered as the objective of train timetable optimization. In order to calculate the total waiting time of passengers generated within the study period, the passenger waiting time generated before departure of the first train and after departure of the last train within the study period needs to be taken into account. To prevent double counting, the waiting time generated before departure of the first train, rather than the waiting time generated after departure of the last train, is included in the passenger total waiting time calculation within the study period. The objective function could be expressed as follows:(1)z=min⁡∑i=12n-1TW0,D1i+∑k=32M-1∑i=12n-1TWDk-2i,Dki+∑i=12n-1TW0,D2i+∑k=42N∑i=12n-1TWDk-2i,Dki


#### 2.3.1. Number of Remaining Passengers

For any passenger with the known arriving time, origin station, and destination station, the process of getting on and off the train could be deduced.Considering the situation of saturated passenger demand, when traink arrived at station i, passengers are assumed to board on the train according to the FIFO rule. Then, the number of passengers remaining on train k when the train departs from station i, Pki, the number of passengers boarding on train k at station i, wki, and the number of passengers remaining at station i when the train k departs from the station on the train, qki, could be expressed as follows:(2)Pki=min⁡c,Pki-1-Oki+∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,2,3,…,2n-1(3)wki=min⁡c-Pki-1+Oki,∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,2,3,…,2n-1(4)qki=qk-1i+∑t=Dk-2i+1Dkipasi,i+s,t-wkiIt is noted that the number of passengers in the train is 0 when the train arrives at the starting station,Pk0=Pkn=0. When the train arrives at the terminal station, all passengers will get off, so if i∈1,2,⋯n  &  i+s∈n+1,n+2,…,2n, then, pasi,i+s,t=0.Number of passengers getting off traink at station i is(5)Ok1=0Oki=∑j=1i-1uki-j,i,k=1,3,…,2M-1,2,4,…,2N;i=2,3,4,…,2nwhere the train should be empty without passengers at terminal stations n and 2n; that is, Okn=Pkn-1,Ok2n=Pk2n-1.Assume that the passengers arriving at stationi heading to each station are evenly distributed at the arrival time in each interval; then,(6)uki,i+s=wki·∑t=Dk-2i+1Dkipasi,i+s,t∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,3,4,…,2n-1where if i∈1,2,⋯n  &  i+s∈n+1,n+2,…,2n, then, uki,i+s=0.


#### 2.3.2. Arrival and Departure Time of Train

On the urban rail transit network, each train will be always in accordance with the operation planning in the process of running, so the conditions of meeting and overtaking could be excluded from discussion. The arrival time of train is sequentially deduced from the departure time at the starting station. That is,(7)Aki=Ak1+∑l=1i-1yl+∑l=1i-1rkl,1<i≤nAkn+1+∑l=n+1i-1yl+∑l=n+1i-1rkl,i>n+1(8)Dki=Aki+yi,k=1,3,…,2M-1,2,4,…,2N;i=1,2,⋯2nThe passenger waiting time in an interval is now expressed as(9)TWDk-2i,Dki=qk-2iDki-Dk-2i+t2∑t=Dk-2i+1Dki∑s=12n-ipasi,i+s,t+t∑t=Dk-2i+1Dki∑s=12n-iDkit+1-tpasi,i+s,t


### 2.4. Constraints

#### 2.4.1. Constraints for Departure Interval

The departure interval constraints between two consecutive trains are defined from two aspects: on the one hand, the interval should be greater than the minimum time interval to ensure train safety tracking requirements between two consecutive trains; on the other hand, the interval should be less than the maximum time interval, in order to ensure the passengers’ travel efficiency. The mathematical formula is(10)Dki-Dk-2i≤hmaxAki-Dk-2i≥hminFor the starting station, the departure interval h1 need to satisfy hmin+y1≤h1≤hmax.


#### 2.4.2. Constraints for Load Factor

Under the consideration of the interests of both passengers and operators, the load factor constraints are also defined from two aspects: firstly, in order to maintain the interests of operation enterprises, it needs to carry a certain number of passengers for each train on line; thus, a minimum load factor of trainθmin is put forward. From the passenger point of view, it is necessary to ensure that passengers will not feel too crowded, so the maximum carrying capacityc is proposed. It is obvious that if waiting passengers are more than the maximum carrying capacity of train, passengers will not be able to board on the train. The constraint could be expressed as (11)θ=∑i=12n-1Pki2n-1c≥θmin


#### 2.4.3. Constraint for Maximum Number of Trains Online Running Simultaneously

The maximum number of trains running online simultaneously is subject to number of trains available. Whether a train is prepared to go is the key to solve the line coupling problem. Specifically, trains running online at any time should be less than available trains.Suppose the two consecutive trips of train IDg are designated as train number k and k′; when the departure time of train k at station 1, Ak1 (or at station n+1, Akn+1) is not less than the sum of its departure time of train k′ at station 2n, Ak′2n (or at stationn, Ak′n) and the minimum train turn-back time B0, the number of trains running online at this time remains unchanged; otherwise, the number of trains running online at this time should be increased by one. It is expressed in the following mathematical formula.(12)Et=Et-1,Ak1≥Ak′2n+B0,or,Akn+1≥Ak′n+B0Et=Et-1+1,Ak1<Ak′2n+B0,or,Akn+1<Ak′n+B0Then, the maximum number of trains running online simultaneouslyEmax=maxtEt needs to meet the constraint Emax≤G.


## 2.1. Notations

### 2.1.1. Parameters

G: Number of trains available (including standby) g: Train ID (g=1,2,3........G) k: Up and down train number (for up, k∈1,3,⋯2M-1; for down, k∈2,4,⋯2N) c: The maximum carrying capacity of train n: Total number of rail transit stations in one direction i: Station number in up and down directions (for up, i∈1,2,⋯n; for down i∈n+1,n+2,…,2n) B 0: The minimum train turn-back time h m i n / h m a x: The minimum or maximum departure interval between two consecutive trains β v: Safety distance between two consecutive trains for a speed v of the train behind λ: Safety stopping distance between two consecutive trains θ m i n: The minimal load factor of trains x i: Regular travel time from station i to station i+1 (xn=0, x2n=0) y i: Stopping time for trains at station i p a s i , i + s , t: Number of passengers arriving at station i heading to station i+s during time period (t-1, t).


### 2.1.2. Variables

θ k i: Load factor of train k between station i and station i+1 u k i , i + s: Number of passengers boarding on train k at station i heading to station i+s w k i: Number of passengers boarding on train k at station i O k i: Number of passengers getting off train k at station i P k i: Number of passengers remaining on train k when the train departs from station i q k i: Number of passengers remaining at station i when the train k departs from the station h 1: Departure interval between two consecutive trains at the starting station T k: Train turn-back time E t: Number of trains running online at time t E m a x: The maximum number of trains running online simultaneously r k i: Running time of train k from station i to station i+1 A k i: Arrival time of train k at station i D k i: Departure time of train k from station i T W t 1 , t 2: Waiting time of passengers arriving at stations during time period t1,t2.


## 2.1.1. Parameters

G: Number of trains available (including standby) g: Train ID (g=1,2,3........G) k: Up and down train number (for up, k∈1,3,⋯2M-1; for down, k∈2,4,⋯2N) c: The maximum carrying capacity of train n: Total number of rail transit stations in one direction i: Station number in up and down directions (for up, i∈1,2,⋯n; for down i∈n+1,n+2,…,2n) B 0: The minimum train turn-back time h m i n / h m a x: The minimum or maximum departure interval between two consecutive trains β v: Safety distance between two consecutive trains for a speed v of the train behind λ: Safety stopping distance between two consecutive trains θ m i n: The minimal load factor of trains x i: Regular travel time from station i to station i+1 (xn=0, x2n=0) y i: Stopping time for trains at station i p a s i , i + s , t: Number of passengers arriving at station i heading to station i+s during time period (t-1, t).


## 2.1.2. Variables

θ k i: Load factor of train k between station i and station i+1 u k i , i + s: Number of passengers boarding on train k at station i heading to station i+s w k i: Number of passengers boarding on train k at station i O k i: Number of passengers getting off train k at station i P k i: Number of passengers remaining on train k when the train departs from station i q k i: Number of passengers remaining at station i when the train k departs from the station h 1: Departure interval between two consecutive trains at the starting station T k: Train turn-back time E t: Number of trains running online at time t E m a x: The maximum number of trains running online simultaneously r k i: Running time of train k from station i to station i+1 A k i: Arrival time of train k at station i D k i: Departure time of train k from station i T W t 1 , t 2: Waiting time of passengers arriving at stations during time period t1,t2.


## 2.2. Assumptions

Two underlying assumptions for the proposed model are stated in the following. Firstly, the urban rail transit line is assumed a single line, or the passenger volumes transferring from other lines on the network could be obtained. Secondly, the process of passengers arriving at stations and boarding on trains is assumed to be satisfied the First-In-First-Out rule (FIFO).


## 2.3. Objective Function

Minimizing the passenger total waiting time is considered as the objective of train timetable optimization. In order to calculate the total waiting time of passengers generated within the study period, the passenger waiting time generated before departure of the first train and after departure of the last train within the study period needs to be taken into account. To prevent double counting, the waiting time generated before departure of the first train, rather than the waiting time generated after departure of the last train, is included in the passenger total waiting time calculation within the study period. The objective function could be expressed as follows:(1)z=min⁡∑i=12n-1TW0,D1i+∑k=32M-1∑i=12n-1TWDk-2i,Dki+∑i=12n-1TW0,D2i+∑k=42N∑i=12n-1TWDk-2i,Dki


### 2.3.1. Number of Remaining Passengers

For any passenger with the known arriving time, origin station, and destination station, the process of getting on and off the train could be deduced.Considering the situation of saturated passenger demand, when traink arrived at station i, passengers are assumed to board on the train according to the FIFO rule. Then, the number of passengers remaining on train k when the train departs from station i, Pki, the number of passengers boarding on train k at station i, wki, and the number of passengers remaining at station i when the train k departs from the station on the train, qki, could be expressed as follows:(2)Pki=min⁡c,Pki-1-Oki+∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,2,3,…,2n-1(3)wki=min⁡c-Pki-1+Oki,∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,2,3,…,2n-1(4)qki=qk-1i+∑t=Dk-2i+1Dkipasi,i+s,t-wkiIt is noted that the number of passengers in the train is 0 when the train arrives at the starting station,Pk0=Pkn=0. When the train arrives at the terminal station, all passengers will get off, so if i∈1,2,⋯n  &  i+s∈n+1,n+2,…,2n, then, pasi,i+s,t=0.Number of passengers getting off traink at station i is(5)Ok1=0Oki=∑j=1i-1uki-j,i,k=1,3,…,2M-1,2,4,…,2N;i=2,3,4,…,2nwhere the train should be empty without passengers at terminal stations n and 2n; that is, Okn=Pkn-1,Ok2n=Pk2n-1.Assume that the passengers arriving at stationi heading to each station are evenly distributed at the arrival time in each interval; then,(6)uki,i+s=wki·∑t=Dk-2i+1Dkipasi,i+s,t∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,3,4,…,2n-1where if i∈1,2,⋯n  &  i+s∈n+1,n+2,…,2n, then, uki,i+s=0.


### 2.3.2. Arrival and Departure Time of Train

On the urban rail transit network, each train will be always in accordance with the operation planning in the process of running, so the conditions of meeting and overtaking could be excluded from discussion. The arrival time of train is sequentially deduced from the departure time at the starting station. That is,(7)Aki=Ak1+∑l=1i-1yl+∑l=1i-1rkl,1<i≤nAkn+1+∑l=n+1i-1yl+∑l=n+1i-1rkl,i>n+1(8)Dki=Aki+yi,k=1,3,…,2M-1,2,4,…,2N;i=1,2,⋯2nThe passenger waiting time in an interval is now expressed as(9)TWDk-2i,Dki=qk-2iDki-Dk-2i+t2∑t=Dk-2i+1Dki∑s=12n-ipasi,i+s,t+t∑t=Dk-2i+1Dki∑s=12n-iDkit+1-tpasi,i+s,t


## 2.3.1. Number of Remaining Passengers

For any passenger with the known arriving time, origin station, and destination station, the process of getting on and off the train could be deduced.Considering the situation of saturated passenger demand, when traink arrived at station i, passengers are assumed to board on the train according to the FIFO rule. Then, the number of passengers remaining on train k when the train departs from station i, Pki, the number of passengers boarding on train k at station i, wki, and the number of passengers remaining at station i when the train k departs from the station on the train, qki, could be expressed as follows:(2)Pki=min⁡c,Pki-1-Oki+∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,2,3,…,2n-1(3)wki=min⁡c-Pki-1+Oki,∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,2,3,…,2n-1(4)qki=qk-1i+∑t=Dk-2i+1Dkipasi,i+s,t-wkiIt is noted that the number of passengers in the train is 0 when the train arrives at the starting station,Pk0=Pkn=0. When the train arrives at the terminal station, all passengers will get off, so if i∈1,2,⋯n  &  i+s∈n+1,n+2,…,2n, then, pasi,i+s,t=0.Number of passengers getting off traink at station i is(5)Ok1=0Oki=∑j=1i-1uki-j,i,k=1,3,…,2M-1,2,4,…,2N;i=2,3,4,…,2nwhere the train should be empty without passengers at terminal stations n and 2n; that is, Okn=Pkn-1,Ok2n=Pk2n-1.Assume that the passengers arriving at stationi heading to each station are evenly distributed at the arrival time in each interval; then,(6)uki,i+s=wki·∑t=Dk-2i+1Dkipasi,i+s,t∑s=12n-i∑t=Dk-2i+1Dkipasi,i+s,t,k=1,3,…,2M-1,2,4,…,2N;i=1,3,4,…,2n-1where if i∈1,2,⋯n  &  i+s∈n+1,n+2,…,2n, then, uki,i+s=0.


## 2.3.2. Arrival and Departure Time of Train

On the urban rail transit network, each train will be always in accordance with the operation planning in the process of running, so the conditions of meeting and overtaking could be excluded from discussion. The arrival time of train is sequentially deduced from the departure time at the starting station. That is,(7)Aki=Ak1+∑l=1i-1yl+∑l=1i-1rkl,1<i≤nAkn+1+∑l=n+1i-1yl+∑l=n+1i-1rkl,i>n+1(8)Dki=Aki+yi,k=1,3,…,2M-1,2,4,…,2N;i=1,2,⋯2nThe passenger waiting time in an interval is now expressed as(9)TWDk-2i,Dki=qk-2iDki-Dk-2i+t2∑t=Dk-2i+1Dki∑s=12n-ipasi,i+s,t+t∑t=Dk-2i+1Dki∑s=12n-iDkit+1-tpasi,i+s,t


## 2.4. Constraints

### 2.4.1. Constraints for Departure Interval

The departure interval constraints between two consecutive trains are defined from two aspects: on the one hand, the interval should be greater than the minimum time interval to ensure train safety tracking requirements between two consecutive trains; on the other hand, the interval should be less than the maximum time interval, in order to ensure the passengers’ travel efficiency. The mathematical formula is(10)Dki-Dk-2i≤hmaxAki-Dk-2i≥hminFor the starting station, the departure interval h1 need to satisfy hmin+y1≤h1≤hmax.


### 2.4.2. Constraints for Load Factor

Under the consideration of the interests of both passengers and operators, the load factor constraints are also defined from two aspects: firstly, in order to maintain the interests of operation enterprises, it needs to carry a certain number of passengers for each train on line; thus, a minimum load factor of trainθmin is put forward. From the passenger point of view, it is necessary to ensure that passengers will not feel too crowded, so the maximum carrying capacityc is proposed. It is obvious that if waiting passengers are more than the maximum carrying capacity of train, passengers will not be able to board on the train. The constraint could be expressed as (11)θ=∑i=12n-1Pki2n-1c≥θmin


### 2.4.3. Constraint for Maximum Number of Trains Online Running Simultaneously

The maximum number of trains running online simultaneously is subject to number of trains available. Whether a train is prepared to go is the key to solve the line coupling problem. Specifically, trains running online at any time should be less than available trains.Suppose the two consecutive trips of train IDg are designated as train number k and k′; when the departure time of train k at station 1, Ak1 (or at station n+1, Akn+1) is not less than the sum of its departure time of train k′ at station 2n, Ak′2n (or at stationn, Ak′n) and the minimum train turn-back time B0, the number of trains running online at this time remains unchanged; otherwise, the number of trains running online at this time should be increased by one. It is expressed in the following mathematical formula.(12)Et=Et-1,Ak1≥Ak′2n+B0,or,Akn+1≥Ak′n+B0Et=Et-1+1,Ak1<Ak′2n+B0,or,Akn+1<Ak′n+B0Then, the maximum number of trains running online simultaneouslyEmax=maxtEt needs to meet the constraint Emax≤G.


## 2.4.1. Constraints for Departure Interval

The departure interval constraints between two consecutive trains are defined from two aspects: on the one hand, the interval should be greater than the minimum time interval to ensure train safety tracking requirements between two consecutive trains; on the other hand, the interval should be less than the maximum time interval, in order to ensure the passengers’ travel efficiency. The mathematical formula is(10)Dki-Dk-2i≤hmaxAki-Dk-2i≥hminFor the starting station, the departure interval h1 need to satisfy hmin+y1≤h1≤hmax.


## 2.4.2. Constraints for Load Factor

Under the consideration of the interests of both passengers and operators, the load factor constraints are also defined from two aspects: firstly, in order to maintain the interests of operation enterprises, it needs to carry a certain number of passengers for each train on line; thus, a minimum load factor of trainθmin is put forward. From the passenger point of view, it is necessary to ensure that passengers will not feel too crowded, so the maximum carrying capacityc is proposed. It is obvious that if waiting passengers are more than the maximum carrying capacity of train, passengers will not be able to board on the train. The constraint could be expressed as (11)θ=∑i=12n-1Pki2n-1c≥θmin


## 2.4.3. Constraint for Maximum Number of Trains Online Running Simultaneously

The maximum number of trains running online simultaneously is subject to number of trains available. Whether a train is prepared to go is the key to solve the line coupling problem. Specifically, trains running online at any time should be less than available trains.Suppose the two consecutive trips of train IDg are designated as train number k and k′; when the departure time of train k at station 1, Ak1 (or at station n+1, Akn+1) is not less than the sum of its departure time of train k′ at station 2n, Ak′2n (or at stationn, Ak′n) and the minimum train turn-back time B0, the number of trains running online at this time remains unchanged; otherwise, the number of trains running online at this time should be increased by one. It is expressed in the following mathematical formula.(12)Et=Et-1,Ak1≥Ak′2n+B0,or,Akn+1≥Ak′n+B0Et=Et-1+1,Ak1<Ak′2n+B0,or,Akn+1<Ak′n+B0Then, the maximum number of trains running online simultaneouslyEmax=maxtEt needs to meet the constraint Emax≤G.


## 3. Solution Algorithm

A hybrid algorithm is devised for approximating optimal problem solutions. The main algorithm based on genetic algorithm aims to solve the train departure time at the starting stations of up and down directions, and, by the nested algorithm based on train traction calculation and safety distance requirement, the train departure time at other stations could be obtained.


### 3.1. Main Loop: Genetic Algorithm

Initial Solution (Step  1). For the code for departure time, considering the discrete characteristics of train operation status, a binary coding rule is adopted for the train operation status at each time step. A gene position corresponds to a possible departure time at the starting stations for up and down trains within the study period. Take the departure time at the starting station for an up line as an example as shown in Figure 1, the time at which a train departs is encoded as “1”, while at which no train departs is encoded as “0”. The codes of the train operation status at each time step within the study period compose a chromosome.Figure 1
A coding example of the departure time at the starting station for an up line.Step 2.Generate initial population.Step 2.1.Set the number of iterations t=0. Determine population size n, crossover probability PC, and mutation probability Pm. The initial population S(0) is composed by n feasible chromosomes which are generated by the solutions under equilibrium departure with satisfying the constraints of the departure interval between two consecutive trains at the starting station.Step 2.2.Utilize the algorithm of nested loop to each chromosome and determine the train departure time at other stations.Step 2.3.Calculate the maximum number of trains running online simultaneously by (12) for each chromosome.Step 2.4.Calculate the objective function value of each chromosome in the populations S(0). The constraints of available trains and load factor specially are added to the objective function in the form of penalty terms.Step 3.Set the number of iterations t and calculate the fitness value Fi of each chromosome in the populations S(t). The fitness value Fi equals the reciprocal of the objective function with penalty terms.Step 4.Perform select operation. Calculate the selective probability of each chromosome by Pi=Fi/∑i=1nFi. Based on Roulette wheel selection method, the number of selected times of each chromosome in S(t) is determined, and a new population is formed, which is denoted as NewS(t).Step 5.Perform crossover operation.Step 5.1.The chromosomes in NewS(t) are randomly paired according to the crossover probability PC. Gene positions of crossover are determined randomly and, then, an offspring generation is generated by exchanging corresponding genes of the two paired chromosomes.Step 5.2.Verify whether offspring chromosome meets the constraints of the departure interval between two consecutive trains at the starting station; if it does not meet, abandon the chromosome; if it meets, go to Step 5.3.Step 5.3.Determine the train departure time at other stations of each offspring chromosome on the basis of the nested algorithm. Calculate the fitness value of the offspring and decide whether to accept it by the probability of 1 when F(m)>F(n) or exp⁡(F(m)-F(n)) when F(m)<=F(n); thus, the new population is updated and denoted as CrossS(t).Step 6.Perform mutation operation.Step 6.1.According to the mutation probability Pm, the number of genes that will be mutated is defined. Gene positions of mutation are determined randomly, and genes at the positions are changed from 0 to 1 (or converse) to generate new chromosomes.Step 6.2.Verify whether offspring chromosome meets the constraints of the departure interval between two consecutive trains at the starting station; if it does not meet, abandon the chromosome; if it meets, go to Step 6.3.Step 6.3.Combined with the nested algorithm to generate complete timetable, the fitness value of the generated offspring by mutation action is calculated. The new population is composed by the accepted offspring chromosome and denoted as VariS(t). Record the current optimal solution and its objective function value.Step 7.If the algorithm is not over yet, set t=t+l, and S(t)=VariS(t), return to Step 3, and continue to calculate.Stopping Rules.The fitness value of the best chromosome does not rise in defined iterations, or the number of generations meets the preset threshold value. Output the optimal solution and its objective function value.


### 3.2. Nested Loop: Train Traction Calculation with Constraints

Niu et al. [6, 8] assumed the whole train speed constant for optimizing train timetable, but this is not realistic. For running trains, satisfying train traction calculation and safety distance between two consecutive trains are the basic requirements to determine its operation process.In train traction calculation, the referential operation process including uniform acceleration, idle running, and uniform deceleration motions in a section between two stations will be provided under the certain gradient and rate limiting of section. Integrated with the known stopping time at each station, the referential time-location curve and regular travel time from stationi to station i+1, xi could be determined.The safety distance between two consecutive trains is defined as the sum of the brake distance of the train behind and a constant describing the safety stopping distance between two consecutive trains; that is,βv=v2/2a+λ. Therefore, the operation process of the train behind after departing from the starting station could be acquired based on the time-location curve of the train ahead. The detailed possible situations are as follows.(1) If the distance between two consecutive trains satisfies the constraints for safety distance, the operation process of the train behind will be consistent with the referential operation process.(2) If the distance between two consecutive trains is not longer than the safety distance, the operation process of the train behind will be changed:① At timet, if the train ahead is running in an acceleration or uniform motion, the train behind is in an acceleration motion state, and the distance between the two consecutive trains equals the safety distance; then, the motion state of the train behind should be changed into uniform motion.② At timet, if the train ahead is running in an deceleration motion, the train behind is in an acceleration motion state, and the distance between the two consecutive trains equals the safety distance; then, the train behind should uniformly decelerate to stop.③ At timet, if the train ahead stops, the train behind is in acceleration or uniform motion state, and the distance between the two consecutive trains equals the safety distance; then, the train behind should uniformly decelerate to stop.By these methods, running time of the traink between two stations rki could be determined. Besides, departure interval between two consecutive trains from each station should also meet the constraint in (10). Then, the complete timetable is obtained. It is notable that running speed between two stations illustrated in the running chart as Figure 3 is an average running speed based on distance and running time, while the process of acceleration, idle running, and deceleration is not shown up in the chart.


## 3.1. Main Loop: Genetic Algorithm

Initial Solution (Step  1). For the code for departure time, considering the discrete characteristics of train operation status, a binary coding rule is adopted for the train operation status at each time step. A gene position corresponds to a possible departure time at the starting stations for up and down trains within the study period. Take the departure time at the starting station for an up line as an example as shown in Figure 1, the time at which a train departs is encoded as “1”, while at which no train departs is encoded as “0”. The codes of the train operation status at each time step within the study period compose a chromosome.Figure 1
A coding example of the departure time at the starting station for an up line.Step 2.Generate initial population.Step 2.1.Set the number of iterations t=0. Determine population size n, crossover probability PC, and mutation probability Pm. The initial population S(0) is composed by n feasible chromosomes which are generated by the solutions under equilibrium departure with satisfying the constraints of the departure interval between two consecutive trains at the starting station.Step 2.2.Utilize the algorithm of nested loop to each chromosome and determine the train departure time at other stations.Step 2.3.Calculate the maximum number of trains running online simultaneously by (12) for each chromosome.Step 2.4.Calculate the objective function value of each chromosome in the populations S(0). The constraints of available trains and load factor specially are added to the objective function in the form of penalty terms.Step 3.Set the number of iterations t and calculate the fitness value Fi of each chromosome in the populations S(t). The fitness value Fi equals the reciprocal of the objective function with penalty terms.Step 4.Perform select operation. Calculate the selective probability of each chromosome by Pi=Fi/∑i=1nFi. Based on Roulette wheel selection method, the number of selected times of each chromosome in S(t) is determined, and a new population is formed, which is denoted as NewS(t).Step 5.Perform crossover operation.Step 5.1.The chromosomes in NewS(t) are randomly paired according to the crossover probability PC. Gene positions of crossover are determined randomly and, then, an offspring generation is generated by exchanging corresponding genes of the two paired chromosomes.Step 5.2.Verify whether offspring chromosome meets the constraints of the departure interval between two consecutive trains at the starting station; if it does not meet, abandon the chromosome; if it meets, go to Step 5.3.Step 5.3.Determine the train departure time at other stations of each offspring chromosome on the basis of the nested algorithm. Calculate the fitness value of the offspring and decide whether to accept it by the probability of 1 when F(m)>F(n) or exp⁡(F(m)-F(n)) when F(m)<=F(n); thus, the new population is updated and denoted as CrossS(t).Step 6.Perform mutation operation.Step 6.1.According to the mutation probability Pm, the number of genes that will be mutated is defined. Gene positions of mutation are determined randomly, and genes at the positions are changed from 0 to 1 (or converse) to generate new chromosomes.Step 6.2.Verify whether offspring chromosome meets the constraints of the departure interval between two consecutive trains at the starting station; if it does not meet, abandon the chromosome; if it meets, go to Step 6.3.Step 6.3.Combined with the nested algorithm to generate complete timetable, the fitness value of the generated offspring by mutation action is calculated. The new population is composed by the accepted offspring chromosome and denoted as VariS(t). Record the current optimal solution and its objective function value.Step 7.If the algorithm is not over yet, set t=t+l, and S(t)=VariS(t), return to Step 3, and continue to calculate.Stopping Rules.The fitness value of the best chromosome does not rise in defined iterations, or the number of generations meets the preset threshold value. Output the optimal solution and its objective function value.


## 3.2. Nested Loop: Train Traction Calculation with Constraints

Niu et al. [6, 8] assumed the whole train speed constant for optimizing train timetable, but this is not realistic. For running trains, satisfying train traction calculation and safety distance between two consecutive trains are the basic requirements to determine its operation process.In train traction calculation, the referential operation process including uniform acceleration, idle running, and uniform deceleration motions in a section between two stations will be provided under the certain gradient and rate limiting of section. Integrated with the known stopping time at each station, the referential time-location curve and regular travel time from stationi to station i+1, xi could be determined.The safety distance between two consecutive trains is defined as the sum of the brake distance of the train behind and a constant describing the safety stopping distance between two consecutive trains; that is,βv=v2/2a+λ. Therefore, the operation process of the train behind after departing from the starting station could be acquired based on the time-location curve of the train ahead. The detailed possible situations are as follows.(1) If the distance between two consecutive trains satisfies the constraints for safety distance, the operation process of the train behind will be consistent with the referential operation process.(2) If the distance between two consecutive trains is not longer than the safety distance, the operation process of the train behind will be changed:① At timet, if the train ahead is running in an acceleration or uniform motion, the train behind is in an acceleration motion state, and the distance between the two consecutive trains equals the safety distance; then, the motion state of the train behind should be changed into uniform motion.② At timet, if the train ahead is running in an deceleration motion, the train behind is in an acceleration motion state, and the distance between the two consecutive trains equals the safety distance; then, the train behind should uniformly decelerate to stop.③ At timet, if the train ahead stops, the train behind is in acceleration or uniform motion state, and the distance between the two consecutive trains equals the safety distance; then, the train behind should uniformly decelerate to stop.By these methods, running time of the traink between two stations rki could be determined. Besides, departure interval between two consecutive trains from each station should also meet the constraint in (10). Then, the complete timetable is obtained. It is notable that running speed between two stations illustrated in the running chart as Figure 3 is an average running speed based on distance and running time, while the process of acceleration, idle running, and deceleration is not shown up in the chart.


## 4. Case Study

In order to demonstrate the effectiveness of the proposed model and solving method, we choose a case of Nanjing Metro Line S1 to carry out the proposed method. The line is two-way with 8 stations each direction and an operation time from 06:00 to 22:00. The length of sections between two adjacent stations is shown in Table1, and it is the same for up and down directions. Based on the inbound and outbound data of line S1 from AFC system, the passenger volumes of origin-destination pairs per minute, that is, the time-varying passenger demand between any two stations of the line, are obtained. In particular, the original data does not contain the passengers’ complete travel information that transfers from stations in other lines to Nanjing South Railway station. However, because Nanjing South Railway station is not only the starting station for up direction of line S1, but also the unique transfer station for line S1 with other subway lines, therefore, the transfer passenger volume could be calculated based on the dynamic differences between inbound and outbound volumes of S1, and the time-varying passenger demand will be acquired. The morning peak hour for Nanjing subway system is found to be almost 8-9 AM. To reflect difference in departure frequency in optimization result along with an increase and then a decrease of passenger demand, the study period is selected from 6 to 11 AM. Figure 2 shows the passenger volumes of line S1 per minute in the study period.Table 1
Distance of each section in line S1.
Section Distance/km Section Distance/km Nanjing South Railway Station- Cuipingshan 3.8 Fangzhengzhonglu -Xiangyulubei 7.2 Cuipingshan-Hohai University 3.2 Xiangyulubei - Xiangyulunan 4.3 Hohai University -Jiyindadao 3.4 Xiangyulunan –Lukou Airport 5.0 Jiyindadao-Fangzhengzhonglu 4.6Figure 2
Passenger volumes of line S1 per minute in the study period.Figure 3
Train running chart based on the solution.The algorithm is implemented based on Matlab R2011b and run on a desktop with a 3.4GHz processor and RAM of 4GB. The time step for genetic algorithm is set to be one minute, and it leads to 600 possible departure time for the synchronous optimization of two-way timetable; that is to say, the length of individual chromosome is 600. Parameters in the algorithm are set as follows. The minimum departure interval between two consecutive trains is 2 min, the minimum departure interval between two consecutive trains is 15 min, stopping time at each station is 0.25min, the maximum capacity of train=1440 people, the minimal load factor of trains is 20%, the number of trains available is 15, the minimum train turn-back time is 2 min, and safety stopping distance between two consecutive trains is 10m. The population size is 60, the number of maximum generations is 250, the crossover probability is 0.7, and the mutation probability is 0.1.Considering the randomness of the genetic algorithm, this study has carried on several times of calculation and then analyzed and compared the results of each calculation, to alleviate the problem of getting unreasonable conclusions result from the premature convergence of algorithm.In the optimal solution, there are 42 trains for up direction and 36 trains for down direction. The departure time from the starting station of each train in up and down directions is as shown in Tables2 and 3.Table 2
Departure time at the starting station for up trains.
Train Number Departure time Train Number Departure time Train Number Departure time Train Number Departure time 1 6:15 23 7:52 45 8:59 67 10:11 3 6:28 25 7:59 47 9:07 69 10:17 5 6:40 27 8:06 49 9:14 71 10:23 7 6:50 29 8:12 51 9:20 73 10:30 9 7:01 31 8:18 53 9:26 75 10:35 11 7:09 33 8:24 55 9:33 77 10:40 13 7:15 35 8:29 57 9:40 79 10:45 15 7:23 37 8:34 59 9:48 81 10:51 17 7:30 39 8:40 61 9:53 83 10:57 19 7:37 41 8:45 63 9:58 21 7:45 43 8:52 65 10:04Table 3
Departure time at the starting station for down trains.
Train Number Departure time Train Number Departure time Train Number Departure time Train Number Departure time 2 6:40 20 7:58 38 8:59 56 9:54 4 6:52 22 8:06 40 9:05 58 10:02 6 7:02 24 8:14 42 9:10 60 10:09 8 7:12 26 8:21 44 9:15 62 10:17 10 7:20 28 8:28 46 9:21 64 10:24 12 7:28 30 8:36 48 9:28 66 10:31 14 7:36 32 8:42 50 9:34 68 10:38 16 7:43 34 8:48 52 9:41 70 10:45 18 7:51 36 8:53 54 9:48 72 10:53With the model and algorithm of the nested loop, the train running chart is presented as shown in Figure3. The abscissa represents time and ordinate represents station. The line represents operation status of train. Specifically, if the slope equals 0, the train is stopping at station or turning back for next running; if the slope is greater than 0, the train is in up direction; if the slope is less than 0, the train is in down direction. The absolute value of the slope represents the average speed between two stations.Comparing Tables2 and 3 and Figure 3 with Figure 2, it could be found that the changes of train departure interval are consistent with changes of passenger volumes. For fewer passengers between 6:00 and 7:00 AM, there is a corresponding larger departure interval and a less number of trains running online simultaneously. In the optimized timetable, the departure interval between train 1 and train 3 in up direction reaches 13 minutes, while the departure interval between train 33 and train 35 is only 5 minutes. What is more, difference in number of trains running online simultaneously is more obvious. At 7:00 AM, there are only 5 trains running online, while, at 08:45, there are 13 trains running online.At present, Nanjing S1 line applies a periodic timetable with a uniform departure interval of 8 min; thus, the number of trains is 75 within the study period, the maximum number of trains running online simultaneously is 10, and the average waiting time of passengers is 5.75 minutes based on the same dynamic passenger demand with the case. In the timetable optimized by the proposed model and algorithm, the number of trains increases to 78 (increase by 4%), the maximum number of trains running online simultaneously is 13 which is less than available trains, and the average passenger waiting time reduces to 2.98 minutes (decrease by 48.2%). It could be deduced that the optimized timetable would greatly provide convenience to passengers with an almost unchanged cost for operators.


## 5. Conclusions

To resolve the conflict between the time-variation of urban rail transit passenger demand and the homogeneity of the train timetable, this paper builds an urban rail transit scheduling model to acquire an optimized time-dependent train timetable. Under the premise of dynamic passenger volumes of OD pairs from AFC system, the model aims to minimize the total passenger waiting time with constraints on time interval between two consecutive trains, number and capacity of trains available, and load factor of trains. It could be found that, firstly, the model takes into account the interests of both passengers and operators, secondly, the model is consistent with the characteristics of urban rail transit passenger demand, passenger waiting behavior, and dynamic performance of train operation, thirdly, the model is appropriate for any passenger flow condition either unsaturated or oversaturated, and, finally, turn-back process of trains is considered to realize the synchronization scheduling of both up and down directions.A hybrid algorithm is designed to solve the model, which consists of the main algorithm based on genetic algorithm to solve the train departure time at the starting stations of up and down directions and the nested algorithm based on train traction calculation and safety distance requirement to solve the train departure time at other stations.The proposed model and algorithm is tested by a case of Nanjing Metro Line S1. The result shows that, in the timetable optimized by the proposed model and algorithm, the number of trains increases to 78 (increase by 4%), the maximum number of trains running online simultaneously is 13 which is less than available trains, and the average passenger waiting time reduces to 2.98 minutes (decrease by 48.2%). In conclusion, for passengers, the optimized schedule could not only reduce the waiting time of passengers but also make the passengers have a more comfortable ride experience; for operators, it could guarantee the interests of enterprises and improve work efficiency; for the society, especially the super city and large city, it could make the manpower, material resources, and financial resources fully utilized.



---

*Source: 7285148-2018-09-02.xml*