Notes On Minimum Cost Network Flow Models
Notes On Minimum Cost Network Flow Models
8
These pages have been reproduced from:
Strephen Bradley, Arnoldo Hax, and Thomas Magnanti. "Applied Mathematical Programming."
Addison-Wesley Publishing Company. Pages 227-234. 1997.
There are several kinds of linear-programming models that exhibit a special structure that can be exploited
in the construction of efficient algorithms for their solution. The motivation for taking advantage of their
structure usually has been the need to solve larger problems than otherwise would be possible to solve with
existing computer technology. Historically, the first of these special structures to be analyzed was the trans-
portation problem, which is a particular type of network problem. The development of an efficient solution
procedure for this problem resulted in the first widespread application of linear programming to problems of
industrial logistics. More recently, the development of algorithms to efficiently solve particular large-scale
systems has become a major concern in applied mathematical programming.
Network models are possibly still the most important of the special structures in linear programming. In
this chapter, we examine the characteristics of network models, formulate some examples of these models,
and give one approach to their solution. The approach presented here is simply derived from specializing the
rules of the simplex method to take advantage of the structure of network models. The resulting algorithms are
extremely efficient and permit the solution of network models so large that they would be impossible to solve
by ordinary linear-programming procedures. Their efficiency stems from the fact that a pivot operation for
the simplex method can be carried out by simple addition and subtraction without the need for maintaining
and updating the usual tableau at each iteration. Further, an added benefit of these algorithms is that the
optimal solutions generated turn out to be integer if the relevant constraint data are integer.
227
228 Network Models 8.1
Figure 8.1 exhibits several additional characteristics of network flow problems. First, a flow capacity is
assigned to each arc, and second, a per-unit cost is specified for shipping along each arc. These characteristics
are shown next to each arc. Thus, the flow on arc 24 must be between 0 and 4 units, and each unit of flow
on this arc costs $2.00. The s in the figure have been used to denote unlimited flow capacity on arcs 23
and 45. Finally, the numbers in parentheses next to the nodes give the material supplied or demanded at that
node. In this case, node 1 is an origin or source node supplying 20 units, and nodes 4 and 5 are destinations
or sink nodes requiring 5 and 15 units, respectively, as indicated by the negative signs. The remaining nodes
have no net supply or demand; they are intermediate points, often referred to as transshipment nodes.
The objective is to find the minimum-cost flow pattern to fulfill demands from the source nodes. Such
problems usually are referred to as minimum-cost flow or capacitated transshipment problems. To transcribe
the problem into a formal linear program, let
xi j = Number of units shipped from node i to j using arc i j.
Then the tabular form of the linear-programming formulation associated with the network of Fig. 8.1 is
as shown in Table 8.2.
The first five equations are flow-balance equations at the nodes. They state the conservation-of-flow law,
Flow out Flow into Net supply
= .
of a node a node at a node
As examples, at nodes 1 and 2 the balance equations are:
x12 + x13 = 20
x23 + x24 + x25 x12 = 0.
It is important to recognize the special structure of these balance equations. Note that there is one balance
equation for each node in the network. The flow variables xi j have only 0, +1, and 1 coefficients in these
equations. Further, each variable appears in exactly two balance equations, once with a +1 coefficient,
corresponding to the node from which the arc emanates; and once with a 1 coefficient, corresponding to
the node upon which the arc is incident. This type of tableau is referred to as a nodearc incidence matrix; it
completely describes the physical layout of the network. It is this particular structure that we shall exploit in
developing specialized, efficient algorithms.
The remaining two rows in the table give the upper bounds on the variables and the cost of sending one
unit of flow across an arc. For example, x12 is constrained by 0 x12 15 and appears in the objective
function as 2x12 . In this example the lower bounds on the variables are taken implicitly to be zero, although
in general there may also be nonzero lower bounds.
This example is an illustration of the following general minimum-cost flow problem with n nodes:
XX
Minimize z = ci j xi j ,
i j
subject to:
X X
xi j xki = bi (i = 1, 2, . . . , n), [Flow balance]
j k
li j x i j u i j . [Flow capacities]
The summations are taken only over the arcs in the network. That is, the first summation in the ith flow-
balance equation is over all nodes j such that i j is an arc of the network, and the second summation is over
all nodes k such that ki is an arc of the network. The objective function summation is over arcs i j that
are contained in the network and represents the total cost of sending flow over the network. The ith balance
equation is interpreted as above: it states that the flow out of node i minus the flow into i must equal the
net supply (demand if bi is negative) at the node. u i j is the upper bound on arc flow and may be + if the
capacity on arc i j is unlimited. `i j is the lower bound on arc flow and is often taken to be zero, as in the
previous example. In the following sections we shall study variations of this general problem in some detail.
Later we will return to this point, indicating what to do when this supplydemand balance is not satisfied. If
we define the decision variables as:
xi j = Number of units to be distributed from source i to destination j
(i = 1, 2, . . . , m; j = 1, 2, . . . , n),
we may then formulate the transportation problem as follows:
m X
X n
Minimize z = ci j xi j , (1)
i=1 j=1
subject to:
n
X
xi j = ai (i = 1, 2, . . . , m), (2)
j=1
m
X
(xi j ) = b j ( j = 1, 2, . . . , n), (3)
i=1
xi j 0 (i = 1, 2, . . . , m; j = 1, 2, . . . , n) (4)
Expression (1) represents the minimization of the total distribution cost, assuming a linear cost structure
for shipping. Equation (2) states that the amount being shipped from source i to all possible destinations
should be equal to the total availability, ai , at that source. Equation (3) indicates that the amounts being
shipped to destination j from all possible sources should be equal to the requirements, b j , at that destination.
Usually Eq. (3) is written with positive coefficients and righthand sides by multiplying through by minus one.
Let us consider a simple example. A compressor company has plants in three locations: Cleveland,
Chicago, and Boston. During the past week the total production of a special compressor unit out of each
plant has been 35, 50, and 40 units respectively. The company wants to ship 45 units to a distribution center
in Dallas, 20 to Atlanta, 30 to San Francisco, and 30 to Philadelphia. The unit production and distribution
costs from each plant to each distribution center are given in Table E8.3. What is the best shipping strategy
to follow?
The linear-programming formulation of the corresponding transportation problem is:
subject to:
xi j 0 (i=1,2,3; j=1,2,3,4).
Because there is no ambiguity in this case, the same numbers normally are used to designate the origins and
destinations. For example, x11 denotes the flow from source 1 to destination 1, although these are two distinct
nodes. The network corresponding to this problem is given in Fig. 8.2.
subject to:
n
X
xi j = 1 (i = 1, 2, . . . , n),
j=1
Xn
xi j = 1 ( j = 1, 2, . . . , n),
i=1
xi j = 0 or 1 (i = 1, 2, . . . , n; j = 1, 2, . . . , n).
The first set of constraints shows that each person is to be assigned to exactly one job and the second set of
constraints indicates that each job is to be performed by one person. If the second set of constraints were
multiplied by minus one, the equations of the model would have the usual network interpretation.
As stated, this assignment problem is formally an integer program, since the decision variables xi j are
restricted to be zero or one. However, if these constraints are replaced by xi j 0, the model becomes a special
case of the transportation problem, with one unit available at each source (person) and one unit required by
each destination (job). As we shall see, network-flow problems have integer solutions, and therefore formal
specification of integrality constraints is unnecessary. Consequently, application of the simplex method, or
most network-flow algorithms, will solve such integer problems directly.
v
if i = s (source),
X X
xi j xki = v if i = t (sink),
j k 0 otherwise,
0 xi j u i j (i = 1, 2, . . . , n; j = 1, 2, . . . , n).
As usual, the summations are taken only over the arcs in the network. Also, the upper bound u i j for the flow
on arc i j is taken to be + if arc i j has unlimited capacity. The interpretation is that v units are supplied
at s and consumed at t.
Let us introduce a fictitious arc ts with unlimited capacity; that is, u ts = +. Now xts represents the
variable v, since xts simply returns the v units of flow from node t back to node s, and no formal external
supply of material occurs. With the introduction of the arc ts, the problem assumes the following special
form of the general network problem:
Maximize xts ,
subject to:
X X
xi j xki = 0 (i = 1, 2, . . . , n),
j k
8.2 Special Network Models 233
Figure 8.3
0 xi j u i j (i = 1, 2, . . . , n; j = 1, 2, . . . , n).
Let us again consider a simple example. A city has constructed a piping system to route water from a lake
to the city reservoir. The system is now underutilized and city planners are interested in its overall capacity.
The situation is modeled as finding the maximum flow from node 1, the lake, to node 6, the reservoir, in the
network shown in Fig. 8.3.
The numbers next to the arcs indicate the maximum flow capacity (in 100,000 gallons/day) in that section
of the pipeline. For example, at most 300,000 gallons/day can be sent from node 2 to node 4. The city now
sends 100,000 gallons/day along each of the paths 1246 and 1356. What is the maximum capacity of
the network for shipping water from node 1 to node 6?
subject to:
X X 1
if i = s (source),
xi j xki = 0 otherwise,
j k 1 if i = t (sink)
As an elementary illustration, consider the example given in Fig. 8.4, where we wish to find the shortest
distance from node 1 to node 8. The numbers next to the arcs are the distance over, or cost of using, that arc.
For the network specified in Fig. 8.4, the linear-programming tableau is given in Tableau 1.