Sei sulla pagina 1di 15

Traffic assignment

Trip generation

Trip distribution

Mode split

Transit
person trip Vehicle trip
table (O&D) table (O&D)

Trip assignment
Dijkstra’s algorithm
1. function Dijkstra(Graph, source):
2. for each vertex v in Graph: // Initializations
3. dist[v] := infinity // Unknown distance function from source to v
4. previous[v] := undefined // Previous node in optimal path from source
5. dist[source] := 0 // Distance from source to source
6. Q := the set of all nodes in Graph // All nodes in the graph are unoptimized - thus
are in Q
7. while Q is not empty: // The main loop
8. u := vertex in Q with smallest dist[]
9. if dist[u] = infinity:
10. break // all remaining vertices are inaccessible from source
11. remove u from Q
12. for each neighbor v of u: // where v has not yet been removed from Q.
13. alt := dist[u] + dist_between(u, v)
14. if alt < dist[v]: // Relax (u,v,a)
15. dist[v] := alt
16. previous[v] := u
17. return dist[]
Dijkstra’s algorithm in plain words
1. to initialize
– the origin is the only solved node.
– The distance to the origin is 0.
– The solved set is empty except the origin node.
2. find all the unsolved nodes that are directly connected by a single arc to any solved node. For each unsolved
node, calculate all of the “candidate distances” (there may be several of these for one unsolved node
because it may directly connect to more than one solved node):
– choose an arc connecting the unsolved node directly to a solved node.
– The “candidate distances” is (the distance to solved node) + (length of arc directly connecting the
solved and the unsolved node).
3. choose the smallest candidate distance:
– add the corresponding unsolved node to the solved set
– distance to the newly solved node is the candidate distance
– add the corresponding arc to the arc set
4. if the newly solved node is not the destination node, then go to step 2. Else, stop and recover the solution.
– length of the shortest route from origin to destination is the distance to the destination node.
– Shortest route is found by tracing backwards from the destination node to the origin (or the reverse)
using the arcs in the arc set. It is usually easiest to trace backwards because each node is reached
from exactly one other node, but may have outwards arcs to several other nodes.
An example
Find the shortest paths from node 1 to all other nodes in the network

1 6 2 1 4

2 3
2 1

3
5 6
Example solution
Step 1: 0
Step 4: 6
1 6 2 1 4
Step 3: 5

2 3
2 1

3
5 6
Step 2: 2
Step 6: 8 Step 5: 7

Solved node list Dist fr O. to node Solved arc set


1 0
3 2 1-3
2 5 3-2
4 6 2-4
6 7 4-6
5 8 4-5
Another example
Find the shortest paths from node A to all other nodes

B 13 F

2
3
6 3
H
A 5 D 2

6
3
2 4
2

C G
5 E
6
Another example
Find the shortest paths from node 6 to all other nodes

1 2 2

5 3 5 3

4 4 3
6
3

3
3
8
5
Inputs to assignment
• O-D matrix
• Network
Terminology (1)
• Trip assignment: “loading the network”; volumes are
assigned to links
• Free flow speed: speed under no congestion
• Free flow travel time: travel time under no congestion
• Path finding: finding the path with the minimum
impedance
• Path loading: loading vehicles to links comprising a
path
• Level of service: a qualitative measure describing the
operation conditions
• Capacity restraint: the volume loading process is
constrained by the capacity of the link
Assignment methods
• Non-equilibrium (heuristic) assignments
– All or nothing: link travel times are determined
beforehand and trips are assigned at once
– Incremental assignment: link travel times are
updated through fixed proportions and trips are
assigned iteratively
– Capacity constraint: link travel times depend on
link volumes and final assignment is the average
of the last several iterations
All or nothing assignment
Simple all-or-nothing method is the fundamental building block in
traffic assignment procedures.

Step 1: find
shortest paths Step 2: assign all
between origin trips to links
and comprising the
destination shortest routes
zones

Potrebbero piacerti anche