Route Recommendation Algorithm for Railway Transit Travelers 
based on Classification of Personal Characteristics 
Yan Hong and Du Xiaoping 
Software College of Beihang University, Beijing 100191, China 
Keywords:  Urban Railway Traffic, Route Selection, Traveler Classification. 
Abstract:  With the rapid development of urban rail transit network, traveler’s route decision become more difficult to 
make  and  travelers’  route  preferences  vary with  their  characteristics.  This  study proposed  a  route  recom-
mendation algorithm with the least generalized travel cost based on the classification of traveler’s personal 
characteristic. The generalized travel cost  model  was established  with the  consideration  of LOS variables 
(e.g. in-vehicle time, transfer time, number of transfers, in-vehicle traveler density, etc) and then a traveler 
classifier was constructed based on the K- nearest neighbor algorithm by machine learning how travelers’ 
characteristics affect their route choice intentions, thus the optimal route with the least generalized cost for 
each type of travelers being generated. Finally, the model and algorithm were verified to be valid with the 
data from Beijing subway network. 
1  INTRODUCTION 
As  the  rail  transit  network  has  formed  in  more  and 
more cities and the seamless transfer operation mode 
is adopted, travelers will have multiple route choices 
between  a  pair  of  OD  (origin  to  destination).  The 
traditional  route  selection  algorithm  couldn’t  meet 
different route preferences of different travelers with 
different characteristics. In recent years many schol-
ars  have  studied  on  the  problem  of  traveler’s  route 
selection problem in urban rail transit network, such 
as  Zhang  designed  the  route  planning  algorithm 
based  on  the  MNL  (Multinomial  Logit)  model 
(Zhang  Y  S,  Yao  Y,  2013),  Zhao  Nan
 
studied  the 
multi route selection problem of Shenzhen rail transit 
based on the normal distribution model (ZHAO Nan, 
LI  Chao,  2012)  and  Liu
 
constructed  a  personalized 
route  planning  algorithm  for  rail  transit  travelers 
combined  with  travelers’  attributes  based  on  the 
MNL  model  (Liu  Sha-sha,  Yao  En-jian,  Zhang 
Yong-sheng,  2014).  However  none  of  these  studies 
focused on how travelers’ attributes affect their route 
choice intention. So this paper extended  the  method 
of  existing  route  planning  algorithm  by  combining 
with the construction of a traveler classifier based on 
the K nearest neighbor algorithm, which at the same 
time reconstructed the generalized travel cost model 
taking  into  consideration  the  factors  of  pass-ups, 
transfer time and in-vehicle traveler density. 
2  GENERALIZED TRAVEL COST 
MODEL FOR SUBWAY TRAV-
ELERS 
Under  the  condition  of  seamless  transfer,  the  route 
selection  problem  in  urban  rail  transit  network  is  a 
decision making problem from behavioral science. In 
order  to  simulate  the  traveler’s  selection  behavior, 
we can define a generalized travel cost for each route 
(Si  Bing-feng,  Mao  Bao-hua,  Liu  Zhi-li,  2007), 
which  take  into  consideration  all  the  factors 
concluded  when  a  traveler  select  a  route.  The 
Modeling process of the generalized travel cost is as 
follows. 
Suppose that Fare is the generalized travel cost of 
a route between the OD pair, n stands for the transfer 
station,  N  represents  the  transfer  times  and  i 
represents the section between two sites on the route. 
Fare can be made up of two parts,  the basic time T 
and the extra cost E. 
Fare = T + E             
       
(1) 
The  basic  time  T  includes  the  in-vehicle  time