Professional Documents
Culture Documents
Production Systems:
Networks, Routing and Logistics*
Rakesh Nagi
Department of Industrial Engineering
University at Buffalo (SUNY)
*Lecture notes from Network Flows by Ahuja, Magnanti and Wong (1993); Dr. Joy Bhadury
Rakesh Nagi
4
3
Source
Wells
Rakesh Nagi
7
6
5
Boosters
8
9
Sink
Refineries
Subject to:
x ij -
{j:(i,j) A}
x ji
{ j: (j,i) A}
for i= s
for i= t
Node label:
( Pf , i) =
Arc Label:
( f , CAP) =
Step 1:
or
Source
Source
Forward arc
must have
f<CAP
sink
Backward
arc must
have f>0.
Step 3:
Let (i,j) be an edge in P, then label j as follows:
a) If (i,j) is forward in P , then label j as,
MIN CAP-f of arc (i,j) , Pf at i , + i
b) If (i,j) is backward in P , then label j as,
MIN f of edge (i,j) ,
Rakesh Nagi
Pf at i , - i
Department of Industrial Engineering, UB
Step 4:
Let f* be the Pf of the sink. Update edge (i,j) as follows:
a) If label on j is [ , + i] then label (i,j) becomes:
[f + f* , CAP]
b) If label on j is [ , - i] then label (i,j) becomes:
[f - f* , CAP]
Go to Step 2.
Rakesh Nagi
4
3
2
Step 1:
1
7
2
2
4
2
6
Source
(, -)
2
2
2
7
6
5
Sink
Iteration 1:
Step 2: Choose Path P
(6,+1)
(0,4)
2
(0,6)
(, -)
(0,7)
(0,3)
(0,3)
(0,2)
(0,1)
(0,2)
(0,2)
(0,7)
(0,4)
3
(7,+1)
(0,5)
Step 3:
(6,+1)
(0,6)
(0,4)
(4,+2)
(0,7)
(4,+5)
(, -)
f * = 4; add +4 to each of the arc labels in the path.
Step 4:
(6,+1)
(4,6)
(0,6)
1
(, -)
(4,4)
(0,4)
(4,+2)
(4,7)
(0,7)
(4,+5)
1
(, -)
(0,7)
(4,7)
(, -)
7
3
(7,+1)
(0,5)
(4,5)
(5,+3)
(0,4)
(4,4)
(6,+1) (2,+1)
(0,3) (2,3)
5
(0,3)
(2,3)
(2,+2)
f * = 2; add +2 to each of the arc labels in the path.
(4,+6)
(4,+2) (2,+4)
(4,7) (6,7)
(4,+6)
(2,+5)
1
(, -)
(1,2)
(0,2)
(4,7)
(5,7)
4
(2,+2)
(2,+3)
3
5
(2,+4)
(1,+4)
4
(7,7)
(6,7)
7
(2,+5)
(1,+5)
(7,+1)
(3,+1)
f * = 1; add +1 to each of the arc labels in the path.
Now, it is observed that there cannot be any breakthrough
paths, since both the arcs leading to the sink are saturated, to
their full capacity.Hence the iteration ends here, and finally we
have:
Residual graph:
(1,+4)
(2,+1)
(4,4)
2
(6,6)
(, -)
(7,7)
(2,3)
(3,3)
4 (2,+3)
(0,1)
(0,2)
7
(1,+ 5)
(0,2)
(1,2)
(4,4)
(5,7)
(4,5)
(3,+1)
The maximal flow from node 1 to node 7 = 4+4+2+1= 11.
(5,+3)
10
1
(, -)
4
8
Iteration 1:
Step 2: Choose Path P
4
2
*
(1,3)
(0,3)
2
(3,+1)
1
(, -)
(1,10)
(0,10)
4
(3,+2)
(0,1)
(1,1)
(1,+4)
(1,+7)
(1, 2)
(0,2)
(0,9)
(1,9)
(1,+6)
f * = 1; add +1 to each of the arc labels in the path.
Iteration 2:
Step 2: Choose Path P
(2,3)
(1,3)
1
(, -)
2
(3,+1)
(2,+1)
(2,10)
(1,10)
(0,1)
(1,1)
(3,+2)
(2,+2)
f * = 1; add +1 to each of the arc labels in the path.
Iteration 3:
Step 2: Choose Path P
(3,3)
(2,3)
2
(2,+1)
(1,+1)
(0,10)
(1,10)
(1,4)
(0,4)
5
(1,+4)
(1,+2)
(, -)
f * = 1; add +1 to each of the arc labels in the path.
(1,+7)
(1,+5)
8
(2,4)
(1,4)
8
(1,+5)
(1,+5)
Iteration 4:
Step 2: Choose Path P
(, -)
(1,+5)
1
(0,8)
(5,8)
(5,5)
(0,5)
(8,+1)
1
(, -)
(7,8)
(5,8)
(1,10)
2
(2,10)
(0,10)
(3,+1)
(8,+1)
(2,5)
(0,5)
(1,9)
(6,9)
(5,+3)
(1,+6)
4
(2,+2)
(5,+7)
Backward arc.
(3,10)
5
(1,+2)
(2,+2)
(4,4)
(2,4)
8
(2,+5) (5,+7)
(3,3)
(0,10)
(2,+2)
(, -)
(7,8)
(2,5)
3
(3,+1)
(1,1)
(1,1)
(4,4)
(0,2)
(1,+4)
(2,+5)
(1,2)
(6,9)
(5,5)
(5,+3)
In other words, a cut is a set of arcs which when deleted from the
network, disconnects the source completely from the sink.
Capacity of a cut: is defined as the sum of the capacities of the forward
arcs in the cut.
Minimum cut : We refer to an s-t cut whose capacity is minimum among
all s-t cuts as a minimum cut.
The proof of the Max-Flow Min-Cut Theorem shows that when the labeling
algorithm terminates,it has also discovered a minimum cut.
In the previous examples we can identify the minimum cuts.
(4,4)
2
(6,6)
(2,3)
(7,7)
(3,3)
(0,1)
Arcs
constituting
the min cut
(0,2)
(0,2)
(1,2)
(5,7)
(4,4)
3
Rakesh Nagi
(4,5)
20
2
(3,3)
(3,10)
(0,10)
(1,1)
4
(7,8)
Rakesh Nagi
(1,1)
(2,5)
(4,4)
(0,2)
6
(1,2)
(6,9)
(5,5)
21
Subject to:
x ij -
{j:(i,j) A}
x ji
{ j: (j,i) A}
for i= s
for i= t
22
The maximum flow problem with zero lower bounds always has
a feasible solution ( since zero flow is feasible), the problem with
non-negative lower bound could be infeasible.
#
#
Rakesh Nagi
23
Max-Flow Problem
Rakesh Nagi
24
Rakesh Nagi
25
Rakesh Nagi
26
Rakesh Nagi
27
Rakesh Nagi
28
Rakesh Nagi
30
k
c1
c2
a1
a2
a3
c3
cm
an
k
Rakesh Nagi
31