Transportation networks

Lecture Notes in Transportation Systems Engineering

Prof. Tom V. Mathew*

*IIT Bombay (tvm@civil.iitb.ac.in)  January 3, 2019

Contents

1 Introduction
2 Graphs: Definitions and Notations
 2.1 Directed Graph
 2.2 Chain and Cycle
 2.3 Path and Mesh
 2.4 Accessible and connected nodes
 2.5 Cut-Set
 2.6 Undirected and mixed graphs
 2.7 Tree and Arborescence
3 Flows and Conservation Laws
 3.1 Link Flows and Kirchhoff’s Law
  3.1.1 Numerical Illustration
 3.2 Single O-D networks: Link flows
  3.2.1 Numerical Illustration
 3.3 Multiple O-D Network: Chain Flows
  3.3.1 Numerical Illustration
 3.4 Costs and Capacities
4 Network Algorithms
 4.1 Minimal spanning tree
  4.1.1 Prims algorithm
  4.1.2 Numerical Example
  4.1.3 Kruskal’s algorithm
 4.2 Dijkstra’s shortest path algorithms
  4.2.1 Numerical Example
  4.2.2 Numerical Example 2
5 Network Optimization
 5.1 Maximum Flow Problem
 5.2 Minimum Cost Flow Problem
 5.3 Transportation Problem
 5.4 Assignment Problem
 5.5 Traveling Salesman Problem
6 Travelling salesman problem (TSP)
 6.1 Introduction
 6.2 Formulation
Exercises
References
Acknowledgments
_________________________________________________________________________________________

1 Introduction

  1. Objective: a clear statement of the basic principles of underlying the theory and application of network flows in transportation.
  2. Applicable to road traffic, rail, shipping, and airline network.
  3. Assist in transportation planning and traffic control applications.
  4. Examples of network representation:
    1. Road Network
    2. Traffic Desire Network

2 Graphs: Definitions and Notations

2.1 Directed Graph

  1. Directed graph [N,L] is a set of N unordered elements and a set of L ordered pairs of elements of N.
  2. Number of elements in N and L are n and l respectively.
  3. N (ni,i = 1, 2,,n) is the set of node and L (lk(ni,nj), ni N, nj N,k = 1, 2,,l) is the set of links.
  4. Here, we assume there is no parallel link.
  5. If ni = nj then the link is a loop (nodes defining link may or may not be distinct).
  6. It is common practice to call the nodes ni and nj defining the link lk(ni,nj) as A node and B node respectively.
  7. Partial Graph of the directed graph [N,L] is defined as [N,L] where L′⊆ L. This is obtained by deleting links.
  8. Sub Graph of the directed graph [N,L] is defined as [N,L] where N′ ⊆ N and L= {(ni,nj)|(ni,nj) L,ni N,nj N′}. Obtained by deleting nodes and attached links.
  9. Complete Graph is graph with at least one link joining any two distinct nodes of N, that is, ni N, nj N, ninj, (ni,nj)∕∈L (nj,ni) L.
  10. Bipartite Graph is a graph in which the set of N nodes is divided into two complementary set X,X, such that, X X = N and X X = and L = {(ni,nj)|ni X, nj X}


    SVG-Viewer needed.

    Figure 1: Directed Graph N={1, 2, 3, 4} , L={(1,2); (1,3); (1,4); (2,3); (2,4); (3,2); (3,4)}
       

    SVG-Viewer needed.

    Figure 2: Partial Graph N={1, 2, 3, 4} , L’={(1,2); (1,4); (3,4)}

    SVG-Viewer needed.


    Figure 3: Sub Graph N={1, 2, 3, 4} , L={(1,2); (2,3)}
       

    SVG-Viewer needed.

    Figure 4: Complete Graph N={1, 2, 3, 4} , L={(1,2); (1,3); (1,4); (2,3); (3,4), (2,4)}


    SVG-Viewer needed.


    Figure 5: Bipartite Graph X={1, 2}, and X’={3, 4} , L={(1,3); (1,4); (2,3)}


2.2 Chain and Cycle

If n1,n2nr are distinct nodes, then the sequence n1(n1,n2)n2(n2,n3)n3nr-1(nr-1,nr)nr defines a chain from origin node n14 to destination node nr. If n1 = nr then chain becomes a cycle. In figure 1 1 (1,2) 2 (2,3) 3 (3,4) 4 is a chain from node 1 to 4 while 2 (2,3) 3 (3,2) 2 is a cycle from 2 to 2.

2.3 Path and Mesh

If directions of links are not considered chain and cycle becomes path and mesh respectively. If n1,n2nr are distinct nodes (ni,ni+1) are links, then a path from origin node n1 to destination node nr is defined by the sequence n1(n1,n2)n2ni(ni,ni+1)ni+1nr) where either ni= ni and ni+1= ni+1 (forward link) or ni= ni+1 and ni+1= ni (reverse link). The path becomes a mesh if n1 = nr.

2.4 Accessible and connected nodes

In a graph, n1 to nr is accessible if there exists a chain from n1 to nr and is connected if there exists a path from n1 to nr. If n1 to nr is accessible, that does not imply nr to n1 is accessible, however, if n1 to nr is connected, that does imply nr to n1 is connected.

A connected directed graph is a graph in which all nodes are connected.

2.5 Cut-Set

If the set of nodes N is partitioned into complementary sets X and X then the sub set L defined by (X,X) = {(i,j)|(i,j) L,i X,j X is called a cut set. Refer to the graph in figure 1: if X = {1, 2} and X = {3, 4}, then cut set (X,X)={(1,3), (1,4), (2,3), (2,4)} and the cut set (X,X)={(3,2)}. Cut set has several applications in transportation networks, for example the road links crossing a screen lines and cordon lines can be modelled as cut sets.

2.6 Undirected and mixed graphs

The undirected graph [N,L], the elements of L are unordered pair of elements of N and are denoted as (ni,nj) or (nj,ni). Arrow heads are not required for their representation. Pedestrian link or two way streets are some examples.

2.7 Tree and Arborescence

A tree denoted by [N,T] is a connected graph with no meshes (directions are ignored). A graph is a tree if and only if every pair of distinct nodes is connected precisely one path. A spanning tree of a graph [N,L] is a tree [N,T] which is a partial graph of [N,L], that is, T L When directions are considered, then the tree which consists of chains from home node to all other nodes is called and Arborescence. Hence, an Arborescence is a directed graph in which, for a node nr called as the root and any other node ni, there is exactly one directed path from nr to ni. Spanning tree has application in finding the shortest path.


SVG-Viewer needed.


Figure 6: Directed Graph G (N, L)
   

SVG-Viewer needed.

Figure 7: A Graph G’ (N’,T) which is a tree, but not a spanning tree of G (N, L)

SVG-Viewer needed.


Figure 8: A Graph G” (N,T’) which is a spanning tree of G (N, L)
   

SVG-Viewer needed.

Figure 9: Arborescence of the Directed Graph G (N, L)


3 Flows and Conservation Laws

  1. When the links of a graph is used to denote flow of vehicles, goods, or pedestrain, then the graph is referred as a network or transportation network
  2. Flow then denotes quantity per unity time, the rate at which flow takes place (vehicles per hour, pedestian per hour, etc.)
  3. Fundamental to any network dealing with flows (like electrical, or water or transportation network) is the fact that flows are not lost in the network.
  4. Kirchhoff’s law state the same concept, but note that we are concerned with the steady state macroscopic conditions and not valid under microscopic and stocastic conditions.

3.1 Link Flows and Kirchhoff’s Law

Three kind of nodes exist in transporation network:

  1. Intermediate node: sum of all flows entering the node equals the sum of all flows leaving the node
  2. Production Centroid or source: the sum of all flows leaving the node equals the flow produced at that node
  3. Attraction Centroid: or sink: the sum of all flows entering the node equals the flows attracted to that node

Following notations may be stated first:

  1. fij is the link flow on the directed link (i,j)
  2. ai is the flow produced at the centroid (i)
  3. bi is the flow attracted to the centroid (i)
  4. All flows are assumed to be non-negative (fij, ai, bi  0)
  5. A(i) is the set of nodes after node i, defined as:
    A (i) = {j|j ∈ N, (i,j) ∈ L}
    (1)

  6. B(i) is the set of nodes before node i, defined as:
    B (i) = {j|j ∈ N, (j,i) ∈ L}
    (2)

Now, the Kirchhoff’s flow conservation law for a directed transportion network [N; L] can be written as:

         ∑
            fij = ai,    if i is a centroid,                       (3)
         A(i)
         ∑
             fij = bi,    if i is a centroid,                       (4)
         B(i)
∑        ∑
    fij -    fij = 0, if i is an intermediate.                      (5)
A (i)     B (i)
  ∑        ∑
      ai =    bi = v                                              (6)
The last equation ensures some solution to the problem. Since, the no of links are normally more than the number of node in typical transportation networks, the number of unknown exceeds the number of equations and hence there will be mutiple solutions to this problem.

3.1.1 Numerical Illustration

Verify Kirchhoff’s law for the network given in figure 10 for node 2 and 3.


SVG-Viewer needed.


Figure 10: Network illustrating flow conservation


Solution Node 2: For the node i=2, A(i = 2) = 3, 4 and B(i = 2) = 1, 3

              ∑        ∑
Net  flow  =       f2j -    fj2
              A(2)     B (2)

          =   f2,3 + f2,4 + f1,2 - f3,2
          =   5 + 1 - 3 - 3 = 0
Node 3: The above steps may be repeated.

3.2 Single O-D networks: Link flows

If i = 1 is the origin node and i = n is the destination node, the node 1 is desgnated as the production zone with g where g is the flow produced and zero flow attracted. Similarly, the node n is designated as the attraction zone with g where g is the flow attracted and zero flow is produced.

The conservation equation for such a network can be written as:

         ∑
             f   =   g, i = 1,
              ij
∑        A∑(i)
    fij -     fji =   0, i = 2,..., n - 1,
A(i)     B (i)
         ∑
       -     fij  =   - g, i = n,
         B (i)
where, g denote the flow value, and fij is the flow on link i,j.

Theorem The net flow across any cut-set (X,X) separating the origin and destination is equal to the flow value.

3.2.1 Numerical Illustration

Verify the above theorem that the net flow across the cut-set (X,X) separating the origin 1 and destination 4 is equal to the flow value of 7 for the network given in figure 11.


SVG-Viewer needed.


Figure 11: Network illustrating flow value across cut-set


Solution

  1. The cut set is defined by X = {1, 3} and X = {2, 4}
  2. The cut-set (X,X) = {(1, 2), (3, 2), (2, 3)}
  3. The cut-set (X,X) = {(2, 4)}
  4. The net flow f(X,X) - f(X,X) = 3 + 3 + 2 - 1 = 7.

The conservation equation can be conveniently represented in a matrix form. The node-link incidence matrix in an n × l matrix E where the rows corresponds to nodes (i)and the column corresponds to links (j,k) and each cell denoted by δjki defined as:

      (|
      |{  +1    if i = j,
δijk =    - 1   if i = k,
      ||(
         0    otherwise
(7)

For example ...

      (i) (i,j )  (1,2)(1,3)(2,3)(2,4)(3,2)(3,4)
               ⌊                              ⌋
        (1)    |   1   1    0    0    0    0  |
E =     (2)    ||  - 1  0    1    1   - 1   0  ||
               |                              |
        (3)    |⌈   0   - 1 - 1   0    1    1  |⌉

        (4)        0   0    0   - 1   0   - 1
and the resultant flow value vector g is
Ef  = g
(8)

The flow conservation equations () can now be written as:

Ef  = g
(9)

where f is the vector of link flows, g is the O-D vector.

       (i,j)    f
               ⌊ ij⌋
       (1,2)     3
               ||   ||
       (1,3)   | 4 |
f =    (2,3)   || 1 ||
               ||   ||
       (2,4)   | 5 |
               ||   ||
       (3,2)   ⌈ 3 ⌉
       (3,4)     2
and the resultant flow value vector g is
Ef  = g
(10)

where f is the vector of link flows, g is the O-D vector.

      (i)      gi
            ⌊     ⌋
      (1)   |  7  |
g =   (2)   ||  0  ||
            |     |
      (3)   |⌈  0  |⌉

      (4)     - 7

3.3 Multiple O-D Network: Chain Flows

Link flow is superimposition of chain flow. Define:

  1. fi is the set of links (i = 1, 2l)
  2. hj is the set of chains (j = 1, 2m)
  3. hj is the chain flow.

The flow value g is then the sum of all chain flows, that is:

    ∑
g =     h
         j
     j
(11)

To get the link flow, a term aij is defined as:

      {
         1  if link i isonchain m ,
aij =                          j
         0  otherwise
(12)

And now the link flow fi is given as:

     ∑
fi =     aij hj
      j
(13)

Note that the link flow from chain flow is unique whereas the chain flow from the link flow is not unique. The above things can be written in a matrix form by first defining a link chain incident matrix Al×m with aij as it elements. T Then, the link flow vector f is given as:

fl×1 = Aj×m  hm ×1
(14)

Now, the scalar flow value g can be given as:

g = eT h
(15)

where e is a column vecotor of size m and all elements equals to 1.

3.3.1 Numerical Illustration

For the network given in Figure 12, the chain flows are given below. Find the link flows and the flow values.

no Chains Chain Flow
m1 (1,2) (2,3) (3,4) 1
m2 (1,2) (2,4) 2
m3 (1,3) (3,2) (2,4) 3
m4 (1,3) (3,4) 1

SVG-Viewer needed.


Figure 12: A Single OD Network


Solution The link chain incident matrix Al×m can be written as:

       (i,j)    m1  m2 m3  m4
              ⌊             ⌋
      (1,2 )     1  1  0  0
              ||             ||
      (1,3 )  |  0  0  1  1 |
E =   (2,3 )  ||  1  0  0  0 ||
              ||             ||
      (2,4 )  |  0  1  1  0 |
              ||             ||
      (3,2 )  ⌈  0  0  1  0 ⌉
      (3,4 )     1  0  0  1
      mj     hj
           ⌊    ⌋
      m1      1
           ||    ||
h =   m2   ||  2 ||
      m3   |  3 |
           ⌈    ⌉
      m4      1
Hence, the flow vector f is given as:
               i       f
                     ⌊  i⌋
             (1,2)     3
                     ||   ||
             (1,3)   | 4 |
f =  A h =   (2,3)   || 1 ||
                     ||   ||
             (2,4)   | 5 |
                     ||   ||
             (3,2)   ⌈ 3 ⌉
             (3,4)     2
And for getting the flow value, the vector e is defined as:
      m
        j  ⌊    ⌋
      m1      1
           ||    ||
e =   m2   |  1 |
      m    ||  1 ||
        3  ⌈    ⌉
      m4      1
and g is given as:
                       ⌊    ⌋
                          1
                       ||    ||
g = eTh  =   [1 1 1 1] × || 2 || = 7.
                       |  3 |
                       ⌈    ⌉
                          1

3.4 Costs and Capacities

The cost could be time, distance, delay, or disutility etc. The following notations and definitions are normally used in transporation network analysis.

  1. Link cost: cij(fij) is the average cost or cost per unit flow. The unit link cost is function of the flow on that link.
  2. Total link cost: which is flow dependent can be defined as fij × cij(fij).
  3. Route cost: on a chain or a path from origin to destination is the sum of all the link costs of the links that define the route can be expressed as:
              r∑-1
C(n ,nr) =     c(n ,n   )
   1      i=1   i i+1
    (16)

  4. Route cost with turn penalties: is defined as:
              r∑-1
C      =     [c       +  p                 ]
 (n1,nr)        (ni,ni+1)    ((ni,ni+1),(ni+1,ni+2))
          i=1
    (17)

    where p((ni,ni+1),(ni+1,ni+2)) is the penalty for turning from the link (ni,ni+1) to (ni+1,ni+2).

  5. Network cost: C is the sum of all the total link cost of all the links of the network, and is given as:
        ∑
C =     fij × cij(fij)
    (i,j)
    (18)

  6. If a link is prohibited for movement, it can represented by putting cij = and if a turn is prohibited, it can be represented by p(.) =

4 Network Algorithms

4.1 Minimal spanning tree

In a connected weighted graph, all spanning trees have n-1 edges and will have minimum or maximum sum of the weights. Tow algorithms are proposed: Prims algorithm and Kruskal’s algorithm. ‘

4.1.1 Prims algorithm

Prims algorithm grows a spanning tree from a given vertex of a connected weighted graph G, iteratively adding the cheapest edge from a vertex already reached to a vertex not yet reached, finishing when all the vertices of G have been reached. Break tie arbitrarily.




Input: G(N,L) weighted and connected
Initilize: T(G)=Φ
Iteration: add cheapest edge that
incorporate a new vertex



Figure 13: Prims Algorithm


4.1.2 Numerical Example

Find the minimum spanning tree of the network given in figure 14


SVG-Viewer needed.


Figure 14: Example network for minimum spanning tree problem 1


Solution

  1. Start with node 1, N={1}, T={Φ}
  2. Node 1 can be connected by nodes 2, 3, and 4, having weights 12, 17, and 10
  3. Minimum weight is 10, for node 4. So N={1,4}, T={(1,4)}
  4. Node 1 can be connected by nodes 2 and 3, having weights 12 and 17
  5. Node 4 can be connected by nodes 3 and 5, having weights 14 and 19
  6. Minimum weight is 12, for node 2. So N={1,4,2}, T={(1,4),(1,2)}
  7. Node 1 can be connected by node 3, having weight 17
  8. Node 4 can be connected by nodes 3 and 5, having weights 14 and 19
  9. Node 2 can be connected by nodes 3 and 5, having weights 18 and 16
  10. Minimum weight is 14, for node 3. So N={1,4,2,3}, T={(1,4),(1,2),(3,4)}
  11. Node 1 can be connected by no nodes without loop
  12. Node 4 can be connected by node 5, having weight 19
  13. Node 2 can be connected by node 5, having weight 16
  14. Node 3 can be connected by node 5, having weight 11
  15. Minimum weight is 11, for node 3. So N={1,4,2,3}, T={(1,4),(1,2),(3,4),(3,5)} W=49.


SVG-Viewer needed.


Figure 15: Solution for the example network for minimum spanning tree problem 1


4.1.3 Kruskal’s algorithm

The main concept of this algorithm is to maintain an acyclic spanning sub-graph H, enlarging it by edges with low weight to form a spanning tree. Consider edges in non-descending order of weight, breaking ties arbitrarily.




Input: G(N,L) weighted and connected
Initilize: set T=Φ a sub-graph of G
Iterate: If the next cheapest edge joins
two components of T, then include
it, otherwise, discard it.
Terminate: when T is connected



Figure 16: Kruskal Algorithm


Example Find the minimum spanning tree of the network given in figure 14

Solution

  1. Sort the links in the descending order of weights results in
  2. 19 (4,5); 18 (2,3); 17 (1,3); 16 (2,5); 14 (3,4); 12 (1,2); 11 (3,5); and 10 (1,4)
  3. T=(1,4) W=10
  4. T=(1,4),(3,5) W=10+11
  5. T=(1,4),(3,5),(1,2), W=10+11+12
  6. T=(1,4),(3,5),(1,2),(3,4), W=10+11+12+14=47

4.2 Dijkstra’s shortest path algorithms

This algorithm finds the shortest path for a graph from a starting node to every other node. The algorithm is given in Figure 17 and each step is described below.

  1. Input to the algorithm is a graph G(N,L) with nonnegative edge weights and a starting vertex u. The destination vertex v The weight of the edge xy is w(xy) and w(xy) = if xy is not an edge.
  2. Initilize step involves defining the solution set S with the starting vertex as the only element. Further, a variable t associated with vertex u is defined and set its value to zero.
  3. Iteration starts by selecting all possible edges defined by the starting node v from the set S and the end node z not in the set S. For each of the end node z, the total cost up to that node is computed by adding the total cost upto node v computed in previos iteration and the weight of the edge (xy), that is t(z) = t(v) + w(xy). Find the node which has minimum cost and add that node to the solution set S.
  4. Termination of the algorithm happens when all the node becomes element of the solution set S or the destination node is reached.





   

1 Input

G(N,L), w(xy) 0, u

2 Initilize

S = {u}

3  

t(u) = 0

4 Iterate

select v S and z∕∈S

5  

such that t*(z)=Min t(z)

6  

where t(z) = t(v) + w(vz)

7  

set S* = S z

8 Terminate

till S = V {G}

   





Figure 17: Dijkstra’s Shortest Path Algorithm


4.2.1 Numerical Example

Find the minimum shortest path of the graph given in figure 18 from the node u.


SVG-Viewer needed.


Figure 18: Example network for shortest path problem 1


Solution


Table 1: Solution to the shortest path algorithm








{S} v vz t(z) t*(z) z* {S*}







u u ua 0+1=1 1 a ua
ub 0+3=3







ua u ub 0+3=3 3 b uab
a ad 1+5=6
ac 1+4=4







uab a ad 1+5=6
ac 1+4=5 5 c uabc
b bd 3+4=7
bc 3+5=8







uabc a ad 1+5=6 6 d uabcd
b bd 3+4=7
c ce 5+6=11







uabcd d de 6+2=8 8 e uabcde
c de 5+6=11








Note: t(z) = t(v) + w(vz), t*(z) = min t(z)


SVG-Viewer needed.


Figure 19: Example network for shortest path problem 1


4.2.2 Numerical Example 2

Find the minimum shortest path of the graph given in figure 20 from the node O to the destination node T.


SVG-Viewer needed.


Figure 20: Example network for shortest path problem 1


Solution The solution is given in Figure 21.


SVG-Viewer needed.


Figure 21: Solution to the example network for shortest path problem 1


5 Network Optimization

5.1 Maximum Flow Problem

5.2 Minimum Cost Flow Problem

5.3 Transportation Problem

5.4 Assignment Problem

5.5 Traveling Salesman Problem

6 Travelling salesman problem (TSP)

6.1 Introduction

Travelling salesman problem (TSP) consists of finding the shortest rout e in complete weighted graph G with n nodes and n(n-1) edges, so that the start node and the end node are identical and all other nodes in this tour are visited exactly once.

6.2 Formulation

Let C be the matrix of shortest distances (dimension nxn), where n is the number of nodes of graph G(NL). The elements of matrix C represents the shortest distances between all pairs of nodes (i,j),i,j = 1, 2,,n. The travelling salesman problem can be formulated in the category programming binary, where variables are equal to 0 or 1, depending on the fact whether the route from node i to node j is realized (xij = 1) or not (xij = 0). Then, the mathematical formulation of TSP is as follows (the idea of this formulation is to assign the numbers 1 through n to the nodes with the extra variables ui, so that this numbering corresponds to the order of the nodes in the tour. It is obvious that this excludes sub-tours, as a sub-tour excluding the node 1 cannot have a feasible assignment of the corresponding ui variables):

                     n   n
                    ∑   ∑
             Min  =         cij xij
                     i=1 j=1
                 subjected to

      ∑n
          xij = 1,  j = 1,2, ...,n; i ⁄= j
      i=1
      ∑n
          xij = 1, i = 1,2,...,n;  i ⁄= j
      j=1

ui - uj + n xij ≤ n - 1,i,j = 2,3, ...,n; i ⁄= j

     xij ∈ {0,1}1,  i = 1,2,...,n;  i ⁄= j
(19)

(20)

(21)

(22)

(23)

(24)
The constraint 23 ensures there is no sub-trours.

Exercises

  1. Not Available

References

  1. Frederick S Hillier and Gerald J Lieberman. Introduction to Operations Research. Tata McGraw-Hill Publishers, New Delhi, 2001.
  2. Renfrey B Potts and Robert M Oliver. Flows in transportation networks. Academic Press, New York, 1972.
  3. Douglas B West. Introduction to graph theory. Pearson education Asia, New Delhi, India, 2001.

Acknowledgments

I wish to thank several of my students and staff of NPTEL for their contribution in this lecture. I also appreciate your constructive feedback which may be sent to tvm@civil.iitb.ac.in Prof. Tom V. Mathew
Department of Civil Engineering
Indian Institute of Technology Bombay, India