Title: Network Flow Models
1Minimum Cost Flow Problem
Using Solver of MS Excel to solve Minimum Cost
Network Flow Problems
2Shortest Path Problem
We will see two solution methods for this
problem. 1- Linear Programming 2- Dijkstras
Algorithm
3Shortest Path Problem
s.t.
4Shortest Path Problem
Restricted Versions
1. Finding the shortest path which does not go
through some arcs. In this case arc (4,8)
Assign a high cost or length to those arcs or set
the capacity to 0.
5Shortest Path Problem
Restricted Versions
2. Finding the shortest path which does not go
through a node. Ex node 6.
c2650 c4650 c6850
Assign a high cost or length for the arcs
incident to node 6 or set the capacities for
those arcs to zero.
6Shortest Path Problem
Restricted Versions
3. Finding the shortest path which goes through
an arc. Ex. arc (4,7).
9
6
2
2
3
10
7
3
-1
8
4
1
5
1
8
5
7
6
7
4
3
5
4
5
Note that setting the cost of arc (4,7) to zero
does not work.
7Shortest Path Problem
Restricted Versions
Find the shortest path between nodes a) 1-4 and
7-8 cost22 b) 1-7 and 4-8 cost23 and take
the smaller one, i.e, 1-2-4-7-8.
8Shortest Path Problem
Dijkstras Algorithm
This algorithm finds the shortest path from
source node s to all other nodes in the
network. It is implemented by labeling nodes in
the network. Label for node i is written as
d(i),n where n is the node immediately
preceding i on the shortest path and d(i)
indicates the length of the current shortest path
from s to i.
9Shortest Path Problem
10Shortest Path Problem
11Shortest Path Problem
12Shortest Path Problem
Steps of Dijkstras Algorithm
1. Label node s with the permanent label 0,.
Label every node i connected to node s with a
temporary label c(s,i),s. Assign the label 8,
to all other nodes. 2. Select the node with
the smallest temporary label, say node i, and
make it permanent. For all node j connected to i
by arcs that do not have permanent labels,
compare the current temporary distance label d(j)
with d(i)c(i,j). If d(i)c(i,j)ltd(j), then label
node j with d(i)c(i,j),i. 3. Continue until
all nodes are labeled permanently. The final
distance labels represent the lengths of the
shortest paths from s.
13Shortest Path Problem
14Shortest Path Problem
15Shortest Path Problem
16Shortest Path Problem
17Maximum Flow Problem
2
capacity
5
2
5
3
3
2
4
7
1
4
6
3
8
7
3
6
3
We can formulate this problem as follows We add
an additional arc (t,s) and capacity uts 8
18Maximum Flow Problem
2
5
2
5
3
3
2
4
7
1
4
6
3
8
7
3
6
3
s.t.
19Maximum Flow Problem
14