The Transportation Problem: LP Formulations

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

The Transportation Problem: LP Formulations

An LP Formulation
Suppose a company has m warehouses and n retail outlets. A single product is to be shipped
from the warehouses to the outlets. Each warehouse has a given level of supply, and each
outlet has a given level of demand. We are also given the transportation costs between every
pair of warehouse and outlet, and these costs are assumed to be linear. More explicitly, the
assumptions are:
The total supply of the product from warehouse i is ai , where i = 1, 2, . . ., m.
The total demand for the product at outlet j is bj , where j = 1, 2, . . ., n.
The cost of sending one unit of the product from warehouse i to outlet j is equal to
cij , where i = 1, 2, . . ., m and j = 1, 2, . . ., n. The total cost of a shipment is linear
in the size of the shipment.
The problem of interest is to determine an optimal transportation scheme between the
warehouses and the outlets, subject to the specified supply and demand constraints.
Graphically, a transportation problem is often visualized as a network with m source nodes,
n sink nodes, and a set of m n directed arcs. This is depicted in Figure TP-1.
We now proceed with a linear-programming formulation of this problem.
The Decision Variables
A transportation scheme is a complete specification of how many units of the product should
be shipped from each warehouse to each outlet. Therefore, the decision variables are:
xij = the size of the shipment from warehouse i to outlet j, where i = 1, 2, . . ., m and
j = 1, 2, . . ., n.
This is a set of m n variables.
The Objective Function
Consider the shipment from warehouse i to outlet j. For any i and any j, the transportation
cost per unit is cij ; and the size of the shipment is xij . Since we assume that the cost function
is linear, the total cost of this shipment is given by cij xij . Summing over all i and all j now

yields the overall transportation cost for all warehouse-outlet combinations. That is, our
objective function is:
Minimize

m X
n
X

cij xij .

i=1 j=1

The Constraints
Consider warehouse i. The total outgoing shipment from this warehouse is the sum xi1 +
P
xi2 + + xin . In summation notation, this is written as nj=1 xij . Since the total supply
from warehouse i is ai , the total outgoing shipment cannot exceed ai . That is, we must
require
n
X

xij ai ,

for i = 1, 2, . . . , m.

j=1

Consider outlet j. The total incoming shipment at this outlet is the sum x1j +x2j + +xmj .
P
In summation notation, this is written as m
i=1 xij . Since the demand at outlet j is bj , the
total incoming shipment should not be less than bj . That is, we must require
m
X

xij bj ,

for j = 1, 2, . . . , n.

i=1

This results in a set of m + n functional constraints. Of course, as physical shipments, the


xij s should be nonnegative.
LP Formulation
In summary, we have arrived at the following formulation:
Minimize

m X
n
X

cij xij

i=1 j=1

Subject to:
n
X
j=1
m
X

xij

ai

for i = 1, 2, . . . , m

xij

bj

for j = 1, 2, . . . , n

i=1

xij 0

for i = 1, 2, . . . , m and j = 1, 2, . . . , n.

This is a linear program with m n decision variables, m + n functional constraints, and


m n nonnegativity constraints.
2

A Numerical Example
In an actual instance of the transportation problem, we need to specify m and n, and replace
the ai s, the bj s, and the cij s with explicit numerical values.
As a simple example, suppose we are given: m = 3 and n = 2; a1 = 45, a2 = 60, and
a3 = 35; b1 = 50 and b2 = 60; and finally, c11 = 3, c12 = 2, c21 = 1, c22 = 5, c31 = 5, and
c32 = 4. Then, substitution of these values into the above formulation leads to the following
explicit problem:
Minimize
Subject to:

3x11 +2x12 +x21 +5x22 +5x31 +4x32


x11

+x12
x21

x11

x31
+x31

+x21
x12

xij 0

+x22

+x22

+x32
+x32

45
60
35
50
60

(1)
(2)
(3)
(4)
(5)

for i = 1, 2, 3 and j = 1, 2.

For an example of an explicit transportation scheme, let x11 = 20, x12 = 20, x21 = 20,
x22 = 20, x31 = 10, and x32 = 20. It is easily seen that this proposed solution satisfies
all of the constraints, and hence it is feasible. In words, the solution calls for shipping 20
units from warehouse 1 to outlet 1, 20 units from warehouse 1 to outlet 2, 20 units from
warehouse 2 to outlet 1, . . ., and finally 20 units from warehouse 3 to outlet 2. The total
transportation cost associated with this transportation scheme can be computed as:
3 20 + 2 20 + 1 20 + 5 20 + 5 10 + 4 20 = 350.

An Equivalent Formulation
To derive an optimal transportation scheme for the above example, we can of course apply
the standard Simplex algorithm. This means that we will first introduce 3 slack variables for
constraints (1), (2), and (3) and 2 surplus variables for constraints (4) and (5), to convert
these inequalities into equalities. On top of these, at the onset of Phase I, we also need to
introduce 2 more artificial variables to serve as starting basic variables for constraints (4)
and (5). We would then go through Phase I and Phase II to arrive at an optimal solution.
This routine is standard fare, but the introduction of so many new variables seems tedious.
Can we do better? It turns out that we can.
The first observation is that for a given problem to have any feasible solution, the total
supply must not be less than the total demand. In this numerical example, we have a total
3

supply of 140 and a total demand of 110. Hence, feasible solutions exist; and indeed, we
constructed one with ease. The second observation is that if the total supply happens to
be equal to the total demand, then any feasible solution must satisfy all of the inequality
constraints as equalities. (For example, this would be the case if a1 , a2 , and a3 had been
40, 40, and 30, respectively.) As a consequence, whenever the given total supply and total
demand are the same, we can replace all (functional) inequality constraints by equality
constraints. Our third, and final, observation is that after such replacements, there is no
longer any need for introducing slack or surplus variables.
Certainly, we cannot expect every problem to come with identical total supply and total
demand. However, notice that if the total supply is strictly greater than the total demand,
then one can artificially create a dummy sink to absorb the difference between the two. Of
course, in order to preserve the original cost structure, the transportation cost for units sent
to the dummy sink should be set to zero. Thus, for this specific example, we can introduce
a third outlet to serve as the dummy sink; and let b3 = 30 and c13 = c23 = c33 = 0. This
yields the following new linear program:
Minimize
3x11 +2x12
+x21 +5x22
+5x31 +4x32
Subject to:
x11 +x12 +x13
x21 +x22 +x23
x31 +x32 +x33
x11
+x21
+x31
x12
+x22
+x32
x13
+x23
+x33
xij 0

=
=
=
=
=
=

45
60
35
50
60
30

for i = 1, 2, 3 and j = 1, 2, 3.

It should be clear that by construction, this problem is equivalent to the original one.
With the above discussion, we can now assume without loss of generality that every transportation problem comes with identical total supply and total demand. This gives rise
to what is called the standard form of the transportation problem. Formally, under the
assumption that
m
X

ai =

i=1

n
X
j=1

bj

holds, the standard form of the transportation problem is:


Minimize

m X
n
X

cij xij

i=1 j=1

Subject to:
n
X
j=1
m
X

xij

= ai

for i = 1, 2, . . . , m

xij

= bj

for j = 1, 2, . . . , n

i=1

xij 0

for i = 1, 2, . . . , m and j = 1, 2, . . . , n.

Can we also do away with the need for introducing artificial variables? The answer again
is a yes. However, we will delay this discussion a little bit.

The Transportation Tableau


The Simplex tableau serves as a very compact format for representing and manipulating
linear programs. In the same spirit, we now introduce a tableau representation for transportation problems that are in the standard form.
For a problem with m sources and n sinks, the tableau will be a table with m rows and
n columns. Specifically, each source will have a corresponding row; and each sink, a corresponding column. For ease of reference, we shall refer to the cell that is located at the
intersection of the ith row and the jth column as cell (i, j). Parameters of the problem
will be entered into various parts of the table in the format below.

Source i

Sink j
..
.
..
.
cij
xij
..
.
..
.
bj

ai

That is, each row is labelled with its corresponding source name at the left margin; each
column is labelled with its corresponding sink name at the top margin; the supply from
source i is listed at the right margin of the ith row; the demand at sink j is listed at the
bottom margin of the jth column; the transportation cost cij is listed in a subcell located
5

at the upper-left corner of cell (i, j); and finally, the value of xij is to be entered at the
lower-right corner of cell (i, j).
Again, we will use the numerical example above to illustrate the just-described format.
With the introduction of a dummy sink to balance the total supply and total demand, this
problem has three sources and three sinks. Therefore, the parameters of the problem can
be specified in the explicit 3 3 tableau below.

1
3

Sinks
2
3
2
0

45
1

Sources

60
5

50

60

30

35

Notice that we have left the spaces for the xij s blank; these will be filled in later, when we
begin the solution process. As a specific example, the feasible solution x11 = 20, x12 = 20,
x13 = 5, x21 = 20, x22 = 20, x23 = 20, x31 = 10, x32 = 20, and x33 = 5 would be entered as
in the tableau below.

1
3
1

20
1

Sources

20
5

10
50

Sinks
2
2
20
5
20
4
20
60

3
0
5

45

20

60

35

0
0
30

All transportation problems in the standard form will henceforth be specified in this compact
tableau format.

Discussion
In most applications, the shipments are integer-valued. We have ignored this requirement
in our formulation. However, it will turn out that if the specified ai s and bj s are integers,
then the optimal solution of a transportation problem produced by the Simplex algorithm
also is integer-valued.
6

In applications where an oversupply exists, it is often desirable to assume that there is


an inventory-holding cost for units that are not shipped out. If this is the case, then we
can easily accommodate the inventory-holding costs as part of the objective function by
reinterpreting them as transportation costs to the dummy sink.
When the total supply is less than the total demand, it is still possible to create a balanced
transportation problem. The idea is to create a dummy source and let it have a supply that
equals the difference between the total demand and the total supply. In doing so, it may be
reasonable to assess a shortage penalty cost for units that are sent (fictitiously) from the
dummy source to any sink.

You might also like