You are on page 1of 29

Indian Institute of Technology, Kharagpur

Urban Transportation Systems Planning


Traffic Assignment

Department of Civil Engineering


Indian Institute of Technology Kharagpur
Indian Institute of Technology, Kharagpur
General
• Traffic Assignment is the process of allocating
given set of trip interchanges to the specified
transportation system or routes
Traffic assignment requires a complete description
of proposed or existing transportation system and
a matrix of inter zonal trip movements

Estimate the routes used between each origin-


destination (O-D) pair
Indian Institute of Technology, Kharagpur

• Different types of traffic assignment techniques


include:
All-or-nothing assignment
Incremental assignment
Capacity restraint assignment
Stochastic assignment
Stochastic user equilibrium assignment
System optimum assignment
Dynamic assignment, etc.
Indian Institute of Technology, Kharagpur

Link Cost Function


• As the flow increases towards the capacity of the
stream, the average stream speed reduces from
the free flow speed to the speed corresponding to
the maximum flow

• The minimum path computed


prior to the trip assignment
will not be the minimum after
the trips are assigned
Indian Institute of Technology, Kharagpur

Network Properties and Algorithms


• It is useful to understand some of the network
properties like network connectivity, minimum
spanning tree, shortest path, etc.
Indian Institute of Technology, Kharagpur
Minimum Spanning Tree
• Spanning Tree: A tree with required minimum
number of links to ensure connectivity of the
network i.e. (n-1) links to connect ‘n’ nodes
• Minimum spanning tree: A spanning tree with
minimum total cost or length
• In many system, such as highways, computer
network, telephone lines, television cables, etc, we
need to identify the minimum spanning tree
• Example: Minimum road network which needs to
be developed and maintained throughout the year
to ensure connectivity of all nodes
Indian Institute of Technology, Kharagpur
4
b d
1 2

a 3 5 7 f

4 1
c e
6
• So many ways, 5 links can be selected to ensure
connectivity of all the 6 nodes
• But, for the minimum spanning tree (shown by
yellow lines), the total cost is minimum
Indian Institute of Technology, Kharagpur

• Two important features of minimum spanning


tree:
Possible multiplicity: There may be several
minimum spanning trees of the same weight
having minimum no. of edges; in particular, if
all weights are the same, every spanning tree is
minimum
Uniqueness: If each edge has a distinct weight
then there will only be one, unique minimum
spanning tree
Indian Institute of Technology, Kharagpur
Kruskal's Algorithm
• This is a greedy algorithm
• Take a graph with 'n' vertices
• Keep adding the shortest (least cost) edge, while
avoiding the creation of cycles
• until (n - 1) edges have been added
Indian Institute of Technology, Kharagpur
Example

Step 1
4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur

Step 2
4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur

Step 3
4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur

Step 4
4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur

Step 5

4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur
Prim’s Algorithm
• Start at any vertex in a graph (vertex A, for
example), and find the least cost vertex (vertex B,
for example) connected to the start vertex.
• Now, from either 'A' or 'B', find the next least costly
vertex connection, without creating a cycle (vertex
C, for example).
• Now, from either 'A', 'B', or 'C', find the next least
costly vertex connection, without creating a cycle,
and so on
• Eventually, all the vertices will be connected,
without any cycles, and an MST will be the result
Indian Institute of Technology, Kharagpur
Example

Step 1 4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur
Step 2

4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur
Step 3

4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur
Step 4

4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur

Step 5

4
b d
1 2

a 3 5 7 f

4 1
c e
6
Indian Institute of Technology, Kharagpur

Shortest path
• Finding a path between two vertices (or nodes)
such that the sum of the weights of its constituent
edges is minimized
• Formally, given a weighted graph (that is, a set V
of vertices, a set E of edges, and a real-valued
weight function f : E → R), and one element v of V,
find a path P from v to a v' of V so that
– Σf(p), p ϵ P, is minimal among all paths
connecting v to v'
Indian Institute of Technology, Kharagpur

Dijkstra's algorithm
• It solves the single-pair, single-source, and
single-destination shortest path problems
Indian Institute of Technology, Kharagpur
Algorithm
• Let's call the node we are starting as initial node
and from which Y be the distance to an other node
• Assign some initial distance values and try to
improve them step-by-step and assign to every
node a distance value; Steps are
Set it to zero for initial node and to infinity for
all other nodes and mark all nodes as unvisited
Set initial node as current
For current node, consider all its unvisited
neighbours and calculate their distance
Indian Institute of Technology, Kharagpur
• For example, if current node (A) has distance of 6, and
an edge connecting it with another node (B) is 2, the
distance to B through A will be 6+2=8
• If this distance is less than the previously recorded
distance (infinity in the beginning, zero for the initial
node), overwrite the distance
• When we are done considering all neighbours of the
current node, mark it as visited
• A visited node will not be checked ever again; its
distance recorded now is final and minimal
• Set the unvisited node with the smallest distance (from
the initial node) as the next "current node" and
continue from step 3
Indian Institute of Technology, Kharagpur

Example
9 5
6 6
2 11
3 4
14
9
10 15
1
7 2

Find out shortest path in this network using


Dijkstra's algorithm
Indian Institute of Technology, Kharagpur
Solution
• Step 1: set node 1 at zero and others at infinitive
• Step 2: node 1 is now current node
• Step 3: from node 1 distances of nodes 2, 3, 6 are
7, 9, 14 respectively and minimum is 7, so
14 9 5 6
6
2 9 11
3 4
14
9
10 15
0
1 7
7 2
Indian Institute of Technology, Kharagpur
• Now node 2 become the current node from which
the distance of node 3 is (7+10)= 17>9 and node 4
is (7+15)= 22
• The distance of node 3 from node 2 is more than
the distance from node 1, so

14 9 5 6
6 22
2 (7+10)=17>9
11
3 4
14
9
10 15
0
1 7
7 2
Indian Institute of Technology, Kharagpur
• Now node 3 become the current node from which
the distance of node 4 is (9+11)= 20<22 and node
6 is (9+2)= 11<14
• The distance of node 6 from node 1 is more than
the distance from node 3, so
(9+2)=11<14
9 5 6
6
(9+11)=20<22
2 9
11
3 4
14
9
10 15
0
1 7
7 2
Indian Institute of Technology, Kharagpur
• Now node 6 become the current node from which
the distance of node 5 is (11+9)= 20
• And distance from node 5 to node 4 is (20+6)= 26 >
20, so

(11+9)=20
11
9 5 6
6
20
2 9
11
3 4
14
9
10 15
0
1 7
7 2

You might also like