Hindawi Journal of Advanced Transportation Volume 2017, Article ID 9216864, 16 pages https://doi.org/10.1155/2017/9216864

Research Article Three Extensions of Tong and Richardson’s Algorithm for Finding the Optimal Path in Schedule-Based Railway Networks

J. Xie,1 S. C. Wong,1 andS.M.Lo2

1 Department of Civil Engineering, The University of Hong Kong, Pokfulam, Hong Kong 2Department of Architecture and Civil Engineering, City University of Hong Kong, Kowloon, Hong Kong

Correspondence should be addressed to J. Xie; [email protected]

Received 2 July 2016; Accepted 26 October 2016; Published 12 January 2017

Academic Editor: Richard S. Tay

Copyright © 2017 J. Xie et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

High-speed railways have been developing quickly in recent years and have become a main travel mode between cities in many countries, especially China. Studying passengers’ travel choices on high-speed railway networks can aid the design of efficient operations and schedule plans. The Tong and Richardson algorithm that is used in this model offers a promising method for finding the optimal path in a schedule-based transit network. However, three aspects of this algorithm limit its application to high-speed railway networks. First, these networks have more complicated common line problems than other transit networks. Without a proper treatment, the optimal paths cannot be found. Second, nonadditive fares are important factors in considering travel choices. Incorporating these factors increases the searching time; improvement in this area is desirable. Third, as high-speed railways have low-frequency running patterns, their passengers may prefer to wait at home or at the office instead of at the station. Thus, consideration of a waiting penalty is needed. This paper suggests three extensions to improve the treatments of these three aspects, and three examples are presented to illustrate the applications of these extensions. The improved algorithm can also be used for other transit systems.

1. Introduction algorithm [5] with the branch and bound method. Later, Tong and Wong [6] extended this algorithm by considering Traffic assignment in a transit network is unlike that ina nonadditive fares. Khani et al. [7] improved the searching road network, because transit vehicles run on fixed routes speed of this algorithm by setting a lower bound to reduce and predetermined timetables. Vehicles on roads have more the size of searches. freedom in route selection, and they do not need to depart Other researchers have introduced several important at specific times [1]. There are two approaches to consider variables to limit path searching. These variables include the the time dimension and the fixed routes in a transit network, latest departure time [8], the preset time window between that is, the frequency-based model and the schedule-based the planned departure time and the arrival time [9–14], the model. The frequency-based model [2–4] simplifies the tran- maximumnumberoftransfers[8,9,11,13],themaximum sit network by regarding each line as having many runs and waiting time for transfers [9, 11], and the walking distance the headway of runs as having a mean. The schedule-based [13]. Applying these variables (or bounds) can improve the model[1]isbasedontherealtimetable.Thus,inevaluating branch and bound method, but the effectiveness of the the characteristics of these two approaches, it seems that bounds depends on their preset values. Compared with the scheduled-based model is more promising for dynamic Tong and Richardson’s algorithm, these bounds are not tight transit networks. Generally, there are three methodologies for enough to effectively reduce the searching size. path generation in a schedule-based network. 1.2. Event Dominance Method. Florian [15] suggested an 1.1. Branch and Bound Method. Tong and Richardson [1] sug- eventdominancemethod,whichcanbeusedtofindoptimal gested an optimal path algorithm which combined Dijkstra’s paths to one or multiple destinations. However, the optimality 2 Journal of Advanced Transportation of the path found by this method is questionable, because the After the quickest path search, the earliest arrival time at node EA searching stops after one event associated with the destination 𝑖,namely,𝑇𝑖 ,canbefound. is found. In addition, the real optimal path might be ruled out at an earlier stage. This problem was investigated by Nielsen Step 2. Basedonthequickestpath𝑄 from the origin 𝑜 to the 𝑄 and Frederiksen [16] using a counterexample. They reported destination 𝑑, the total weighted cost 𝑊𝑜𝑑 can be calculated. using hidden waiting time at the origin point to solve it and The weighted cost function for path 𝑗 from node 𝑖 to node 𝑞 explained the method with a two-line example. However, the is search size then becomes larger, so they needed to also use 𝑊𝑗 =𝑓(𝑡𝑗 ) +𝑆𝑗 ∗𝑃T, the graph cut approach, a modification that may fail to help if 𝑖𝑞 𝑖𝑞 𝑖𝑞 (1) the optimal path has more than one transfer, due to the event 𝑡𝑗 dominance principle. where 𝑖𝑞 is the journey time (including waiting time, walking time, and transit time) for path 𝑗 from node 𝑖 to 𝑞, unit: mins. 1.3. Other Methods. Nielsen et al. [17] suggested a specified 𝑗 𝑓(𝑡𝑖𝑞) is the weighted function for journey time in using design method for the Copenhagen suburban rail network. path 𝑗,unit:mins: They divided the path choices into two kinds, that is, paths with no transfers and paths with transfers. The optimal path 𝑗 WK WK W W IV IV 𝑓 (𝑡𝑖𝑞) =𝑃 ∗𝑡𝑗 +𝑃 ∗𝑡𝑗 +𝑃 ∗𝑡𝑗 , (2) with no transfers was selected as the first train departing at the origin to the destination after the planned departure where time.Forthepathwithtransfers,thewholepathwasdivided 𝑗 𝑡 =𝑡WK +𝑡W +𝑡IV, into several segments, according to the transfer points that 𝑖𝑞 𝑗 𝑗 𝑗 (3) were planned in advance, based on the network. Each of the 𝑡WK 𝑗 𝑡W segmentsistreatedlikethepathwithnotransfer.Thismethod where 𝑗 is the walking time for path ,unit:mins; 𝑗 is IV greatly reduces the computation time, but it is only suitable the waiting time at stations for path 𝑗,unit:mins;𝑡𝑗 is the for simple networks with several transfer stations and with in-vehicle time for path 𝑗,unit:mins;𝑃WK is the penalty for full information about passenger choices. walking time; 𝑃W is the penalty for waiting time; 𝑃IV is the T Chen and Yang [18] modified the traditional graphic penalty for in-vehicle time; 𝑃 is the penalty for transfer, unit: network by adding departure time windows on nodes. That is, 𝑆𝑗 𝑗 𝑖 𝑖 mins; 𝑖𝑞 is the number of transfers for path from node to if the arrival time at node is not within the preset departure 𝑞 time window, the passengers will need to wait and decide . whether to depart at the next time window. This kind of Step 3. Set the upper boundary of the latest arrival time at the algorithm provided a way to consider the time dimension, but destination 𝑑: it is not a real schedule-base algorithm, and it simply treats 𝑄 DE waiting time in the same way as the in-vehicle time. 𝐵1 =𝑊𝑜𝑑 +𝑇𝑜 . (4) Compared with the other approaches, Tong and Richard- son’s algorithm has an improved capacity for effectively and Step 4. Reverse the timetable, and set the reversed upper flexibly handling complex transit networks in real time. boundary as the departure time for searching the time- However, in its present form it still has three limitations. dependent quickest paths from the destination to all other 𝑖 This paper aims to extend Tong and Richardson’s algorithm nodes, so that we have the earliest arrival time at node from 𝑑 𝑇EAR to improve its results in dynamic transit networks. This the destination inthereversednetwork 𝑖 . Then, reverse 𝑇EAR 𝑑 improved algorithm can be used as a tool for information 𝑖 to get the latest departure time to the destination at LD provision. Passengers can plan the best path according to node 𝑖, 𝑇𝑖 . their own preference, such as one without transfer or with EA LD less waiting time. In the future, we will develop this algorithm Step 5. Compare 𝑇𝑖 and 𝑇𝑖 to check the accessibility of for network assignment and the planning of schedules, node 𝑖, 𝐴𝑖: but at this stage the algorithm is mainly for transit trip 1, 𝑇LD −𝑇EA ≥0, 𝑖 navigation. { if 𝑖 𝑖 node is accessible, 𝐴𝑖 = { (5) 0, 𝑇LD −𝑇EA <0, 𝑖 { if 𝑖 𝑖 node is inaccessible. 2. Tong and Richardson’s Algorithm Exclude inaccessible nodes, so that inaccessible nodes are not 2.1. Description of Tong and Richardson’s Algorithm. The Tong included in the optimal path search (i.e., in Step 6). and Richardson algorithm can be described as follows. Step 6. The optimal path search finds all of the possible paths Step 1. The time-dependent quickest path algorithm is devel- by searching all accessible nodes. The weighted time function 𝑗 𝑗 𝑄 oped from Dijkstra’s algorithm [5], and it uses travel time 𝑊𝑜𝑖 is calculated for node 𝑖 along path 𝑗.If𝑊𝑜𝑖 >𝑊𝑜𝑑,the between nodes as the path cost (as based on the timetable) to search for path 𝑗 ends. search for the time-dependent quickest paths from the origin ∗ DE DE 𝑗 ∗ 𝑜 to all other nodes, if departing at 𝑇𝑜 .Thevariable𝑇𝑜 is Step 7. The smallest 𝑊𝑜𝑑 is found, and the path 𝑗 is identified the actual clock time for departure at the origin 𝑜,unit:mins. as the optimal path from the origin 𝑜 to destination 𝑑. Journal of Advanced Transportation 3

A and B, and the first arc that meets the time requirement A BCbelongs to . As this kind of line structure is common in railway systems, Tong and Richardson’s algorithm needs to be Figure 1: An example network for the common lines problem. modifiedifitistobeusefulforthesesystems.

2.2.3. Waiting Time at Home. TongandWong[6] provedthat 2.2. Limitations of the Existing Tong and Richardson Algo- all of the coefficients in the weighted cost function should be rithm. This algorithm can be used for most transit networks. at least 1. If one of the coefficients is smaller than 1, the optimal However, it cannot deal with the following three common path may not be found. However, the real situation is more situations in railway networks. DE complex. Passengers want to begin their trip at 𝑇𝑜 : DE ED 2.2.1. Nonadditive Fare. Tong and Richardson’s algorithm 𝑇𝑜 =𝑇𝑜 , (6) does not consider travel fares. If the fare is link-based 𝑇ED and additive (i.e., the fare proportionally increases with the where 𝑜 is the actual clock time for the earliest departure 𝑜 distance or travel time), Tong and Richardson’s algorithm still time at the origin ,unit:mins. works when adding an additional linear extension for the However, the passengers usually need to wait for a while, weighted time function (such as that provided by Friedrich because the trains run based on their timetables. If the waiting time at the origin station exceeds the tolerance of passengers, et al. [9]) along the optimal path search. However, the fare T system for the railway is usually nonadditive, so the additive- 𝑡 , the passengers will choose to leave their homes or offices fare function [9] cannot be used. A later improvement by later. A smaller penalty 𝑃WH (1>𝑃WH ≥0)shouldbe Tong and Wong [6] allowed for the consideration of the non- given for their time waiting at home or the office, because additive fare. However, introducing the fare into the weighted people can use that time for other activities. To consider this cost function enlarged the bounding (i.e., the searching size), condition, a modification of Tong and Richardson’s algorithm so Tong and Wong used the cheapest fare to tighten the is needed. bound. Nevertheless, due to the gap between the fare for the This paper extends Tong and Richardson’s algorithm to quickest path and the cheapest fare, the searching size can solve these limitations, so that the algorithm can better still be large. Therefore, treatments are needed to accelerate analyze dynamic railway networks. the searching process. This paper suggests an effective way to include nonadditive fares. 3. Three Extensions

2.2.2. Common Lines Problem. Alinehasasequenceof 3.1. First Extension: Nonadditive Fare. To add the nonadditive 𝑁 stations and can be separated into (𝑁−1)sections. fare into Tong and Richardson’s algorithm, the total weighted Each line section consists of two successive stations with cost should be modified first, as follows: an arc connecting these two nodes. According to Tong and 𝑗 𝑗 𝑗 T 𝑗 𝐶 =𝑓(𝑡 )+𝑆 ∗𝑃 +𝑔(𝑐 ), (7) Richardson’s algorithm, arcs with the same starting stations, 𝑖𝑞 𝑖𝑞 𝑖𝑞 𝑖𝑞 end stations, and running times can be aggregated into a link 𝑗 where 𝑐𝑖𝑞 is the fare for path 𝑗 from node 𝑖 to 𝑞,unit:yuan, withauniquetransittime.Thearcsofalinkarelistedinthe 𝑗 time sequence. During the path search, for each link only the and 𝑔(𝑐𝑖𝑞) istheweightedfunctionoffareconvertedtotime, first arc having a departure time later than the train’s arrival unit: mins. Also, time at node 𝑖 is used. However, this found path may not be 𝑐𝑗 the optimal path. An example of this problem is shown in 𝑔(𝑐𝑗 )= 𝑖𝑞 , (8) Figure 1. 𝑖𝑞 𝑉 In the problem illustrated in Figure 1, the passenger 𝑉 arrives at A at 8:55 and wants to go to C. There are two train where is the value of time, unit: yuan/min. 𝑃WK 𝑃W 𝑃IV 𝑃T lines: In addition, , , ,and should not be less than 1 [6]. Line 1: it starts from A at 9:00 and ends at B at 10:00. Second, a new step is needed before setting the upper 3 : it starts from A at 9:10, stops at B at 10:10, and boundary (i.e., Step ). finally ends at C at 11:00. A time-dependent cheapest path algorithm is developed from Dijkstra’s algorithm [5], which uses fares between nodes Hence,therearetwopossiblepaths: asthepathcost(basedonthefaretable)tosearchforthefare- dependent cheapest path from the origin 𝑜 to the destination Path 1: first use Line 1, and then transfer to Line 2. S 𝑑.Thus,thesmallestfare𝑐𝑜𝑑 can be found. Path 2: directly use Line 2. Third, the search boundary is tightened, as follows:

𝑄 S DE These two paths have the same arrival time, but Path 2 has 𝐵2 =𝐶𝑜𝑑 −𝑔(𝑐𝑜𝑑)+𝑇𝑜 . (9) notransfer.Thus,Path2maybemoreattractivetopassen- 𝐴−𝑂 gers. However, Path 2 is not found when using Tong and Proposition 1. The optimal path’s arrival time, 𝑇𝑑 ,isless Richardson’salgorithm, because only one link is built between than 𝐵2. 4 Journal of Advanced Transportation

WK W IV 𝑗 𝑄 Proof. As 𝑃 , 𝑃 ,and𝑃 should be at least 1, we have calculated. If 𝑊𝑜𝑑 >𝐶𝑜𝑑,thepathsearchends.Afterthepath 𝑗 𝑗 𝑗 𝑗 search, trace back the path and calculate 𝑔(𝑐𝑜𝑑).Add𝑔(𝑐𝑜𝑑) to 𝑡𝑖𝑞 ≤𝑓(𝑡𝑖𝑞). (10) 𝑗 𝑗 𝑗 𝑊𝑜𝑑 to get 𝐶𝑜𝑑,andthencompareall𝐶𝑜𝑑 to find the smallest Hence, for the optimal path 𝑂 from the origin 𝑜 to the value. The path that has the smallest value is the optimal destination 𝑑,wehave path. The searching time for this process mainly depends on the difference between the fare of the quickest path and 𝑂 𝑂 𝑡𝑜𝑑 ≤𝑓(𝑡𝑜𝑑). (11) the cheapest fare. If this difference tends to be zero, then the boundary for searching is tight. Otherwise, the searching 𝑂 T Adding the transfer penalty for the optimal path 𝑆𝑜𝑑 ∗𝑃 ,the timemaybeverylong. 𝑂 weighted fare function for the optimal path 𝑔(𝑐 ),and𝑇DE The other way to add in the fare factor is to calculate 𝑜𝑑 𝑜 𝐶T−𝑗 𝑗 to both the sides of the inequality, we have the temporary cost ( 𝑞 ) along the path search. When boarding a new line at node 𝑖, the cheapest ticket for this line 𝑂 𝑂 T DE 𝑂 𝑠 𝑡𝑜𝑑 +𝑆𝑜𝑑 ∗𝑃 +𝑇𝑜 +𝑔(𝑐𝑜𝑑) from node 𝑖, 𝑐𝑖∗ is obtained from the fare table. Using this new line to arrive at node 𝑞,thetemporarycostis ≤𝑓(𝑡𝑂 )+𝑆O ∗𝑃T +𝑔(𝑐𝑂 )+𝑇DE 𝑜𝑑 𝑜𝑑 𝑜𝑑 𝑜 T−𝑗 𝐶𝑞 Equation (7) 𝑂 𝑂 T 𝑂 ⇐⇒ 𝑡 +𝑆 ∗𝑃 +𝑇DE +𝑔(𝑐 ) 𝑗 𝑗 T 𝑗 𝑠 𝑜𝑑 𝑜𝑑 𝑜 𝑜𝑑 {𝑓(𝑡 )+𝑆 ∗𝑃 +𝑔(𝑐 )+𝑔(𝑐 ), staying onboard, (17) = 𝑜𝑖 𝑜𝑖 𝑜𝑞 𝑞∗ (12) { 𝑗 𝑗 T 𝑗 𝑂 DE 𝑓(𝑡 )+𝑆 ∗𝑃 +𝑔(𝑐 ), alighting. ≤𝐶𝑜𝑑 +𝑇𝑜 { 𝑜𝑞 𝑜𝑞 𝑜𝑞

𝑇A−𝑂=𝑡𝑂 +𝑇ED T−𝑗 𝑑 𝑜𝑑 𝑜 A−𝑂 𝑂 T 𝑂 During the path search, 𝐶𝑞 is compared with the total ⇐⇒ 𝑇𝑑 +𝑆𝑜𝑑 ∗𝑃 +𝑔(𝑐𝑜𝑑) 𝑃 weighted cost of the present best path, 𝐶𝑜𝑑. This is the 𝑂 DE condition for the fare: ≤𝐶𝑜𝑑 +𝑇𝑜 𝐶𝑃 ≥𝐶T−𝑗. assuming that 𝑜𝑑 𝑞 (18) 𝑇A−𝑂 >𝐵. If the condition for the fare is not satisfied, the path search 𝑑 2 (13) 𝑗 ends. Once path 𝑗 reaches the destination, 𝐶𝑜𝑑 has been Therefore, the above-given inequality can be changed to 𝑗 𝑃 calculated. If 𝐶𝑜𝑑 <𝐶𝑜𝑑,thenpath𝑗 is presently the best 𝐵 +𝑆𝑂 ∗𝑃T +𝑔(𝑐𝑂 )<𝐶𝑂 +𝑇DE path, and the value of the upper boundary is replaced by 2 𝑜𝑑 𝑜𝑑 𝑜𝑑 𝑜 𝑗 S DE 𝐶𝑜𝑑 −𝑔(𝑐𝑜𝑑)+𝑇𝑜 . (9) Equation⇐⇒ 𝐶 𝑄 −𝑔(𝑐S )+𝑇DE +𝑆𝑂 ∗𝑃T 𝑜𝑑 𝑜𝑑 𝑜 𝑜𝑑 Proposition 2. If the condition of the fare is not satisfied, then (14) path 𝑗 from the origin 𝑜 to node 𝑞 cannot be the optimal path. 𝑂 𝑂 DE +𝑔(𝑐𝑜𝑑)<𝐶𝑜𝑑 +𝑇𝑜 Proof. We know that 𝑄 𝑂 T 𝑂 S 𝑂 ⇐⇒ 𝐶 𝑜𝑑 +𝑆𝑜𝑑 ∗𝑃 +[𝑔(𝑐𝑜𝑑)−𝑔(𝑐𝑜𝑑)] < 𝐶𝑜𝑑. T−𝑗 𝑗 𝐶𝑞 ≤𝐶𝑜𝑑. (19) For the definitions of the transfer penalty and the time- dependent cheapest path algorithm, we have That is, if the condition of fare is not satisfied, that is, 𝑆𝑂 ∗𝑃T ≥0, 𝑃 T−𝑗 𝑜𝑑 𝐶𝑜𝑑 <𝐶𝑞 , (20) (15) 𝑔(𝑐𝑂 )−𝑔(𝑐S )≥0. 𝑜𝑑 𝑜𝑑 then

𝑃 𝑗 Hence,theaboveinequalitycanbechangedto 𝐶𝑜𝑑 <𝐶𝑜𝑑. (21) 𝑄 𝑂 𝐶𝑜𝑑 <𝐶𝑜𝑑. (16) Thus, path 𝑗 cannot be the optimal path. This inequality shows that if the assumption is correct, the In this paper, the second approach is used to find the quickest path’s total weighted cost is smaller than that of the optimal path, as the second path provides a tighter bound for optimal path. This result violates the definition of the optimal searching. path, which should have the smallest total weighted cost. 𝑇A−𝑂 𝐵 Hence, the optimal path’s arrival time 𝑑 is earlier than 2. 3.2. Second Extension: Common Lines Problem. The common Fourth, the optimal path search should be modified as lines problem can be solved by redefining the common lines. well. There are two possible ways to add nonadditive fares. Here, the common lines are defined as those train lines having One way is to add the fare to the weighted cost after the the same platform sequence, transit time, stopping time at 𝑗 path search. When finding all of the possible paths, 𝑊𝑜𝑑 is each intermediate platform, and fare. A line has several arcs Journal of Advanced Transportation 5

DE DE T Line 2 Line 2 the trains departing at [𝑇𝑜 , 𝑇𝑜 +𝑡 ] are considered. The A B C T maximum waiting time at the origin station is 𝑡 ,andthe Line 1 actual waiting time for each path is within the tolerance of Figure 2: The rebuilt example network, using the new concept of the passengers. The waiting time at home is not considered common lines. duringthepathsearchofeachtimesubsection,butthis waiting time is considered after the path search so that the optimal path for each departure time section can be found. After searching all of the departure time sections, the optimal connecting each pair of two successive stations. Arcs with 𝑇ED,𝑇LA the same starting station, end station and running pattern for path for the time window [ 𝑜 𝑑 ]canbefound. thewholelineandfare,canbeaggregatedintoalinkwitha Another concept, that of the zone, can be introduced into unique transit time and fare. The arcs of the link are listed in the algorithm to simulate the condition in which passengers the time sequence. To illustrate the difference between this are traveling to or from the station. Zone links are built to new concept of common lines and Tong and Richardson’s connect zones and stations with a timetable for departures. 𝑙 𝑇J concept, the example network in the introduction is rebuilt, Each zone link has a unique journey time 𝑧𝑠𝑙 between 𝑧 𝑠 as shown in Figure 2. zone and station , and different journey times are used to Two links between A and B are built and searched. Paths simulatethecongestioneffectsduringthepeakandoff-peak 1 and 2 are identified and compared so the optimal path periods. The penalty for a journey between zones and stations ZS ZS can be found. This example illustrates that, after using this is 𝑃 (𝑃 ≥1). new concept to build links, the optimal path can be found Thus, a new process to find the optimal path is suggested by selecting only the first train arc, which has a departure and shown below. time later than the arrival time. The proof is presented in 𝑇ED,𝑇LA Proposition A.1 in Appendix. Step 0.Thelinesectionsoutsidethetimewindow[ ℎ 𝑒 ] This approach increases the searching size by adding do not need to be included in the searching network, more links, due to the stricter definition of common lines. andthereforeasubnetworkcanbecreatedtoincreasethe Thus, a time window for searching train arcs is created to searching speed, where ED decrease the searching size. The lower boundary of the time 𝑇ℎ is the earliest departure time at home zone ℎ,unit: window at node 𝑖 is the arrival time at node 𝑖 via the present A−𝑗 mins, and LA path 𝑗,thatis,𝑇𝑖 . Passengers using the present path 𝑗 𝑇 𝑒 A−𝑗 𝑒 is the latest arrival time at the end zone ,unit: cannot take the train which departs at node 𝑖 before 𝑇𝑖 . mins. The upper boundary of the time window at node 𝑖 is the latest 𝑑 𝑖 𝑇LD DE departure time to the destination at node , 𝑖 ,calculated Step 1. The passenger departs from home zone ℎ at 𝑇ℎ ,and DE ED in the reversed path search. A similar concept has been 𝑇 =𝑇 . suggested by Khani et al. [7], who used the quickest time from ℎ ℎ 𝑖 𝑑 node to the destination (i.e., the sum of the transit time and Step 2. Run the quickest path search. In the origin station, J J T walking time) to restrict the search. In fact, this restriction only the trains departing at [𝑇DE +𝑇 , 𝑇DE +𝑇 +𝑡 ]are can be made even tighter by using the latest departure time ℎ ℎ𝑜𝑦 ℎ ℎ𝑜𝑦 𝑇J and considering the waiting time, transit time, and walking considered, where ℎ𝑜𝑦 is the journey time of home zone link time. A proof is given in Proposition A.2 in Appendix to show 𝑦 between the home zone ℎ and the origin station 𝑜. LD that using 𝑇𝑖 for the optimal path search is sufficient. Step 3.Ifnopathisfound,gotoStep11.

A−𝑄 LA A−𝑄 3.3. Third Extension: Departure Time Choice. As has been Step 4. The algorithm stops if 𝑇𝑒𝑛 >𝑇𝑒 ,where𝑇𝑒𝑛 is the proven by Tong and Wong [6], the weighted coefficients for actual clock time for the arrival time at the end zone 𝑒,using time must be at least 1, to ensure that the optimal path’s the quickest path 𝑄 in the 𝑛th departure, unit: mins. ending time is lower than the upper boundary. However, A−𝑄 󸀠𝑃 󸀠𝑃 Go to Step 11 if 𝑇 −𝑇DE >𝐶 ,where𝐶 is the when passengers stay at home or in their offices rather than 𝑒𝑛 ℎ ℎ𝑒 ℎ𝑒 present best path’s weighted path cost, unit: mins. at the station, they value that time as a relative benefit. Thus, The new weighted path cost function for path 𝑗 is it is reasonable to allow the waiting penalty at home or office 𝑃WH 󸀠𝑗 𝑗 𝑗 T 𝑗 J J ( )tobesmallerthan1. 𝐶 ℎ𝑒 =𝑓(𝑡𝑜𝑑)+𝑆𝑜𝑑 ∗𝑃 +𝑔(𝑐𝑜𝑑)+(𝑇ℎ𝑜𝑦 +𝑇𝑒𝑑𝑤) First, a new concept, departure interval, is introduced (22) to solve this problem. Usually, people tend to depart to the ∗𝑃ZS, origin station at intervals such as 8:00, 8:15, or 8:30. The time J intervals between each departure are defined as the departure where 𝑇𝑒𝑑𝑤 is the journey time for end zone link 𝑤, between I I T interval, 𝑡 . In our algorithm, we assume that 𝑡 ≤𝑡.The the end zone 𝑒 and the destination station d,unit:mins. ED LA algorithm divides the time window [𝑇𝑜 ,𝑇𝑑 ] into different Step 5. Run the cheapest path search. In the origin station, departure time sections, and each section’s duration equals DE J DE J T I LA only those trains departing at [𝑇ℎ +𝑇 ,𝑇ℎ +𝑇 +𝑡 ]are 𝑡 ,where𝑇𝑑 is the latest arrival time at the destination 𝑑. ℎ𝑜𝑦 ℎ𝑜𝑦 S For each departure time section at the origin station, only considered. Thus, the smallest fare, 𝑐𝑜𝑑,canbefound. 6 Journal of Advanced Transportation

󸀠𝑄 𝑛=𝑛+1 𝑛 Step 6. Calculate the new total weighted cost 𝐶 ℎ𝑒 and Step 11.If (and is a positive integer), update the the upper boundary 𝐵ℎ𝑒, with the departure time for the departure time: subsection. 𝑃 󸀠 DE ED I If the present best path’s weighted path cost 𝐶 ℎ𝑒 (which 𝑇ℎ =𝑇ℎ + (𝑛−1) ∗𝑡. (26) 󸀠𝑄 is initially infinite) is larger than 𝐶 ℎ𝑒,then DE LA DE LA If 𝑇ℎ <𝑇𝑒 ,gotoStep2.If𝑇ℎ ≥𝑇𝑒 , the algorithm stops. 𝑄 󸀠 S DE When all of the possible time sections have been searched, 𝐵ℎ𝑒 =𝐶ℎ𝑒 −𝑔(𝑐𝑜𝑑)+𝑇ℎ . (23) the path with the lowest weighted travel cost can be found. [𝑇ED,𝑇LA] If not, This path is the optimal path for the time window ℎ 𝑒 . We have tested this new algorithm using the data pro- 𝑃 󸀠 S DE vided by Tong and Richardson [1]. However, fare data is not 𝐵ℎ𝑒 =𝐶 −𝑔(𝑐 ) +𝑇 . (24) ℎ𝑒 𝑜𝑑 ℎ provided, so we set the fare to zero. In addition, as there is no further information about waiting at home, the penalty Step 7. Run the reversed quickest path search, using the EA LD of this is the same as that of waiting at the platform. The boundary 𝐵ℎ𝑒.Compare𝑇𝑖 and 𝑇𝑖 to check the accessi- 𝑖 𝐴 example network of Tong and Richardson is simple, so the bility of node , 𝑖, by using (5). Exclude inaccessible nodes, abovementioned common line problem does not exist. Our so that these nodes will not be included in the optimal path result is consistent with theirs, demonstrating that the new search. extensions do not violate the ability of the initial algorithm. In the next chapter, three examples are presented to show the Step 8.Findtheoptimalpathamongtheaccessiblenodesin DE advantages of the new extensions. thetimewindow[𝑇ℎ ,𝐵ℎ𝑒], and apply the following set of rules: 4. Case Studies DE (1) In the origin station, only trains departing at [𝑇ℎ + J DE J T 4.1. Description of the Example Network. To test the proposed 𝑇ℎ𝑜𝑦, 𝑇ℎ +𝑇ℎ𝑜𝑦 +𝑡 ] are considered. algorithm, 16 important high-speed railway stations in south- (2) Only use the first arc of link 𝑙, in which the departure ernChinaareselectedtoformanexamplenetwork(shownin A−𝑗 time is later than the arrival time 𝑇𝑖 at the starting Figure 3). Except for Guangzhounan Station, which has three node 𝑖 of link 𝑙. platforms, each of the other stations has two platforms (as LD shown in Figure 4). Each platform is considered as a node (3) If the arc of link 𝑙 departs at node 𝑖 later than 𝑇 ,then 𝑖 intheabstractnetwork,andeachstationservesazone.In the search for link 𝑙 stops, as the arcs of link 𝑙 are listed addition, some basic assumptions regarding the passengers in the time sequence. are set as follows: (4) In reality, passengers can only afford a certain number IV of transfers during their journeys. In considering this The penalty for in-vehicle time is 𝑃 =1.0. 𝐿 constraint, a transfer limit ( tran) is introduced into 𝑃WK =2.0 the algorithm to stop the branch search if the number The penalty for walking time is . 𝐿 W of transfers exceeds tran. The penalty for waiting time at the station is 𝑃 =1.8. A−𝑗 𝑇 >𝑇LD T (5) If 𝑖 𝑖 , the search branch stops. The penalty for transfers is 𝑃 = 1.0. (6) If the condition of fare limitation (i.e., (18)) is not The value of time is 𝑉 = 0.625 yuan/min (assuming satisfied,thesearchbranchstops. that the average salary is 6000 yuan/month and the working time is 160 hours/month). I Step 9. Once the optimal path search ends, the waiting time The departure interval, 𝑡 ,is15mins. at home should be added: T The maximum waiting time at the origin station, 𝑡 , 𝑗−H 󸀠𝑗 I WH 𝐶ℎ𝑒 =𝐶𝑜𝑑 + (𝑛−1) ∗𝑡 ∗𝑃 , (25) is 15 mins. J The journey time 𝑇 between a zone 𝑧 and a station 𝐶𝑗−H 𝑧𝑠𝑙 where ℎ𝑒 is the total weighted cost of the newly found 𝑠 is 5 mins. optimal path 𝑗 from home zone ℎ to end zone 𝑒, considering The penalty for a journey between zone 𝑠 and station the waiting time at home or the office and the nonadditive ZS fare, unit: mins. is 𝑃 =1.

The transfer limit for passengers 𝐿tran is 1. Step 10. If the newly found optimal path has a lower total 𝐶𝑃−H weighted cost than ℎ𝑒 ,thenrecordthispathasthepresent These parameters can be obtained by using the state prefer- 𝐶𝑃−H best path and replace ℎ𝑒 as the new value. Note that, at the encemethodbasedonrealdata. 𝑃−H start of this process, the total weighted cost 𝐶ℎ𝑒 equals the Based on the example network, three extensions for the infinite. limitations and their respective examples are presented below. Journal of Advanced Transportation 7

Changsha

Zhuzhouxi Hengshanxi Hengyangdong Yongzhou

Chenzhouxi Guilinbei Shaoguan Hezhou Liuzhou Wuzhounan Guangzhounan Zhaoqindong Nanningdong Humen Shenzhenbei

Figure 3: Sixteen selected stations in southern China.

3, 4 2

5, 6 3

7, 8 4

9, 10 5 15 29, 30 11, 12 6 14 27, 28

13 25, 26 31, 32 16 1, 2 1

21, 22 19, 20 23, 24 13, 14, 33 7 11 12 10 15, 16 8

17, 18 9

Link between zone and station Zone Link between stations Station Figure 4: The abstracted network in southern China.

4.2. Example 1, for Extension 1. A passenger wants to travel The quickest path is path 𝑗1, which has a total weighted 𝑃 from to Liuzhou, and the earliest departure time, cost 𝐶𝑜𝑑 of 626.2 mins and a cheapest fare of 185.5 yuan. Thus, DE 𝑇𝑜 ,is9:30.Therearetwopossiblepaths,asshowninTables the upper boundary is 185.5 1 and 2, and their respective cost calculations are shown in 9:30 + ⌈626.2⌉ −⌊ ⌋=15:01. (27) Tables 3 and 4. 0.625 8 Journal of Advanced Transportation

Table 1: The possible path 𝑗1 for a trip from Guangzhou to Liuzhou. 700 650 Upper boundary Arrival Departure Route used at Fare 600 Node time time arrival (yuan) 550 13 9:30 9:36 500 450 True fare-initial fare + 19 10:21 10:23 Line 1 400 transfer penalty + 31 11:18 11:20 Line 1 137.5 350 walking 27 12:17 12:59 Line 1 300 IVT 250 25 14:20 — Line 2 48.0 cost Temporary 200 150 Table 2: The possible path 𝑗2 for a trip from Guangzhou to Liuzhou. 100 IVT + initial fare 50 Arrival Departure Route used at Fare Waiting Node 0 time time arrival (yuan) 13 21 23 24 13 9:30 9:33 Node 21 11:25 11:27 Figure 5: Temporary cost calculation along the possible path 𝑗2. 185.0 23 14:55 14:55 Line 3 24 14:56 14:56 Walk 80 26 14:59 — Line 4 1.0 70 60 Table 3: Cost calculation for the possible path 𝑗1 for a trip from Guangzhou to Liuzhou. 50 40 Actual Weighted (%) Penalty value time 30 IVT-transit time 238 1.0 238.0 20 IVT-waiting time 10 4 1.0 4.0 on train 0 Walking time 0 2.0 0.0 Path 1 Path 2 Waiting time at 1 48 1.8 86.4 Figure 6: Test result in Example . platform Transfer 1 1.0 1.0 Fare 185.5 0.625 296.8 When the path search arrives at Node 24, using path 𝑗2,the Sum 626.2 𝑃 temporary cost is 626.4 > 626.2 = 𝐶𝑜𝑑, as shown in Figure 5. ThepathsearchforthissectionstopsatNode24.This 𝑗 Table 4: Cost calculation for the possible path 2 for a trip from example shows that the searching time is reduced if the Guangzhou to Liuzhou. condition for the fare is applied. Both the characters of paths and the perceptions of Actual Weighted Penalty value time passengers determine the optimal path. Considering this network structure, path 𝑗1 has a shorter in-vehicle time and IVT-transit time 323 1.0 323.0 a cheaper fare, but the waiting time at the platform is much IVT-waiting time 21.02.0longer than the path 𝑗2.Thebiggestadvantageofpath𝑗2 is on train therefore the short waiting time at the platform. Hence, we W Walking time 1 2.0 2.0 willusetheMonteCarlomethodtotestthesensitivityof𝑃 Waiting time at under this circumstance. 31.85.4 W platform We assume that 𝑃 follows a normal distribution with Transfer 1 1.0 1.0 a mean of 1.8 and a standard deviation of 0.2. A statistical Fare 186.0 0.625 297.6 toolbasedontherealdatacollectedbythestatepreference Sum 631.0 method is used to obtain this information. We randomly W generated100numbersthatfollowthedistributionof𝑃 in Excel. While retaining the other parameters, we put these 100 𝑃W The possible path 𝑗2 is found, because its arrival time at numbers into the model one by one as the value of and destination is within the upper boundary, if the condition for then ran the model to find the optimal path. The test result is the fare (i.e., (18)) does not need to be satisfied. showninFigure6.Thepath𝑗1 has a higher possibility of being If the condition for the fare is used, the temporary cost selectedduetoitsshorterin-vehicletimeandcheaperfare. W is calculated along the path search (shown in Figure 5). However, we also found that when 𝑃 is larger than about Journal of Advanced Transportation 9

According to Tong and Richardson’s algorithm: Table 5: The timetable of the high-speed railway Line 1in Line 1 Line 1 Example 2. Line 2 Line 2 Line 2 Line 2 Line 2 17 15 13 11 9 3 Travel time Arrival Departure Node Station name between stations According to extension 2: time time (mins.) Line 2 Line 2 Line 2 Line 2 Line 2 17 15 13 11 9 3 17 Shenzhenbei — 09:35 Line 1 Line 1 15 Humen 09:52 09:54 17 13 Guangzhounan 10:11 — 17 13:26

12:57 Table 6: The timetable of the high-speed railway Line 2in Example 2. 12:28 Travel time Arrival Departure Node Station name between stations 12:00 time time (mins.) 11:31 17 Shenzhenbei — 09:40 15 Humen 09:57 09:59 17 Line 2 11:02 13 Guangzhounan 10:16 10:23 17 11 Chenzhouxi 11:48 11:50 85 10:33 9Hengyangdong12:2312:2533 10:04 3 Changshanan 13:05 — 40

9:36 Line 1 Table 7: The possible path 𝑗1 using Tong and Richardson’s algorithm in Example 2. 9:07 17 15 13 11 9 3 Arrival Departure Route used at Fare Node Node time time arrival (yuan) Figure 7: Two abstract networks in Example 2. 17 9:30 9:35 15 9:52 9:54 Line 1 74.5 13 10:11 10:23 Line 1 11 11:48 11:50 Line 2 1.9, the optimal path is path 𝑗2 rather than path 𝑗1,soifa 912:2312:25Line2314 passenger really does not want to wait for a train, he or she 3 13:05 — Line 2 is very likely to choose path 𝑗2.

Table 8: The possible path 𝑗1 cost calculation in Example 2. 4.3.Example2,forExtension2. A passenger wants to travel Actual Weighted from Shenzhen to Changsha, and the earliest departure time, Penalty DE value time 𝑇𝑜 , is 9:30. Two possible trains are given in Tables 5 and 6 and illustrated in Figure 7. IVT-transit time 192 1.0 192.0 Based on Tong and Richardson’s algorithm, a link from IVT-waiting time 6 1.0 6.0 Node 17 to Node 15 should be created with two train numbers, on train that is, Line 1 and Line 2, with Line 1 used to travel from Walking time 0 2.0 0.0 Shenzhenbei to Guangzhounan. Only the possible path 𝑗1 can Waiting time at 17 1.8 30.6 befound,asshowninTables7and8.However,basedonthe platform new concept of common lines, there should be two links, that Transfer 1 1.0 1.0 is, one link associated with Line 1 and the other associated Fare 388.5 0.625 621.6 with Line 2. Another possible path, 𝑗2,isfoundandisshown Sum 851.2 in Tables 9 and 10. The weighted cost for 𝑗2 is smaller than that for 𝑗1,sothatthebetterpathis𝑗2,whichcannotbefound by using Tong and Richardson’s algorithm. In summary, this example shows that the first extension has a better solution In the first run, the actual departure time is 9:00. The than that provided by Tong and Richardson’s algorithm. quickest path’s weighted path cost is 585 mins, and the cheapest fare is 185.5 yuan. Thus, the upper boundary, 𝐵ℎ𝑒,is 4.4. Example 3, for Extension 3. A passenger wants to travel 𝑇ED,𝑇LA 185.5 from Guangzhou to Liuzhou. The time window [ ℎ 𝑒 ]= 9:00 + 585 − ⌊ ⌋=13:49. (28) [9:00, 18:00]. 0.625 10 Journal of Advanced Transportation

Table 9: The possible path 𝑗2 using the second extension in Table 12: The possible path cost calculation for the first run. Example 2. Actual Weighted Penalty Arrival Departure Route used at Fare value time Node time time arrival (yuan) IVT-transit time 242 1.0 242.0 IVT-waiting time 17 9:30 9:40 8 1.0 8.0 on train 15 9:57 9:59 Line 2 Walking time 1 2.0 2.0 13 10:16 10:23 Line 2 388.5 Waiting time at 14 1.8 25.2 11 11:48 11:50 Line 2 platform 912:2312:25Line2 Waiting time at 0 0.5 0.0 3 13:05 — Line 2 home Travel between zones and 10 1.0 10.0 Table 10: The possible path 𝑗2 cost calculation in Example 2. stations Actual Weighted Transfer 1 1.0 1.0 Penalty value time Fare 185.5 0.625 296.8 IVT-transit time 192 1.0 192.0 Sum 585.0 IVT-waiting time 13 1.0 13.0 on train Table 13: The possible path for the third run. Walking time 0 2.0 0.0 Arrival Departure Route used at Node Waiting time at time time arrival 10 1.8 18.0 platform Zone 7 — 9:30 Transfer 0 1.0 0.0 13 9:35 9:41 Zone link Fare 388.5 0.625 621.6 19 10:26 10:28 Line 3 31 11:23 11:25 Line 3 Sum 844.6 27 12:22 12:24 Line 3 25 13:45 13:45 Line 4 Table 11: The possible path for the first run. Zone 13 13:50 — Zone link Arrival Departure Route used at Node time time arrival possiblepathisfoundintheoptimalpathsearch(asshown Zone 7 — 9:00 in Tables 13 and 14). The new path cost (579.2 mins) is more 14 9:05 9:12 Zone link than the previous best total weighted cost, so the present best 32 10:48 10:56 Line 1 weighted path cost is updated to 579.2 − 15 = 564.2 mins. 28 12:01 12:01 Line 1 Inthefourthrun,theactualdeparturetimeis9:45. 27 12:02 12:09 Walk The quickest path’s weighted path cost is 752 mins and 25 13:30 13:30 Line 2 the cheapest fare is 185.5 yuan. 752 mins is more than the previous best weighted path cost (564.2 mins). Thus, the Zone 13 13:35 — Zone link upper boundary, 𝐵ℎ𝑒,is 185.5 9 45 + ⌈564.2⌉ −⌊ ⌋=1414. After the reversed quickest path search, a network including : 0.625 : (30) only accessible nodes can be built (as shown in Figure 8). Onepossiblepathisfoundintheoptimalpathsearch(shown No path can be found. Using 752 mins, the upper boundary, inTables11and12).Thepresentbestweightedpathcostis 𝐵ℎ𝑒,isasfollows: updatedto585mins.Asthereisnowaitingtimeathome,the 185.5 present best total weighted cost is also 585 mins. 9 45 + 752 − ⌊ ⌋=1721. : 0.625 : (31) In the second run, the actual departure time is 9:15. No path is found. After the reversed quickest path search, a network having In the third run, the actual departure time is 9:30. The only accessible nodes can be built (as shown in Figure 10). quickest path’s weighted path cost is 564.2 mins, and the Onepossiblepathisfoundintheoptimalpathsearch(as cheapest fare is 185.5 yuan. Clearly, 564.2 mins is less than shown in Tables 15 and 16). The new path cost (774.5 mins) thepreviousbestweightedpathcost(of585mins).Thus,the is more than the previous best weighted path cost, so this 𝐵 upper boundary, ℎ𝑒,is path cannot be the optimal path. This result indicates that 185.5 tightening the upper boundary saves computation time. 9 30 + ⌈564.2⌉ −⌊ ⌋=1359. : 0.625 : (29) The optimal path for this example is the possible path in the third run. This optimal path cannot be found by using After the reversed quickest path search, a network having Tong and Richardson’s algorithm, because its arrival time only accessible nodes can be built (as shown in Figure 9). One (13:50)islaterthantheupperboundaryofthefirstrun(13:49). Journal of Advanced Transportation 11

3, 4 2

5, 6 3

7, 8 4

9, 10 5 15 29, 30 11, 12 6 14 27, 28

13 25, 26 31, 32 16 1, 2 1

21, 22 19, 20 23, 24 13, 14, 33 7 11 12 10 15, 16 8

17, 18 9

Inaccessible Origin and destination Accessible Zone Figure 8: Network accessibility and the found optimal path for the first run.

3, 4 2

5, 6 3

7, 8 4

9, 10 5 15 29, 30 11, 12 6 14 27, 28

13 25, 26 31, 32 16 1, 2 1

21, 22 19, 20 23, 24 13, 14, 33 7 11 12 10 15, 16 8

17, 18 9

Inaccessible Origin and destination Accessible Zone Figure 9: Network accessibility and the found optimal path for the third run.

5. Conclusions for decreasing computation time is added. This method is demonstrated by using the cheapest fare and the temporary This paper suggests three extensions for Tong and Richard- cost. In the second extension, the common lines problem in son’s algorithm. In the first, instead of only considering the a schedule-based transit network is solved by redefining the timeeffect,thefareeffectonchoosingapathisincluded,so common lines. The common lines should be those train lines that the found path is more reasonable. In addition, a method that have the same platform sequences, transit times, and 12 Journal of Advanced Transportation

3, 4 2

5, 6 3

7, 8 4

9, 10 5 15 29, 30 11, 12 6 14 27, 28

13 25, 26 31, 32 16 1, 2 1

21, 22 19, 20 23, 24 13, 14, 33 7 11 12 10 15, 16 8

17, 18 9

Inaccessible Origin and destination Accessible Zone Figure 10: Network accessibility and the found optimal path using 752 mins in the fourth run.

Table 14: The possible path cost calculation for the third run. Table 16: The possible path cost calculation for using 752 minsin the fourth run. Actual Weighted Penalty Actual Weighted value time Penalty IVT-transit time 238 1.0 238.0 value time IVT-waiting time Transit time 308 1.0 308.0 4 1.0 4.0 on train Waiting time on 4 1.0 4.0 Walking time 0 2.0 0.0 train Waiting time at 8 1.8 14.4 Walking time 0 2.0 0.0 platform Waiting time at Waiting time at 33 1.8 59.4 30 0.5 15.0 platform home Waiting time at Travel between 45 0.5 22.5 home zones and 10 1.0 10.0 stations Travel between Transfer 1 1.0 1.0 zones and 10 1.0 10.0 Fare 185.5 0.625 296.8 stations Sum 579.2 Transfer 1 1.0 1.0 Fare 231 0.625 369.6 Table 15: The possible path for using 752 mins in the fourth run. Sum 774.5 Arrival Departure Route used at Node time time arrival Zone 7 — 9:45 introduced into the algorithm to avoid overly long waiting 13 9:50 9:53 Zone link times at the origin station. This extension can also help to 21 11:38 11:42 include the congestion effect in travel between the origin 23 13:49 14:19 Line 5 and destination stations. Hence, the new algorithm can 25 15:35 15:35 be used to find the optimal path in a more complicated Zone 13 15:40 — Zone link transit system, such as a real railway network. The examples shown demonstrate that the extended algorithm can work better than Tong and Richardson’s algorithm. However, stopping times at each intermediate platform and fares. Line more extensions can be done, such as including the selectingrulesarealsoaddedtoreducethecomputation stochastic effects on the arrival times of passengers or trains, complexity. In the third extension, departure time choice is considering the capacity of trains or the fare change. Future Journal of Advanced Transportation 13 work will focus on these additional aspects. The uncertainty destination are the same for Lines 1 and 2, according to the related to fares should be particularly considered, as the new concept of common lines. In addition, path 𝑗1 and path fare is an important factor in market competition, and rail 𝑗2 use the same arriving path to A. Thus, the total weighted companies are interested in how passengers change their cost difference between these paths is behavior when the fare changes. Studies [19, 20] in this area haveindicatedsomevaluablenewdirections,andwewill Δ𝐶 develop this algorithm further in the future. A−𝑗 A−𝑗 W {[(𝑡2 −𝑇A )−(𝑡1 −𝑇A )] ∗ 𝑃 , Con 1, (A.1) = Appendix { A−𝑗 W A−𝑗 IV T {[(𝑡2 −𝑇A )∗𝑃 −(𝑡1 −𝑇A )∗𝑃 ]+𝑃 , Con 2. Propositions The result of this equation is valid because Proposition A.1. Based on the new concept of common lines, the optimal path via link 𝑙 uses the first arc of link 𝑙 having a 𝑡 −𝑇A−𝑗 >𝑡 −𝑇A−𝑗, departuretimethatislaterthanthearrivaltime. 2 A 1 A (A.2)

Proof. Assuming that a path 𝑗 from the origin to node A must 𝑃W ≥𝑃IV ≥1, (A.3) 𝑙 𝑙 use link AB to arrive at node B and that AB has two train arcs that have departure times later than their arrival times at A, 𝑃T ≥1. A−𝑗 (A.4) 𝑇A , then one has the following: Δ𝐶 > 0 Arc1belongstoLine1,anditsdepartingtimeatAis Itcanbeseenthat . If a transfer happens after A, then an assumption can 𝑡1. be made. Suppose that path 𝑗1 and path 𝑗2 have their first Arc 2 belongs to Line 2, and its departing time at A is transfersatnodeCandtheyhaveanothersetofcommonlines 𝑡 2. after A. In that case, A−𝑗 If 𝑇A <𝑡1 <𝑡2,thenArc1isthefirstarchavingadeparture Path 𝑗1: the departing time at A is 𝑡1, and the arriving time that is later than the arrival time. 𝑡 There are two further conditions to consider: time at C is 3; 𝑗 𝑡 Con1:ifpassengersdonotuseLine1toarriveatA Path 2: the departing time at A is 2, and the arriving time at C is 𝑡4. Con 2: if passengers use Line 1 to arrive at A 𝑡 <𝑡 𝑡 <𝑡 Therearetwopossiblepathstotake: If 1 2,then 3 4,becausethetransittimeandstopping time at each intermediate platform from A to C are the same Path 𝑗1: using Arc 1 to continue the journey for path 𝑗1 and path 𝑗2, according to the new concept of

Path 𝑗2: using Arc 2 to continue the journey common lines. At C, Arc 3 is the first arc which departs at Claterthan𝑡3, and the departure time of Arc 3, 𝑡5,isalso If there is no transfer after A, then the fare, transit time, and assumedtobelaterthan𝑡4. Thus, the total weighted cost stopping time at each intermediate platform from A to the difference between path 𝑗1 and path 𝑗2 is as follows:

A−𝑗 A−𝑗 W {[(𝑡2 −𝑇A +𝑡5 −𝑡4)−(𝑡1 −𝑇A +𝑡5 −𝑡3)] ∗ 𝑃 , Con 1, Δ𝐶 = { (A.5) [(𝑡 −𝑇A−𝑗 +𝑡 −𝑡 )−(𝑡 −𝑡 )] ∗ 𝑃W −(𝑡 −𝑇A−𝑗)∗𝑃IV +𝑃T, 2. { 2 A 5 4 5 3 1 A Con

Therefore,

W {[(𝑡2 −𝑡4)−(𝑡1 −𝑡3)]∗𝑃 , Con 1, Δ𝐶 = { (A.6) (𝑡 −𝑇A−𝑗 −𝑡 +𝑡 )∗𝑃W −(𝑡 −𝑇A−𝑗)∗𝑃IV +𝑃T, 2. { 2 A 4 3 1 A Con

According to the new concept of common lines, As for Con 2, the results from (A.3) and (A.4) indicate that 𝑡2 −𝑡4 =𝑡1 −𝑡3. (A.7) A−𝑗 W A−𝑗 Δ𝐶 = (𝑡2 −𝑇A −𝑡4 +𝑡3)∗𝑃 −(𝑡1 −𝑇A ) T Then, Δ𝐶 =,forCon1. 0 ∗𝑃IV +𝑃 14 Journal of Advanced Transportation

A−𝑗 W A−𝑗 ≥(𝑡2 −𝑇A −𝑡4 +𝑡3)∗𝑃 −(𝑡1 −𝑇A ) It is possible that 𝑡5 is smaller than 𝑡4;thatis,path𝑗2 needs to use the next arc, which departs at 𝐶 later than 𝑡4.Inthatcase, W T W T 𝐶 𝑡 ∗𝑃 +𝑃 =(𝑡2 −𝑡4 +𝑡3 −𝑡1)∗𝑃 +𝑃 this path is called Arc 4, with its departure time at being 6. Also, the total weighted cost difference between path 𝑗1 and >0. path 𝑗2 is (A.8)

A−𝑗 A−𝑗 W {[(𝑡2 −𝑇A +𝑡6 −𝑡4)−(𝑡1 −𝑇A +𝑡5 −𝑡3)] ∗ 𝑃 , Con 1, Δ𝐶 = { (A.9) [(𝑡 −𝑇A−𝑗 +𝑡 −𝑡 )−(𝑡 −𝑡 )] ∗ 𝑃W −(𝑡 −𝑇A−𝑗)∗𝑃IV +𝑃T, 2. { 2 A 6 4 5 3 1 A Con

S Similarly, 𝑐𝑜𝑑: Thesmallestfarefromtheorigin𝑜 to the destination 𝑑,unit:yuan W 𝑠 Δ𝐶 = (𝑡6 −𝑡5)∗𝑃 , Con 1, 𝑐𝑞∗: Thesmallestticketfareforthepresentline (A.10) from the last transfer node 𝑞,unit:yuan W T 𝑗 Δ𝐶 ≥ (𝑡6 −𝑡5)∗𝑃 +𝑃 , 2. Con 𝐶𝑖𝑞:Theweightedcostforpath𝑗 from node 𝑖 to 𝑞,unit:mins ItcanbeseenthatΔ𝐶 >. 0 󸀠𝑗 𝐶 ℎ𝑒:Thenewweightedcostforpath𝑗 from home Thus, path 𝑗1 is either better than or the same as path 𝑗2; zone ℎ to end zone 𝑒,unit:mins that is, using path 𝑗1 canensurethebestresult.Therefore, 𝐶𝑗−H 𝑗 based on the new concept of common lines, the optimal path ℎ𝑒 :Thetotalweightedcostofpathfrom home ℎ 𝑒 via link 𝑙 uses the first arc of link 𝑙 having a departure time zone to end zone , considering the waiting later than the arrival time. time at home or office and the nonadditive fare, unit: mins T Proposition A.2. Theoptimalpathdoesnotuseatrainthat 𝐶𝑗 :Thetemporarycostalongthepath𝑗,unit: 𝐿𝐷 departs from node 𝑖 later than 𝑇𝑖 . mins 𝑑: The destination T 𝑒 Proof. Assuming that train 𝑘 departs from node 𝑖 at 𝑇𝑘𝑖 and : The end zone T LD 𝑓(𝑡𝑗 ) that 𝑇𝑘𝑖 >𝑇𝑖 , then the train arrives at the destination 𝑑 at 𝑖𝑞 : The weighted function for journey time 𝑗 𝑖 𝑞 𝐵2 +Δ𝑡. According to the reverse path algorithm, we know using path from node to ,unit:mins 𝑗 LD T 𝑔(𝑐 ) 𝑗 that Δ𝑡 >.Ifnot,then 0 𝑇𝑖 should be 𝑇𝑘𝑖. According to 𝑖𝑞 :Theweightedfunctionoffareusingpath A−𝑂 𝑖 𝑞 Proposition 1, no optimal path’s arrival time 𝑇𝑑 can be later from node to ,convertedtotime,unit: than 𝐵2. Hence, the optimal path does not use a train which mins LD ℎ departs from node 𝑖 later than 𝑇 . : The home zone 𝑖 𝑖 𝑞 Furthermore, if path 𝑗 can be the optimal path, then or : The identification for nodes 𝑗 according to Proposition A.2 we have : The identification for paths 𝑘: The identification for trains A−𝑗 D−𝑗 T LD 𝑙 or 𝑦,: 𝑤 The identification for links 𝑇𝑖 ≤𝑇𝑖 =𝑇𝑘𝑖 ≤𝑇𝑖 , (A.11) 𝐿tran: The maximum number of transfers for a journey 𝑇D−𝑗 𝑖 𝑗 where 𝑖 is the departure time at node via path ,unit: 𝑜:Theorigin mins. 𝑂: The optimal path departing from the origin 𝑜 DE to the destination 𝑑 at 𝑇𝑜 Notations 𝑃: The present best path departing from the DE origin 𝑜 to the destination 𝑑 at 𝑇𝑜 𝐴𝑖: The accessibility of node 𝑖 IV IV 𝑄 DE 𝑃 : Thepenaltyforin-vehicletime,𝑃 ≥1 𝐵1:Theupperboundary,𝑊 +𝑇𝑜 ,unit: T T 𝑜𝑑 𝑃 : The penalty for transfer, 𝑃 ≥1,unit:mins mins W W 𝑄 S DE 𝑃 : The penalty for waiting time, 𝑃 ≥1 𝐵2:Theupperboundary,𝐶𝑜𝑑 −𝑔(𝑐𝑜𝑑)+𝑇𝑜 , WH 𝑃 : The penalty for waiting at home or office, unit: mins WH 𝐵 1>𝑃 ≥0 ℎ𝑒: The upper boundary of the extended WK WK algorithm, unit: mins 𝑃 : The penalty for walking time, 𝑃 ≥1 ZS 𝑐𝑗 𝑗 𝑖 𝑞 𝑃 : The penalty for a journey between zones and 𝑖𝑞: Thefareforpath from node to ,unit: ZS yuan stations, 𝑃 ≥1 Journal of Advanced Transportation 15

𝑄: The quickest path departing from the origin Acknowledgments DE 𝑜 to the destination 𝑑 at 𝑇𝑜 The work described in this paper was supported bya 𝑠: The identification for stations grant from the Research Grants Council of the Hong Kong 𝑆𝑗 𝑗 𝑖𝑞: The number of transfers for path from Special Administrative Region (Project no. [T32-101/15-R]). 𝑖 𝑞 node to The first author was also supported by two scholarships (a I 𝑡 : The departure interval, unit: mins Postgraduate Scholarship from the University of Hong Kong IV 𝑡𝑗 : Thein-vehicletimeforpath𝑗,unit:mins and a University Postgraduate Fellowship from the Jessie and 𝑗 George Ho Charitable Foundation). 𝑡𝑖𝑞: The journey time, including waiting time, walking time, and transit time for path 𝑗 from node 𝑖 to 𝑞,unit:mins References T 𝑡 : The tolerance of passengers for waiting at the [1] C. O. Tong and A. J. Richardson, “Acomputer model for finding origin station, unit: mins WK the time-dependent minimum path in a transit system with 𝑡𝑗 :Thewalkingtimeforpath𝑗,unit:mins fixed schedules,” JournalofAdvancedTransportation,vol.18,no. W 𝑡𝑗 : The waiting time at stations for path 𝑗,unit: 2, pp. 145–161, 1984. mins [2] C. Chriqui and P. Robillard, “Common bus lines,” Transporta- A−𝑗 tion Science,vol.9,no.2,pp.115–121,1975. 𝑇𝑖 : The arrival time at node 𝑖 via path 𝑗,unit: mins [3] S. Nguyen and S. Pallottino, “Equilibrium traffic assignment for 𝑇A−𝑄 large scale transit networks,” European Journal of Operational 𝑒𝑛 : The actual clock time for the arrival time at Research, vol. 37, no. 2, pp. 176–186, 1988. 𝑒 𝑄 the end zone ,usingthequickestpath in [4] H. Spiess and M. Florian, “Optimal strategies: a new assignment the 𝑛th departure, unit: mins T model for transit networks,” Transportation Research Part B: 𝑇𝑘𝑖: The actual clock time when train 𝑘 departs at Methodological,vol.23,no.2,pp.83–102,1989. node 𝑖,unit:mins [5] E. W. Dijkstra, “A note on two problems in connexion with EA 𝑇𝑖 : The earliest arrival time at node 𝑖 if departing graphs,” Numerische Mathematik,vol.1,pp.269–271,1959. DE from the origin 𝑜 at 𝑇𝑜 ,unit:mins [6] C. O. Tong and S. C. Wong, “Minimum path algorithms for EAR a schedule-based transit network with a general fare struc- 𝑇𝑖 : Theearliestarrivaltimeatnode𝑖 from the destination 𝑑 inthereversednetwork,unit: ture,” in Schedule-Based Dynamic Transit Modeling: Theory and mins Applications, N. H. M. Wilson and A. Nuzzolo, Eds., vol. 28 of Operations Research/Computer Science Interfaces Series,pp.241– 𝑇ED ℎ ℎ : The earliest departure time at home zone , 261, Springer, New York, NY, USA, 2004. unit: mins ED [7] A. Khani, M. Hickman, and H. Noh, “Trip-based path algo- 𝑇𝑜 :Theactualclocktimefortheearliest rithms using the transit network hierarchy,” Networks and departure time at the origin 𝑜,unit:mins Spatial Economics,vol.15,no.3,pp.635–653,2015. DE 𝑇ℎ : The actual clock time for the departure time [8] W. Xu, S. He, R. Song, and S. S. Chaudhry, “Finding the K at home zone ℎ,unit:mins shortest paths in a schedule-based transit network,” Computers DE and Operations Research,vol.39,no.8,pp.1812–1826,2012. 𝑇𝑜 : The actual clock time for the departure time at the origin 𝑜,unit:mins [9] M. Friedrich, I. Hofsaß,¨ and S. Wekeck, “Timetable-based transit assignment using branch and bound techniques,” 𝑇D−𝑗 𝑖 𝑗 𝑖 : The departure time at node via path ,unit: Transportation Research Record: Journal of the Transportation mins Research Board, no. 1752, pp. 100–107, 2001. LA 𝑇𝑑 : The latest arrival time at the destination 𝑑, [10] R. Huang and Z.-R. Peng, “Schedule-based path-finding unit: mins algorithms for transit trip-planning systems,” Transportation LA 𝑇𝑒 : The latest arrival time at the end zone 𝑒,unit: Research Record, no. 1783, pp. 142–148, 2002. mins [11] M. Friedrich and S. Wekech, “A schedule-based transit assign- LD 𝑇 : The latest departure time to the destination 𝑑 ment model addressing the passengers’ choice among compet- 𝑖 ing connections,” Computer Science Interfaces Series,vol.28,pp. at node 𝑖,unit:mins J 159–173, 2004. 𝑇𝑧𝑠𝑙: The journey time of zone link 𝑙 between a 𝑧 𝑠 [12] R. Huang, “A schedule-based pathfinding algorithm for transit zone and a station ,unit:mins networks using pattern first search,” GeoInformatica, vol. 11, no. 𝑉: The value of time, unit: min/yuan 2,pp.269–285,2007. 𝑊𝑗 𝑗 𝑖 𝑖𝑞:Theweightedcostforpathfrom node to [13]S.Y.Zhu,Y.F.Yan,H.Wang,andS.B.Li,“Anoptimaltransit 𝑞,usedinTongandRichardson’salgorithm, path algorithm based on the terminal walking time judgment unit: mins and multi-mode transit schedules,” in Proceedings of the Inter- 𝑧: The identification for zones. national Conference on Intelligent Computation Technology and Automation (ICICTA ’10), pp. 623–627, Changsha, China, May Competing Interests 2010. [14] D. Canca, A. Zarzo, P.L. Gonzalez-R,´ E. Barrena, and E. Algaba, The authors declare that they have no competing interests. “A methodology for schedule-based paths recommendation 16 Journal of Advanced Transportation

in multimodal public transportation networks,” Journal of Advanced Transportation,vol.47,no.3,pp.319–335,2013. [15] M. Florian, “Finding shortest time-dependent paths in schedule-based transit networks: a label setting algorithm,” in Schedule-Based Dynamic Transit Modeling: Theory and Applications,N.H.M.WilsonandA.Nuzzolo,Eds.,vol.28 of Operations Research/Computer Science Interfaces Series,pp. 43–52,Springer,NewYork,NY,USA,2004. [16] O. A. Nielsen and R. D. Frederiksen, “Large-scale schedule- based transit assignment-further optimization of the solution algorithms,” in Schedule-Based Modeling of Transportation Net- works, pp. 1–26, Springer, Berlin, Germany, 2009. [17] O. A. Nielsen, O. Landex, and R. D. Frederiksen, “Passenger delay models for rail networks,” in Schedule-Based Modeling of Transportation Networks, pp. 1–23, Springer, Berlin, Germany, 2009. [18] Y.-L. Chen and H.-H. Yang, “Finding the first K shortest paths in a time-window network,” Computers and Operations Research, vol.31,no.4,pp.499–513,2004. [19] C.-W. Yang and C.-C. Chang, “Applying price and time dif- ferentiation to modeling cabin choice in high-speed rail,” Transportation Research Part E: Logistics and Transportation Review,vol.47,no.1,pp.73–84,2011. [20]L.Deng,Z.Zhang,K.Liu,W.Zhou,andJ.Ma,“Fareoptimality analysis of urban rail transit under various objective functions,” Discrete Dynamics in Nature and Society,vol.2014,ArticleID 910736, 8 pages, 2014. International Journal of

Rotating Machinery

International Journal of Journal of The Scientific Journal of Distributed Engineering World Journal Sensors Sensor Networks Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

Journal of Control Science and Engineering

Advances in Civil Engineering Hindawi Publishing Corporation Hindawi Publishing Corporation http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

Submit your manuscripts at https://www.hindawi.com

Journal of Journal of Electrical and Computer Robotics Engineering Hindawi Publishing Corporation Hindawi Publishing Corporation http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

VLSI Design Advances in OptoElectronics International Journal of Modelling & International Journal of Simulation Aerospace Navigation and in Engineering Observation Engineering

Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Hindawi Publishing Corporation http://www.hindawi.com Volume 2014

International Journal of International Journal of Antennas and Active and Passive Advances in Chemical Engineering Propagation Electronic Components Shock and Vibration Acoustics and Vibration

Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014