Top Banner
Networks תתתתת1
70

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

Nov 14, 2014

Download

Technology

swenney

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Itzhak Benenson - OGiC - Shortest path and service area algorithms and their use in estimating transport accessibility

Networks

רשתות

1

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

• 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

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

From visualthesaurus.com

What is a network?

Road networkComputer networkDrainage networkWater supply networkPower supply networkSocial networkEconomic network…

3

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

Network is based on connectivity….

Suggest intuitive examples of the networksSuggest other than connectivity properties that seem important for the network

4

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

Transportation networks

Transportation Network

Flows

Land Use

Layers

Cartography

74

Maple Blvd.

East Ave.

OakwayWest Ave.

HighwayMain StreetStreet

Central Park

City Hall

Campus

One-wayTraffic light

Road segments can be one-way and two ways, can have several lanes, turn restrictions…

Physically, we usually start with the example of the road network

Conceptually, we think about flows of goods, people, information

5

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

Hydrological network

Global properties: Preservation of water volume

Change of the network: flooding…6

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

Elements of the network theory

תורת הרשתות

7

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

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

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

A road network – what can be considered as an impedance?

1

2 3

4 5

6

2 km

5 km

6 km

7 km

4 km

2 km

2 km

3 km

9

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

Networks in GIS

10

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

The (GIS-based) geometric network - the set of linear features.

The logical network is a graph consisting of edges and junction.

The GIS network algorithms deal with the logical network that is automatically constructed on the base of geometric network.

Geometric network includes features from different layers

In a logical network the attributes of features become the source of impedance

11

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

Real Geometric Network Logical Network

GIS Representation of a Road Network

12

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

Geometric network

Logical network

GIS aims at managing geometric and logical networks simultaneously

13

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

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 impedance14

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

Network algorithms

15

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

Typical problems of the network analysis

16

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

The Traveling Salesperson ProblemGiven 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?

12

3

4 5

6

12

3

4 5

6

15 km

10 km8 km

15 km

9 km

5 km

Total = 62 km

8 km

9 km

5 km

10 km

8 km8 km

Total = 48 km

62 km > 48 km!

15 km

10 km

15 km

10 km

8 km

8 km

17

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

Traveling salesman constructs efficient tours

that visits any number of points on a network

Sir William Rowan Hamilton, 1805 - 1865

18

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

Network-based buffers

19

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

Dispatching

חלוקת נקודות ביקור בין רכבים

20

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

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 shortest-path spanning tree.

This vertex is one of the closest to the tree root but still outside the tree.

21

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

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

6

3

42

z

X2(9)

X1(6)10!

v

11?

3

22

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

Let us build the spanning tree

starting from the vertex A

23

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

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

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

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

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

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

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

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

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

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

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

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

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

Next step: H is added to the tree and K to the set of neighbors

Note the change of accumulated distance to J

30

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

Next step: J is added to the tree

31

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

Next step: I is added to the tree

32

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

Next step: K is added to the tree

33

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

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

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

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

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

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

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

Application of the network theory:

Accessibility with the public transport and private car

37

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

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 effort1K.T. Geurs, J.T. Ritsema van Eck, 2001, “Accessibility measures: review and applications”, RIVM report 408505 006, Urban Research Center, Utrecht University

38

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

How many activities can be reached with the car from the given origin during the given time?

Typically, accessibility is calculated based on the trips with the private car and in an aggregate fashion

39

Accessibility changes abruptly at the boundary of an area

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

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

40

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

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)

41

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

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 betweenPublic Transport Service Area PSAO(t), Public Transport Access Area PAAO(t),

Private Car Service Area CSAO(t), Private Car Access Area CAAO(t)

42

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

Service areas ratio: SAO(t) = PSAO(t)/CSAO(t)

Access area ratio: AAD(t) = PAAD(t)/CAAD(t)

We focus on measuring relative accessibility

43

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

IN A NEW ERA OF BIG DATA WE ARE ABLE TO ESTIMATE ACCESSIBILITY EXPLICITLY!

44

Tel Aviv Metro 600 km2

2.5*106 pop 300 bus lines

Utrecht Metro500 km2

0.6*106 pop 150 bus lines

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

45

BIG URBAN TRANSPORTATION

DATA

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

Street network 104 ÷ 105 links

Attributes: traffic directions,speed

Necessary for measuring accessibility by car

46

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

Bus lines – 102 ÷ 103

Bus stops102 ÷ 103

Relation between bus lines and stops.

Necessary for measuring bus accessibility

47

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

Bus time-table 105 ÷ 106

Necessary for measuring bus accessibility

48

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

Buildings and jobs, 105 - 106

Necessary for measuring activity component of accessibility49

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

Socio-economic level

Car ownership

Necessary for measuring activity component of bus accessibility

Socio-economic level by traffic zones

50

Land-uses, 105 ÷ 106

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

Urban.Access

51

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

52

Typical metropolitan road network graph has 104 - 105 nodes and links

Node JunctionLink Road segmentImpedance Travel time

We have already translated Road network into Graph

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

What is a travel with the public transport?

Origin

Initial Stop

Transfer Stop 1

Final Stop

Transfer Stop 2

Destination

53

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

Public Transport network Graph, the idea

1 2 3 4 5 6 7 8

11 12 13 14 15 16 17 18

Route 1

Route 2

6:57 7:01 7:03 7:05 7:08 7:09 7:12 7:15

6:50 6:56 7:02 7:06 7:10 7:14 7:18 7:21

Start

Travel

Destination

54

1 2 3 4

Bus starts every 10 minutes

Bus starts every 30 minutes

[1, 6:57, 1, 6:57] [1, 6:57, 2, 7:01] [1, 6:57, 4, 7:05][1, 6:57, 3, 7:03]

15 16 17 18[2, 6:50, 15, 7:10] [1, 6:50, 16, 7:14] [1, 6:50, 17, 7:18] [1, 6:50, 18, 7:21]

Node: (Bus route = 1, Start Time = 6:57, Stop = 4, Arrival time = 7:05)

0:04 0:02 0:02

0:05

0:04 0:04 0:03

Two nodes are connected by link when the travel can drive from one node to the other.

Link impedance = bus driving time between stops

Why nodes are so complicated, why not just stops?

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

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)

55

Public Transport Graph, possible nodes and links

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

Public Transport Graph, the outcome

56

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

Urban.Access parameters

Day of the weekTrip start/finish time

Max time of waiting at initial stop Walk speed when

changing lines

Max travel time Max number of line changes

Calculate service areaCalculate access area

57

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

URBAN.ACCESS works with any partition of the urban space: Cells

58

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

59

URBAN.ACCESS works with any partition of the urban space: buildings

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

URBAN.ACCESS is built on the neo4j graph database http://www.neo4j.org/

60

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

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

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

62

URBAN.ACCESS is a scalable applicationCALCULATION FOR ALL BUILDINGS CAN BE DONE IN PARALLEL

Processor

Threads

Processor

Two-level parallelization

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

Car service area is essentially larger than bus service areas

Entire metropolitan area Urban Land-uses

Car service areas versus bus service area

63

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

07:0007:0507:1007:1507:2007:2507:30

The center of Tel-Aviv metropolitan: Accessibility maps between 07:00 – 07:30

Job Accessibility

64

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

Average accessibility: 0.336 Average accessibility: 0.356Relatively higher in the center Relatively higher at the periphery

We must work at high-resolution!

65

Hig

h-re

solu

tion

calc

ulati

ons

TAZ-

reso

lutio

n ca

lcul

ation

s

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

Passengers waste more time with the short trips!Trip start: 7:00, No of transfers: 1

50 minutes tripHigh-resolution: 0.257Low-resolution: 0.308

60 minutes tripHigh-resolution: 0.336Low-resolution: 0.356

40 minutes tripHigh-resolution: 0.179Low-resolution: 0.266

30 minutes tripHigh-resolution: 0.157Low-resolution: 0.263

66We could not see that at the low resolution

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

50 minutes tripAv improvement: 2.5%

Light rail, if combined with the existing bus network does not improve much…

Trip start: 7:00, No of transfers: 1

60 minutes tripAv improvement: 1.5%

40 minutes tripAv improvement: 3.3%

30 minutes tripAv improvement: 4.6%

67

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

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

68

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

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

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

70

No exercises and reading today!