Upcoming SlideShare
×

# Itzhak Benenson - OGiC - Shortest path and service area algorithms and their use in estimating transport accessibility

696 views

Published on

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
696
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
16
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Itzhak Benenson - OGiC - Shortest path and service area algorithms and their use in estimating transport accessibility

1. 1. Networks 1
2. 2. • What is a network? • Examples of networks and networks’ properties • Elements of the network theory • Networks and GIS • Geometric and logical networks • Network algorithms • Dijkstra shortest path algorithm • Applications of the network theory • Accessibility with the public transport and private car 2
3. 3. What is a network? Road network Computer network Drainage network Water supply network Power supply network Social network Economic network … From visualthesaurus.com 3
4. 4. Network is based on connectivity…. Suggest intuitive examples of the networks Suggest other than connectivity properties that seem important for the network 4
5. 5. Transportation networks Physically, we usually start with the example of the road network Conceptually, we think about flows of goods, people, information Cartography City Hall Central Park East Ave. West Ave. Campus Oakway Land Use 74 Maple Blvd. Highway One-way Main Street Traffic light Street Road segments can be one-way and two ways, can have several lanes, turn restrictions… Flows Transportation Network Layers 5
6. 6. Hydrological network Global properties: Preservation of water volume Change of the network: flooding… 6
7. 7. Elements of the network theory 7
8. 8. Networks were studied long ago GIS era… In mathematical terms, networks are “graphs” Graph is a collection of nodes and edges connecting some of them. The nodes of a graph may also be called “junctions” or “vertices". The edges of a graph may also be called “links” or "arcs.“ GRAPH  ORIENTED GRAPH  DIRECTED GRAPH  NETWORK Network is directed graph, in which every edge has an impedance ( ). In the network theory this definition is extended. It is supposed that every graph elements (notes, turns, etc) can have several impedances 8
9. 9. A road network – what can be considered as an impedance? 2 4 km 3 2 km 2 km 6 km 1 3 km 5 km 6 2 km 4 7 km 5 9
10. 10. Networks in GIS 10
11. 11. The (GIS-based) geometric network - the set of linear features. The logical network is a graph consisting of edges and junction. Geometric network includes features from different layers In a logical network the attributes of features become the source of impedance The GIS network algorithms deal with the logical network that is automatically constructed on the base of geometric network. 11
12. 12. GIS Representation of a Road Network Real Geometric Network Logical Network 12
13. 13. Geometric network Logical network GIS aims at managing geometric and logical networks simultaneously 13
14. 14. Usually, the IMPEDANCE is stored as additional fields of the standard table of links of the Georelational Model (GRM) Link Impedance ( ) (also Resistance, Friction) IMPEDANCE Node impedance 14
15. 15. Network algorithms 15
16. 16. Typical problems of the network analysis 16
17. 17. The Traveling Salesperson Problem Given a number of cities and the costs of traveling from any city to any other city, what is the least-cost round-trip route that visits each city exactly once and then returns to the starting city? 62 km > 48 km! 1 1 10 km 2 5 km 2 5 km 15 km 3 15 km 10 km 4 9 km 8 km 8 km 5 3 15 km Total = 62 km 8 km 10 km 4 9 km 8 km 6 10 km 8 km 6 8 km 5 15 km Total = 48 km 17
18. 18. Traveling salesman constructs efficient tours that visits any number of points on a network Sir William Rowan Hamilton, 1805 - 1865 18
19. 19. Network-based buffers 19
20. 20. Dispatching 20
21. 21. Dijkstra's Algorithm Solves the shortest path problem in graphs. Edge is characterized by the impedance. Dijkstra's algorithm starts from a source node, and in each iteration adds another vertex to the shortestpath spanning tree. This vertex is one of the closest to the tree root but still outside the tree. 21
22. 22. Dijkstra's Algorithm – minimal cost spanning tree Suppose that we already know the part of the spanning tree that begins at v, and ends at x1, x2, x3, …, xd We expand the tree by testing each node z among directly connected to x1, x2, ..., xd, and choosing the link to a node z that provides Mini {d(v, xi) + w(xi, z) | 1 <= i <= d} where d(v, xi) is the length of the path from v to xi and w(xi, z) is impedance of the link between xi and z. Such a node z is added to the spanning tree z 11? 10! X1(6) 4 2 3 X2(9) v 6 3 22
23. 23. Let us build the spanning tree starting from the vertex A 23
24. 24. We begin by recording A's distance from itself as 0 and recording the distances to each of A's neighbors. At this point, the tree consists of just A. 24
25. 25. Of all the vertices not in the tree, C is the closest to A so we (1) add it and (2) update accumulated distances between the spanning tree vertices and their neighbors. Note that the distance to B is adjusted because w(A,C) + w(C,B) < w(A,B). 25
26. 26. B is now the closest to the tree, so we add it. We connect B to C because the shortest path from A to B is through C. D, F, E and H are connected now to a tree. We should update accumulated distances to D, F, E and H, but for our values of impedance they did not change: 26
27. 27. D is now the closest to the tree so we add it. We connect D through C and should update distances to E, F, H and the new neighbor - I 27
28. 28. Next step: F is added to the tree (it can be reached through either of B and C and we arbitrarily chosen C) and distances to E, H, I and G are updated. Note, that the accumulated distance to I decreased from 22 to 20 28
29. 29. Next step: E is added to the tree and J is added to the set of the spanning tree neighbors, the latter consisting now of H, I, G and J 29
30. 30. Next step: H is added to the tree and K to the set of neighbors Note the change of accumulated distance to J 30
31. 31. Next step: J is added to the tree 31
32. 32. Next step: I is added to the tree 32
33. 33. Next step: K is added to the tree 33
34. 34. Last step: G is added to the tree (we have chosen to add it via F, while it could be done via J too) 34
35. 35. Finished! Now the tree includes all the vertices of a graph. While constructing the spanning tree, Dijkstra algorithm records the sequence of adding links. To find a shortest path from any vertex to A, we go back according to the spanning tree branches. Good sites with the Java applets illustrating Dijkstra algorithm http://www.unf.edu/~wkloster/foundations/DijkstraApplet/DijkstraApplet.htm http://students.ceid.upatras.gr/~papagel/english/java_docs/minDijk.htm 35
36. 36. Just to see that the code of the Dijkstra algorithm is very short (From Wikipedia) http://en.wikipedia.org/wiki/Dijkstra's_algorithm#Pseudocode Spanning tree Optimal path 36
37. 37. Application of the network theory: Accessibility with the public transport and private car 37
38. 38. What is accessibility? The extent to which land-use transport system enables individuals to reach destinations by means of transport modes1 • Given a destination: The number of origins from which a destination can be reached, given the amount of effort • Given an origin: The number of destinations that can be reached from the origin, given the amount of effort 1K.T. Geurs, J.T. Ritsema van Eck, 2001, “Accessibility measures: review and applications”, RIVM report 408505 006, Urban Research Center, Utrecht University
39. 39. Typically, accessibility is calculated based on the trips with the private car and in an aggregate fashion How many activities can be reached with the car from the given origin during the given time? Accessibility changes abruptly at the boundary of an area
40. 40. Accessibility components Transportation: Components of transportation system performance (modes, travel time, cost, effort to travel between origin and destination) Land-use: Distribution of needs/activities (jobs, schools, shops) and population (workers, pupils, customers) in space and time Individual utility: The demand for trips between certain origins and destination, benefits people derive from the access to facilities
41. 41. The goal: To estimate accessibility from the user’s viewpoint The idea: To compare accessibility with the private car and with the public transport (and, probably, other modes, as bike)
42. 42. Accessibility depends on a transportation mode Public Transport Travel Time (PTT): PTT = Walk time from origin to a stop 1 of the PT + Waiting time of PT at stop 1 + Travel time of PT1 + [Transfer walk time to stop 2 of PT + Waiting time of PT 2 + Travel time of PT 2] + … + Walk time from the final stop to destination Private Car Travel Time (CTT): CTT = Walk time from origin to the parking place + Car trip time + Parking search time + Walk time from the final parking place to destination. Service area: Given origin O, transportation mode M and travel time t define Mode Service Area - MSAO(t) - as maximal area containing all destinations D that can be reached from O with M during MTT ≤ t. Access area: Given destination D, transportation mode M and travel time t define Mode Access Area – MSAD(t) - as maximal area containing all origins O from which given destination D can be reached during MTT ≤ t. We distinguish between Public Transport Service Area PSAO(t), Public Transport Access Area PAAO(t), Private Car Service Area CSAO(t), Private Car Access Area CAAO(t)
43. 43. We focus on measuring relative accessibility Service areas ratio: SAO(t) = PSAO(t)/CSAO(t) Access area ratio: AAD(t) = PAAD(t)/CAAD(t)
44. 44. IN A NEW ERA OF BIG DATA WE ARE ABLE TO ESTIMATE ACCESSIBILITY EXPLICITLY! Tel Aviv Metro 600 km2 2.5*106 pop 300 bus lines Utrecht Metro 500 km2 0.6*106 pop 150 bus lines
45. 45. BIG URBAN TRANSPORTATION DATA
46. 46. Street network 104 105 links Attributes: traffic directions, speed Necessary for measuring accessibility by car
47. 47. Bus lines – 102 103 Bus stops 102 103 Relation between bus lines and stops. Necessary for measuring bus accessibility
48. 48. Bus time-table 105 106 Necessary for measuring bus accessibility
49. 49. Buildings and jobs, 105 - 106 Necessary for measuring activity component of accessibility
50. 50. Socio-economic level by traffic zones Land-uses, 105 Car ownership Necessary for measuring activity component of bus accessibility Socio-economic level 106
51. 51. Urban.Access
53. 53. What is a travel with the public transport? Destination Transfer Stop 1 Transfer Stop 2 Final Stop Initial Stop Origin
54. 54. Public Transport network  Graph, the idea Route 1 6:57 1 Bus starts every 10 minutes 7:01 2 7:03 3 4 5 6 6:56 12 7:02 13 [1, 6:57, 1, 6:57] 7:06 14 [1, 6:57, 2, 7:01] 0:04 2 0:02 7:10 15 [1, 6:57, 3, 7:03] 3 7:18 17 16 [2, 6:50, 15, 7:10] 0:04 16 0:04 [1, 6:50, 16, 7:14] 17 [1, 6:50, 17, 7:18] 18 Travel Destination Node: (Bus route = 1, Start Time = 6:57, Stop = 4, Arrival time = 7:05) [1, 6:57, 4, 7:05] 0:02 4 0:05 15 7:15 8 Bus starts every 30 minutes Route 2 1 7:12 7 Start 0:03 18 Two nodes are connected by link when the travel can drive from one node to the other. Link impedance = bus driving time between stops [1, 6:50, 18, 7:21] Why nodes are so complicated, why not just stops?
55. 55. Public Transport  Graph, possible nodes and links Nodes (a) Building (b) Quadruple: (Bus_Line, Bus_StartTime, Stop, Bus_ArrivalTime) Two nodes are connected by link if a traveler (a) Can get to a PT stop of the quadruple from the building; (b) Can get to building from a PT stop of the quadruple; (c) Can drive in a bus between two quadruples; (d) Can make a transfer between two stops of different PT lines Link impedance: (a) – (b) Walk time between a stop and a building (c) Bus riding time (d) Walk time between two stops + waiting time (Transfer time)
56. 56. Public Transport  Graph, the outcome 56
57. 57. Urban.Access parameters Day of the week Max time of waiting at initial stop Max travel time Calculate service area Trip start/finish time Walk speed when changing lines Max number of line changes Calculate access area
58. 58. URBAN.ACCESS works with any partition of the urban space: Cells
59. 59. URBAN.ACCESS works with any partition of the urban space: buildings
60. 60. URBAN.ACCESS is built on the neo4j graph database http://www.neo4j.org/
61. 61. Service and access area in URBAN.ACCESS are currently implemented as a part of the Dijkstra shortest path algorithm We calculate service area with the Dijkstra algorithm, based on the representation of a PT network as a graph, starting from every building
62. 62. URBAN.ACCESS is a scalable application CALCULATION FOR ALL BUILDINGS CAN BE DONE IN PARALLEL Processor Processor Two-level parallelization Threads
63. 63. Car service areas versus bus service area Entire metropolitan area Urban Land-uses Car service area is essentially larger than bus service areas
64. 64. The center of Tel-Aviv metropolitan: Accessibility maps between 07:00 – 07:30 Job Accessibility 07:30 07:25 07:20 07:15 07:10 07:05 07:00
65. 65. TAZ-resolution calculations High-resolution calculations We must work at high-resolution! Average accessibility: 0.336 Relatively higher in the center Average accessibility: 0.356 Relatively higher at the periphery
66. 66. Passengers waste more time with the short trips! Trip start: 7:00, No of transfers: 1 60 minutes trip High-resolution: 0.336 50 minutes trip High-resolution: 0.257 40 minutes trip High-resolution: 0.179 30 minutes trip High-resolution: 0.157 Low-resolution: 0.356 Low-resolution: 0.308 Low-resolution: 0.266 Low-resolution: 0.263 We could not see that at the low resolution
67. 67. Light rail, if combined with the existing bus network does not improve much… Trip start: 7:00, No of transfers: 1 60 minutes trip Av improvement: 1.5% 50 minutes trip Av improvement: 2.5% 40 minutes trip Av improvement: 3.3% 30 minutes trip Av improvement: 4.6%
68. 68. Applications of the tool in transportation planning • Assessment of public transport service improvements, e.g. impacts of increase in frequencies for different population groups, areas, land uses • Identification of ‘pockets of inaccessibility’ in metropolitan area • Accessibility planning for services • Assessment of (public) transport investments, e.g., light rail
69. 69. Major points of the lecture • Geometric and logical networks • Formal representation of the network is a graphs • Graph: nodes, links, impedance • Dijkstra shortest path algorithm on graphs • Translation of public transport network into graph • Accessibility – definition and approach to estimation • The use of Dijkstra algorithm for calculation accessibility in the city with the public transport and private car 69
70. 70. No exercises and reading today! 70