Professional Documents
Culture Documents
The term network flow program describes a type of model that is a special case of the more
general linear program. The class of network flow programs includes such problems as the
transportation problem, the assignment problem, the shortest path problem, the maximum flow
problem, the pure minimum cost flow problem, and the generalized minimum cost flow problem. It
is an important class because many aspects of actual situations are readily recognized as
networks and the representation of the model is much more compact than the general linear
program. When a situation can be entirely modeled as a network, very efficient algorithms exist
for the solution of the optimization problem, many times more efficient than linear programming in
the utilization of computer time and space resources
Figure 1
Terminology
A network or graph consists of points, and lines connecting pairs of points. The points are called
nodes or vertices. The lines are called arcs. The arcs may have a direction on them, in which
case they are called directed arcs. If an arc has no direction, it is often called an edge. If all the
arcs in a network are directed, the network is a directed network. If all the arcs are undirected, the
network is an undirected network.
Two nodes may be connected by a series of arcs. A path is a sequence of distinct arcs (no nodes
repeated) connecting the nodes. A directed path from node i to node j is a sequence of arcs, each
of whose direction (if any) is towards j. An undirected path may have directed arcs pointed in
either direction.
A path that begins and ends at the same node is a cycle and may be either directed or
undirected.
A network is connected if there exists an undirected path between any pair of nodes. A connected
network without any cycle is called a tree, mainly because it looks like one.
Examples
There are many examples of using network flows in practice. Here are a few
Transportation Problem
Assignment Problem
Shortest Paths
Maximum Flow
TRANSPORTATION MODEL
Since there is only one commodity, a destination can receive its demand from one or
more sources. The objective of the model is to determine the amount to be shipped from each
source to each destination such that the total transportation cost is minimized.
The basic assumption of the model is that the transportation cost on a given route is
directly proportional to the number of units transported. The definition of “unit transportation” will
vary depending on the “commodity” transported.
Sources destinations
The figure depicts the transportation model as a network with m sources n destinations.
A source or a destination is represented by a node. The arc joining a source and a destination
represents the route through which the commodity is transported. The amount of supply at source
i is ai and the demand at destination j is bj. The unit transportation cost between source i and
destination j is cij
m n
min. z =
Cij X ij
i=1 j=1
subject to
TP Sample:
The MG Auto Company has plants in LA, Detroit, and New Orleans. Its major distribution centers
are located in Denver and Miami. The capacities of the three plants during the next quarter are
1000, 1500, and 1200 cars. The quarterly demands at the two distribution centers are 2300, and
m
X ij ai, i= 1,2,…m
i=1
n
X ij bi, i= 1,2,…n
j=1
Xij 0
1400 cars. The train transportation cost per car per mile is approximately 8 cents. The mileage
chart between the plants and distribution centers is as follows:
New
Orleans 1275 850 1200
The mileage chart can be translated to cost per car at the rate 8 cents per mile. This yields the
following costs (rounded to the closest dollar)
New
Orleans 102 68 1200
What if
New
Orleans 102 68 1200
Since the total supply (4000) is greater than the total demand (3700) we create a fictitious or
dummy destination to absorb the excess supply.
New
Orleans 102 68 1200
dummy 200
Here the demand exceeds supply so a dummy source (plant) can be added with its capacity
= 200 cars
Solution:
1300
a3 node 3 1200
1200 NO
Transportation Algorithm
Determine starting solution M sources N destinations
M + N constraint equations
MILL
1 2 3 4 SUPPLY
1 10 2 20 11 15
SILO 2 12 7 9 20 25
3 4 14 16 18 10
DEMAND 5 15 15 15
MILL
1 2 3 4 SUPPLY X13 20-9+7-2 16
1 10 2 20 11 X14 11-20+7-2 -4
5 10 X13 X14 15 X21 12-10+2-7 -3
2 12 7 9 20
SILO
X31 4-10+2-7+20-18 -9
X21 5 15 5 25 X32 14-7+9-16 0
3 4 14 16 18 X33 16-9+20-18 9
X31 X32 X33 10 10
DEMAND 5 15 15 15 MIN @ X31(5,5,10) = 5
MILL
1 2 3 4 SUPPLY X11 10-2+7-20+18-4 9
1 10 2 20 11 X13 20-9+7-2 16
X11 15 X13 X14 15 X14 11-20+7-2 -4
SILO
2 12 7 9 20 X21 12-20+18-4 6
X21 0 15 10 25 X32 14-7+20-18 9
3 4 14 16 18 X33 16-9+20-18 9
5 X32 X33 5 10
DEMAND 5 15 15 15 MIN @ X14(10,15)=10
MILL
1 2 3 4 SUPPLY X11 10-11+18-4 13
1 10 2 20 11 X13 20-9+7-2 16
X11 5 X13 10 15 X21 12-7+2-11+18-4 10
2 12 7 9 20
SILO
X24 20-7+2-11 4
X21 10 15 X24 25 X32 14-2+11-18 5
3 4 14 16 18 X33 16-9+7-2+11-18 5
5 X32 X33 5 10
DEMAND 5 15 15 15
Vogel Method:
For each row and column remaining under consideration calculate its difference, which is defined
as the arithmetic difference between the smallest and next to the smallest unit cost still remaining in that row
or column,(if two costs tie being the smallest remaining in a row or column, then the difference is zero) in
that row or column having the largest difference, select the variable having the smallest remaining unit cost
and the smallest supply/demand
row
1 2 3 4 supply difference
1 10 2 20 11 15 8
2 12 7 9 20 25 2
3 4 14 16 18 10 10
demand 5 15 15 15 select x31 = 5
column difference 6 5 7 2 eliminate column 1
row
2 3 4 supply difference
1 2 20 11 15 9
2 7 9 20 25 2 X31 = 5
3 14 16 18 5 2 X12 = 15
X22 = 0
demand 15 15 15 select x12 =15
X23 =15
column difference 5 7 7 eliminate row 1 X24 = 10
X34 = 5
row
2 3 4 supply difference
2 7 9 20 25 2
3 14 16 18 5 2
demand 0 15 15 select x22 =0
column difference 7 7 2 eliminate column 2
row
3 4 supply difference
2 9 20 25 11
3 16 18 5 2
demand 15 15 select x23 = 15
column difference 7 2 eliminate column 3
row
4 supply difference
2 20 10 5
3 18 5
demand 15 select x24 = 10
column difference 5 select x34 = 5