Hierarchical Route Planning Based on Taxi
GPS-Trajectories
Qingquan Li
Zhe Zeng
Bisheng Yang
State Key Laboratory of
Information Engineering in Surveying,
Mapping, and Remote Sensing,
Wuhan University,
Wuhan, Hubei, China
State Key Laboratory of
Information Engineering in Surveying,
Mapping, and Remote Sensing,
Wuhan University,
Wuhan, Hubei, China
State Key Laboratory of
Information Engineering in Surveying,
Mapping, and Remote Sensing,
Wuhan University,
Wuhan, Hubei, China
qqli@[Link]
zz0459@[Link]
Tong Zhang
State Key Laboratory of
Information Engineering in Surveying,
Mapping, and Remote Sensing,
Wuhan University,
Wuhan, Hubei, China
AbstractThe popular methods of route planning, the planar
and hierarchical algorithms, are mainly based on the Dijkstras
algorithm. The shortest path in machine computation is always
different from the optimal one in a human cognition because
travel experience information of human is neglected. In this
paper,hierarchical travel experience information of road network
is given by statistical analysis on a large amount of taxi GPS
trajectories. According to taxi trajectories, the roads can be
divided into frequent roads, secondary frequent roads and seldom
roads. These trajectories can well reflect a hierarchical cognition
of road network because considering taxi drivers cognition of
the road network. With the hierarchical model of road network,
the corresponding hierarchical route planning can be performed
based on the experienced drivers cognition. The experiments
show that the route results according to the experiential information approach to optimal results more than that according to
static information of road network.
Index TermsRoute planning,hierarchy,road network
I. I NTRODUCTION
The popular methods of route planning, the planar and
hierarchical algorithms, are mainly based on the Dijkstras
algorithm. The Dijkstras algorithm principally calculates a
shortest path between source node and target node with the
weight of edges in road network. The length or travel time of
road is commonly used as weight of the edges. The shortest
path in geometrical measure is computed from regarding
length as weight of the edge while the fastest path in temporal
measure from regarding travel time as weight. However, the
shortest path does not mean it is optimal and the fastest path is
not dynamic optimal because it is based on static travel time.
The shortest path in machine computation is always different
from the optimal one in a human cognition because travel
experience information of human is neglected.
The extensively applied algorithms of planar route planning are mainly Dijkstras algorithm and A* algorithm. The
former is the fundamental solution for route planning in
vehicle navigation system. And to improve its performance,
the various priority queues(including binary heap, fibonacci
heap, bucket and etc) had been implemented into Dijkstras
algorithms. On the other hand, A* algorithm ,a heuristic
method, that incorporate information from the problem domain
into a formal mathematical theory of graph searching was
proposed by Hart [1]. However, the planar route algorithms
are not so effective when the scale of road network increases
to a certain extent. Therefore, the hierarchical strategies have
been proposed.
The conventional approaches of constructing the hierarchy
of road network are based on the following idea. The road
network is primarily considered as an original graph. The
graph is divided into several partitions. Then, the higher
level sub-graph is formed by all border nodes and shortest
paths between these partitions. The two steps are recursively
performed not until that the hierarchy of road network can be
completely formed. For example, this idea can be found in
[2], [3]. The HEPV model [3] was proposed by Ning Jing and
Yun-Wu Huang. To achieve an effective fragmentation, they
developed a partitioning algorithm called spatial partitioning
which clusters graph links into partitions based on spatial
proximity [4]. Spatial partitioning takes advantage of ITS
map characteristics such as the grid-like (near-planar) patterns,
and the relatively short distance for the majority of links.
In HiTi graph model [2], arbitrary shaped boundaries (e.g.,
political regional boundaries) partition a road map into a
set of Component Road Maps (CROM). The CROM can be
defined to contain a set of CROMs, thus creating a multilevel
hierarchy. The HiTi graph is a graph whose nodes are the
boundary nodes of the CROMs and edges are the path view
and cut connections of CROMs.
Based on the idea of tailoring the route searching space, the
latest hierarchical algorithms [5] separate large road network
to multi-level graph. Highway Hierarchy [6] method, recently
proposed by Sander and Schultes, classify nodes and edges
fully automatically in a preprocessing step in such a way that
all shortest paths are preserved. By this means, the algorithm
can be performed with exactness and high speed.
In this research, hierarchical travel experience information
of road network is given by statistical analysis on a large
amount of taxi GPS trajectories. According to taxi trajectories, the roads can be divided into frequent roads, secondary
frequent roads and seldom roads. These trajectories can well
reflect a hierarchical cognition of road network because considering taxi drivers cognition of the road network. With
the hierarchical model of road network, the corresponding
hierarchical route planning can be performed based on the
experienced drivers cognition. Consequently, the route results
according to the experiential information should approach to
optimal results more than that according to static information
of road network.
(a) The red points present original trajectory
II. E XPERIENTIAL H IERARCHY OF ROAD NETWORK
A taxi driver is a person acquainted with road network
of a city. An optimal route can be obtained by statistical
analysis with taxi GPS trajectories because these trajectories
can reveal the taxi routes chosen by drivers experience. The
experiential hierarchical network can be constructed by these
taxi GPS trajectories. These points were firstly matched into
road network and then the frequency of road travelled by
taxi can be counted so that a hierarchy of road network was
constructed by classification of the frequency.
(b) The blue are matched points and the brown are interpolated
points between 7:00 AM and 9:00 AM
A. Taxi GPS Trajectories
Given a directed graph G = {V, E}, V is a set of
intersections of roads and E is a set of road between two
neighboring junctions. Let T =< p1 , p2 , ..., pk > be a GPS
trajectory. A trajectory point pi is matched into edge ej of
road [Link] whole points of a trajectory are matched into
M T =< e1 , ..., ej , ...el > (ej E, 0 l k). Let = {T }
be a set of the whole trajectories of one day and = {M T }
be a set of the results that all trajectories of are matched
into edges set E of road network G. The map-matched edge
ej and ej+1 isnt always neighbor in road network while the
interval between the corresponding trajectory point pi and pi+1
is regular. In this case, it is necessary to interpolate trajectory
points between pi and pi+1 in order that the corresponding
matched edges can recover a route without losing any road
travelled by the taxi. Therefore, the map matching process of
taxi trajectories mainly consists of three steps.
1) GPS trajectory points of taxi are matched into road.
2) Some points should be interpolated when two sequential roads into which trajectory points are matched are
disconnected.
3) Then we recover a route which consists of a sequence
of roads into which trajectory points are matched.
(c) recovery route
Fig. 1.
A taxi trajectory of Wuhan city in one day
In figure 1(a), the red points present a taxi GPS trajectory of
Wuhan city in one day. These trajectory points are matched
into road and some points are interpolated into them according
to connectivity between two sequential trajectory points. The
blue points are matched points and the brow ones are interpolated points in figure 1(b). In figure 1(c), the blue route is a
recovery one from roads into which the trajectory points are
matched.
B. The road frequencies travelled by taxi
Let the function g(ei ) be the travelled frequency of the edge
ei in by all trajectories in . Let F n(g(ei )) be cumulative
distribution function of g(ei ). Let 0 < q2 < q1 < 1, F n(g1 ) =
q1 , F n(g2 ) = q2 . According to the value of g(ei ) all roads
are classified into three levels. The edge set in which their
g(ei ) values are above g1 of all values is considered as the
frequent roads, that between g1 and g2 is considered as the
0.6
0.4
ecdf(count)
0.8
1.0
secondary frequent roads, and that below g2 is considered as
the seldom roads. The figure 2 is a cumulative distribution of
road frequency by trajectories of 1400 taxis of Wuhan city in
one day.
0.2
normal time
hash hour
all time
0
100
200
300
400
count
Fig. 2.
trajectory frequency of road
i
= {v | v V i V i+1 , Di (v) Di+1 (v)}.
Vupper
i
These nodes in Vupper
are called as exit or entry
nodes. They are not only connected to nodes in
current level but also higher adjacent level. We record
the node association with upper level i + 1 in H i .
The association between level i and level i + 1 is
established by the node association in order that
the hierarchical route planning can be done in the
hierarchical road network.
Step 2 Connectivity. Let C i be a maximal strongly connected subgraph of level H i constructed by step
1. The vertexes and edges that dont belong to C i
in level H i should be deleted. The C 2 is maximal
SCC of top level H 2 . The deletion of E 2 /EC 2 and
V 2 /VC 2 from H 2 is firstly executed. The C 2 is
a new H 2 . Then the same operation is done on
H 1 . After deletion of these vertexes and edges that
dont belong to C i , the node association between
neighboring levels should be upgraded because the
change of edge set and vertex set had happened.
From the two steps, a hierarchical graph of road network is
constructed, which is based on the experience of taxis. And
a hierarchical route planning can be done on the hierarchical
road network.
C. Experiential Hierarchy of road network
All roads are divided into three classes: frequent
road,secondary frequent road and seldom road, according
to statistical character with the frequencies of the routes
recovered by taxis GPS trajectories. An experiential hierarchy
of road network is constructed in terms of classification
by frequency with which taxi routes travelled, as well as
connectivity of every level is kept. The two steps that construct
experiential hierarchical graph of road network is described in
the following.
Step 1 Hierarchy. For each edge e E, we compare g(e)
with g1 and g2 . The edge set E of road network
is grouped into three subset, Ef = {e|g(e) g1 },
Es = {e|g1 > g(e) g2 } and En = {e|g2 > g(e)
0}, where E = Ef Es En . The three subset of
E construct a hierarchy of road network. The hierarchical graph H = {G, H 0 , H 1 , H 2 } is a partition
of graph G = {V, E} according to frequency g(e)
of road. The bottom road network is H 0 = G. The
level H 1 is constructed according to the edge set
Ef Es , where H 1 = {V 1 , E 1 }, E 1 = Ef Es ,
N 1 = {v|(u1 , v) E 1 (v, u2 ) E 1 }. So it is
ensured that edge e1 E 1 and two vertexes of it
are also in H 1 . In the same way, the level H 2 is
constructed by Ef , where H 2 = {V 2 , E 2 },E 2 =
Ef ,N 2 = {v|(v, u1 ) E 2 (u2 , v) E 2 }. The
sub-graph H i = {V i , E i } is the level i of graph G
and it satisfies G = H 0 ... H i ... H r for
0 i r(in this case, r = 3). Let v V i . And
let Di (v) is defined as the degree of v in H i .Then
(a) 7:00 AM - 9:00 AM(two rush hours)
(b) 10:00 AM - 12:00 AM (two normal hours)
Fig. 3.
Expierential hierarchy of WUHAN road network
Figure 3 shows hierarchical road network derived from
GPS trajectories of 1400 taxis of Wuhan city. Figure 3(a)
is hierarchy according to trajectories of 7:00 AM to 9:00
AM while figure 3(b) is one of 10:00 AM to 12:AM. In the
two figures, the blue road present frequent roads, the yellow
secondary frequent roads and the black seldom roads.
III. H IERARCHICAL ROUTE PLANNING WITH TAXI
END
FREQUENCY
According to above mentioned method, the experiential
hierarchical road network can be consequently constructed
by the taxi GPS trajectories. The connectivity of network is
ensured so that the route planning can be performed by the
following steps based on the hierarchy.
Let s be source point and t target point,
1) The forward search starts from s and the backward
search from t in level H i till they find nearest entry node
vs to upper level H i+1 and exit node vt from H i+1 .
2) The bidirectional search subsequently continue from vs
and vt , which are the corresponding nodes of vs and
vt , regarded as a new pair of source and target nodes in
upper level H i+1 .
3) If the forward search meets the backward at a node
vmeet , the process of searching will be terminated.
4) If the search find entry or exit node of upper level
of H i+1 , step 1 and step 2 will be recurred not until
reaching the highest level.
The planned route HP is a sequence of paths
k
Ps0 , ..., Psi , ..., Ps,t
, ..., Ptj , ..., Pt0 where
0
0
0
0
0
0
Ps = ss , ..., st , ss , ..., st V ,
i
i
i
i
i
i
Ps = ss , ..., st , ss , ..., st V ,
j
j
j
j
j
j
Pt = ts , ..., tt , ts , ..., tt V ,
k
k
k
k
k
Ps,t = ss , ..., st = ts , ..., tt ,
0
0
0
Pt = ts , ..., tt ,
0 i, j k.
The planned route HP should be connected path, so it must
be sit = si+1
and tj+1
= tjs for 0 i, j k. The nodes of
t
s
hierarchical path given from forward searching are denoted
by sis,t for 0 i r. The nodes of hierarchical path given
from backward searching are denoted by tjs,t for 0 j r.
The route is planned on the principle that the frequent roads
have a high priority of being chosen because it is based on the
experiential hierarchy of taxi drivers according to their GPS
trajectories.
START
(a) Dijkstra
END
START
(b) Hierarchy by road class
END
START
(c) Hierarchy by taxi experience
END
START
(d) all
Fig. 5.
Fig. 4.
hierarchy from road class
IV. E XPERIMENTAL RESULTS AND C ONCLUSION
The experiments are implemented on a 32-bit PC with 512
MB main memory, using mono Intel Pentium 4 processor
route planning by three methods(first pair of table I)
clocked at 2.4 GHz, running Windows XP (sp2). The programs
are compiled by Visual C++ 6.0. We implement the hierarchical route planning algorithm on the road network of Wuhan
which consists of 8446 nodes and 11148 edges. The GPS
trajectories of 1400 taxis of Wuhan city in one day are chosen
as an experiential data. From these trajectories, a hierarchical
TABLE I
E XPERIMENT RESULTS
NO
RP method
path length(m)
travelled time(s)
expanded node number
computing time(us)
flat(Dijkstra)
Hierachical
Exp Hierarchical
19096
20370
19127
2995
3140
2852
4347
757
1548
35582
5887
14900
flat(Dijkstra)
Hierachical
Exp Hierarchical
19096
20370
19127
2995
3140
2852
4347
757
1548
36016
5996
15200
flat(Dijkstra)
Hierachical
Exp Hierarchical
15187
15612
15372
1878
1958
1813
3801
488
1162
30572
3906
11202
flat(Dijkstra)
Hierachical
Exp Hierarchical
15254
16572
15512
1883
2210
1871
3820
536
1213
35252
3736
11880
flat(Dijkstra)
Hierachical
Exp Hierarchical
16585
18061
17979
2571
2789
2507
3715
620
1565
30320
4610
14236
road network based on taxi experience is constructed and time
interval of these trajectories is chosen between 7:00 AM and
9:00 AM (two rush hours in morning). We perform three
programs which respectively are Dijkstra algorithm based on
original graph, hierarchical route planning algorithm based
on hierarchical graph by road class and hierarchical route
planning based on hierarchical graph by taxi experience. The
weight of each edge is the length of corresponding road. Table
I shows the results given by the three algorithms mentioned
above, which are performed by random choice of five source
and target [Link] travelled time of route is estimated by
speed of road taxi travelled according to GPS trajectories.
The first source target pair of table I is illustrated in figure 5.
In figure 5(a), the red is a route planned by Dijkstra algorithm
running on flat graph of road network and the colored nodes
are expanded nodes in the process of route searching. In
figure 5(b), the yellow is a route planned by hierarchical route
planning algorithm based on hierarchical graph by road class
and the colored nodes are expanded nodes in the process of
route searching. In figure 5(c), the blue is a route planned
by hierarchical route planning algorithm based on hierarchical
graph by taxi experience and the colored nodes are expanded
nodes in the process of route searching. The routes planned
by the three methods are showed in figure 5(d).
The planning method by taxi experience give priority to
frequently travelled roads by taxi. Therefore, the planning
method by experience choose these frequent roads prior to
others. However, the method by road class firstly finds optimal
route in high class roads and the one by Dijkstra algorithm
finds optimal route in the whole road network. The results
from figure 5 and the first row of table I indicate the path
planned by taxi experience is an optimal one in the measure
of travelled time. From the table I, it shows that the method by
Dijkstras algorithm computes the shortest path in the length
of network distance but its travelled time isnt optimal and
that the method by taxi experience can give a route, which
is shorter in distance than the one according to road class as
well as in travelled time than Dijkstras algorithm.
Consequently, based on experiential hierarchical road network by taxi GPS trajectories, a hierarchical route planning
is proposed according to experience of the taxi driver. In
this paper, we give the detailed steps to construct experien-
tial hierarchical road network by trajectories and to perform
the corresponding route planning method. The experimental
results from three different methods are given, compared and
analyzed. An optimal route can obtained from the method we
proposed because it performed based on the principle that the
roads taxi frequently travelled have a priority to be chosen in
the process of finding path.
ACKNOWLEDGMENT
Work described in this paper was jointly supported by
the projects from NSFC (No. 4083050, No. 60872132,
No.40871185), 863 program (No. 2007AA12Z41), and project
from Ministry of Education of China (No. 108085).
R EFERENCES
[1] P.E. Hart, N.J. Nilsson, and B. Raphael. A formal basis for the heuristic
determination of minimum cost paths. Systems Science and Cybernetics,
IEEE Transactions on, 4(2):100107, July 1968.
[2] Sungwon Jung and Sakti Pramanik. An efficient path computation model
for hierarchically structured topographical road maps. IEEE Transactions
on Knowledge and Data Engineering, 14(5):10291046, 2002.
[3] Ning Jing, Yun-Wu Huang, and Elke A. Rundensteiner. Hierarchical
encoded path views for path query processing: An optimal model and its
performance evaluation. IEEE Trans. Knowledge and Data Engineering,
10(3), 1998.
[4] Yun-Wu Huang, Ning Jing, and Elke A. Rundensteiner. Effective graph
clustering for path queries in digital map databases. In CIKM, pages
215222, 1996.
[5] Martin Holzer, Frank Schulz, and Dorothea Wagner. Engineering multilevel overlay graphs for shortest-path queries. J. Exp. Algorithmics,
13:2.52.26, 2009.
[6] Peter Sanders and Dominik Schultes. Engineering highway hierarchies.
In ESA06: Proceedings of the 14th conference on Annual European
Symposium, pages 804816, London, UK, 2006. Springer-Verlag.