4_ Networks Model and Shortest Path

Embed Size (px)

Citation preview

  • 8/9/2019 4_ Networks Model and Shortest Path

    1/11

    Lecture 4Lecture 4

    Introduction to Network ModelsIntroduction to Network Models

    andand

    Shortest PathsShortest Paths

    Profs.Profs. Ismail ChabiniIsmail Chabini andand Amedeo OdoniAmedeo Odoni

    1.2251.225J (ESD 225) Transportation Flow SystemsJ (ESD 225) Transportation Flow Systems

    1.225, 11/07/02 Lecture 4, Page 2

    Lecture 4 OutlineLecture 4 Outline

    Conceptual Networks: DefinitionsRepresentation of an Urban Road Network (Supply)Shortest Paths (Reading: pp. 359-367, 6.2.3 and 6.2.4 of R6)

    Introduction

    Dijkstras algorithm: example

    Dijkstras algorithm: statement

    ObservationsExtensions to Classical Shortest Path ProblemsAll-or-nothing traffic assignmentZoning and Analysis Periods (Demand)Motivation for more advanced traffic assignment modelsSummary

  • 8/9/2019 4_ Networks Model and Shortest Path

    2/11

    1.225, 11/07/02 Lecture 4, Page 3

    Conceptual Networks: DefinitionsConceptual Networks: Definitions

    Anetwork is: a set ofnodesNand a set oflinksA

    nodes

    are also called vertices orpoints links are also calledarcs or edges

    Directed networks: all links are directedPath: a sequence of links from one node to another node(i.e., (5,4)-(4,3)-(3,2))A network isconnectedif there is at least one path from one node to

    another node (Net1 is connected whereas Net2 is not)

    Examples:2

    3

    4 5

    1

    Net 1

    21

    43

    Net 2

    1.225, 11/07/02 Lecture 4, Page 4

    Representation of an Urban Road NetworkRepresentation of an Urban Road Network

    Physical ConceptualIntersections Nodes

    Streets Links

    Zones Centroids

    Simple node representation

  • 8/9/2019 4_ Networks Model and Shortest Path

    3/11

    1.225, 11/07/02 Lecture 4, Page 5

    Intersection RepresentationsIntersection Representations

    Simple node representation: no direction differenciation

    no conflicting movement

    Subnetwork representation: explicit direction representation

    conflicting turns in an intersection

    are captured by internal links and

    their impedances

    Conceptual representation is not unique anddepends on:

    type of analysis

    data availability to build, validate, and apply model

    accuracy vs. computation time trade-off

    1.225, 11/07/02 Lecture 4, Page 6

    Shortest Path ProblemsShortest Path Problems

    Basic problem: find a shortest path and the shortest distance betweentwo nodes

    Basic problem is called the one-to-one shortest path problemTypes of shortest path problems:

    One-to-one

    One-to-all: find shortest paths from one node to all nodes

    All-to-one: find shortest paths from all nodes to one node

    Many-to-many: find shortest paths from many nodes to many

    other nodes

    All-to-all: find shortest paths from all node pairs

    Shortest also denotes minimum general costThere are hundreds of shortest path algorithms, but they are similarSome algorithms work for non-negative costs only

  • 8/9/2019 4_ Networks Model and Shortest Path

    4/11

    1.225, 11/07/02 Lecture 4, Page 7

    DijkstraDijkstras Shortest Paths Algorithm: Examples Shortest Paths Algorithm: Example

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    Mixed network

    4

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    5

    6

    6

    1

    4

    1 6

    2

    Directed network

    1.225, 11/07/02 Lecture 4, Page 8

    First Shortest Path Algorithm (First Shortest Path Algorithm (DijkstraDijkstras Algorithm)s Algorithm)

    Notation: s: source node

    d(j): length of shortest path from s toj discovered so far

    p(j): immediate predecessor to nodej on shortest path from s toj

    discovered so far

    k: last node selected by algorithm

    Step 1: Initialization d(s) = 0,p(s) = *

    d(j) = ,p(j) = -, for all other nodesj s

    k= s

  • 8/9/2019 4_ Networks Model and Shortest Path

    5/11

    1.225, 11/07/02 Lecture 4, Page 9

    DijkstraDijkstras Shortest Paths Algorithm: Examples Shortest Paths Algorithm: Example

    7 (,-)

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (5,-)

    (8,-)

    (,-)

    (,-)

    (,-)

    (,-)

    (,-)

    1st iteration(3,a)+

    (10,-)

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (3,a)+

    (8,-)

    (,-)

    (,-)

    (,-)

    (,-)

    (,-)

    2nd iteration

    (5,a)+

    1.225, 11/07/02 Lecture 4, Page 10

    First Shortest Path Algorithm (First Shortest Path Algorithm (DijkstraDijkstras Algorithm)s Algorithm)

    Step 2: Update labels of neighbors in open state For all (k,j), ifj is open do:

    Ifd(j) < d(k) + l(k,j) then

    d(j) = d(k) + l(k,j)

    p(j) = k

    Step 3 Find a open state node i such that d(i) = min{d(j),j is an open node)}

    Step 4 Find a closed state nodej* such that d(i) = d(j*) + l(j*,i)

    Step 5 Node i is closed. If no node in open state , STOP.

    Otherwise k= i, return to Step 2

  • 8/9/2019 4_ Networks Model and Shortest Path

    6/11

    1.225, 11/07/02 Lecture 4, Page 11

    Shortest Paths Algorithm: ExampleShortest Paths Algorithm: Example

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (3,a)+(10,-)

    (9,-)

    (,-)

    (,-)

    (,-)

    (,-)

    3rd iteration

    (5,a)+

    (7,d)+

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (5,a)+

    (3,a)+

    (7,d

    )

    +

    (10,-)

    (15,-)

    (,-)

    (,-)

    (,-)

    4th iteration

    (9,d)+

    1.225, 11/07/02 Lecture 4, Page 12

    Shortest Paths Algorithm: ExampleShortest Paths Algorithm: Example

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (3,a)+

    (9,d)+

    (15,-)

    (,-)

    (13,-)

    (,-)

    5th iteration

    (5,a)+

    (7,d)+

    (10,b)+

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (5,a)+

    (3,a)+

    (7,d)+

    (10,b)+

    (15,-)

    (16,-)

    (,-)

    6th iteration

    (9,d)+(13,g)+

  • 8/9/2019 4_ Networks Model and Shortest Path

    7/11

    1.225, 11/07/02 Lecture 4, Page 13

    Shortest Paths Algorithm: ExampleShortest Paths Algorithm: Example

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (3,a)+

    (9,d)+

    (16,-)

    (13,g)+

    (19,-)

    7th iteration

    (5,a)+

    (7,d)+

    (10,b)+

    (14,i)+

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (5,a)+

    (3,a)+

    (7,d

    )

    +

    (10,b)+

    (14,i)+

    (,-)

    8th iteration

    (9,d)+(13,g)+

    (15,e)+

    1.225, 11/07/02 Lecture 4, Page 14

    Shortest Paths Algorithm: ExampleShortest Paths Algorithm: Example

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    8

    5

    5

    2

    7

    5

    8

    4

    5

    6

    6

    1

    4

    16

    2

    (0,*)+

    (3,a)+

    (9,d)+

    (15,e)+

    (13,g)+

    9th iteration

    (17,h)+

    (5,a)+

    (7,d)+

    (10,b)+

    (14,i)+

    (10,b)+

    a

    b

    d

    c

    g

    f

    e

    h

    i

    j

    3

    5 2

    7

    4

    1

    4

    1

    2

    (0,*)+

    (5,a)+

    (3,a)+

    (7,d)+

    (9,d)+

    (14,i)+

    (15,e)+

    (13,g)+

    (17,h)+

    Shortest-path tree

  • 8/9/2019 4_ Networks Model and Shortest Path

    8/11

    1.225, 11/07/02 Lecture 4, Page 15

    Observations aboutObservations about DijkstraDijkstras Algorithms Algorithm

    Dijkstras algorithm is in general not valid if some l(i,j) < 0Shortest paths form a treeThe algorithm can also solve the all-to-one problemIf you solve for a one-to-many problem, stop the algorithm when all

    destination nodes are closed

    Shortest path problem is an LP problem, but it is more efficient andintuitive to look at it as a network problem as we did in class

    1.225, 11/07/02 Lecture 4, Page 16

    Extensions of Shortest Path ProblemExtensions of Shortest Path Problem

    There is a huge number of potential extensions of the classicalshortest path problem

    Problems on dynamic networks (link lengths change over time)Problems on probabilistic networks (link lengths are random

    variables assuming discrete values or a continuous range of values)

    Combinations thereof

    Solutions to these problems depend on the assumptions regarding thestate of knowledge and on the relative magnitude of the parameters

    involved

    The meaning of shortest path is also an issue in some cases

  • 8/9/2019 4_ Networks Model and Shortest Path

    9/11

    1.225, 11/07/02 Lecture 4, Page 17

    A Traffic Assignment ProblemA Traffic Assignment Problem

    51

    3

    2

    4

    4

    3

    8

    2

    11

    2

    4

    6

    -403530455

    40-3530254

    2035-40503

    101215-102

    15403530-1

    54321

    1.225, 11/07/02 Lecture 4, Page 18

    AllAll--oror--nothingnothing Traffic AssignmentTraffic Assignment

    1

    3

    2

    4 5

    130

    130

    120

    170

    50

    145120

    35

    180

    52235

    115

    85

    150

    85

    130

    47

    130

    127

    Does this makesense?

  • 8/9/2019 4_ Networks Model and Shortest Path

    10/11

    1.225, 11/07/02 Lecture 4, Page 19

    Traffic Assignment ModelsTraffic Assignment Models

    Conceptual definition:

    Principles of assignment to represent the interaction User Optimal (U.O.): O-D flows are assigned to paths with

    minimum travel time

    System Optimal (S.O.): O-D flows are assigned such that total

    travel time on the network is minimum

    Supply/DemandInteraction

    Flows and Travel Times

    (input)

    output

    Supply

    Network representation of

    transportation network

    Link performance functions

    Demand

    Origin-destination flows

    Zoning

    (input)

    1.225, 11/07/02 Lecture 4, Page 20

    ZoningZoning

    Physical zones10 11 12

    13 14 15

    16 17 18

    Zone 1

    Zone 3

    Zone 2

    Zone 4

    10 11 12

    13 14 15

    16 17 18

    1 2

    43

    Centroid nodes and Connectors

    Zone-to-zone Flows

    O/D Flows

    Zone 1 Zone 2 Zone 3 Zone 4

    Zon e 1 0 90 120 80

    Zon e 2 100 0 60 130

    Zon e 3 120 180 0 50

    Zon e 4 40 70 150 0

    1 2 3 4

    1 0 90 120 80

    2 100 0 60 130

    3 120 180 0 50

    4 40 70 150 0

  • 8/9/2019 4_ Networks Model and Shortest Path

    11/11

    1.225, 11/07/02 Lecture 4, Page 21

    Analysis PeriodsAnalysis Periods

    Over an analysis period, flows are assumed constant in order for steady-state analysis to apply

    The duration of a period is longer than a tripTypical analysis periods: morning-peak, midday, evening-peak

    time of day

    flows

    Morning-peak

    period

    Midday period Evening-peak

    period

    1.225, 11/07/02 Lecture 4, Page 22

    Lecture 4 SummaryLecture 4 Summary

    Conceptual Networks: DefinitionsRepresentation of an Urban Road Network (Supply)Shortest Paths (Reading: pp. 359-367, 6.2.3 and 6.2.4 of R6)

    Introduction

    Dijkstras algorithm: example

    Dijkstras algorithm: statement

    ObservationsExtensions to Classical Shortest Path ProblemsAll-or-nothing traffic assignmentZoning and Analysis Periods (Demand)Motivation for more advanced traffic assignment models