Lecture 20
Lecture 20
1
The Transportation Model
1. The transportation model is a special class of
LPPs that deals with transporting(=shipping) a
commodity from sources (e.g. factories) to
destinations (e.g. warehouses).
2. The objective is to determine the shipping
schedule that minimizes the total shipping cost
while satisfying supply and demand limits.
3. We assume that the shipping cost is proportional
to the number of units shipped on a given route.
2
We assume that there are m sources 1,2, …, m and n
destinations 1, 2, …, n. The cost of shipping one unit
from Source i to Destination j is cij.
We assume that the availability at source i is
ai (i=1, 2, …, m) and the demand at the destination j
is bj (j=1, 2, …, n). We make an important
assumption: the problem is a balanced one. That is
m n
a b
i 1
i
j 1
j
4
Thus the problem becomes the LPP
m n
Minimize z c ij xij
i 1 j 1
subject to
n
x
j 1
ij ai (i 1,2,..., m)
x
i 1
ij b j ( j 1,2,..., n)
xij 0
5
1. Thus there are mn decision variables xij and m+n
constraints.
2. Since the sum of the first m constraints equals the sum
of the last n constraints (because the problem is a
balanced one), one of the constraints is redundant and
we can show that the other m+n-1 constraints are LI.
3. Thus any BFS will have only m+n-1 nonzero
variables.
4. Though we can solve the above LPP by Simplex
method, we solve it by a special algorithm called the
transportation algorithm.
5. We present the data in an mn tableau as explained
below. 6
Destination
1 2 . . n Supply
c11 c12 c1n
1 a1
S
o c21 c22 c2n
2 a2
u
r .
c .
e
m cm1 cm2 cmn
am
Demand b1 b2 bn
7
Formulation of Transportation Models
Example 5.1-2
MG Auto has three plants in Los Angeles, Detroit, and
New Orleans, and two major distribution centers in
Denver and Miami. The capacities of the three plants
during the next quarter are 1000, 1300 and 1200 cars. The
quarterly demands at the two distribution centers are
2300 and 1400 cars. The transportation cost per car from
Los Angeles to Denver and Miami are $80 and $215
respectively. The corresponding figures from Detroit and
New Orleans are 100, 108 and 102, 68 respectively.
8
Formulate the transportation Model.
14
Destination
Distribution Area
S 1 2 3 Supply
o 12 18 M
1 6
u 30 10 8
r Refinery 2 5
c 20 25 12
3 8
e
Demand 4 8 7
20
Problem 8.1-9 from Hillier and Lieberman
(Introduction to Operations Research, 7th Edition)
The Build-Em-Fast Company has agreed to supply
its best customer with three widgets during each of
the next 3 weeks, even though producing them will
require some overtime work. The relevant
production data are as follows:
Week Max Production Max Production Prod Cost / unit
Regular Time Overtime Regular Time
1 2 2 $300
2 3 2 $500
3 1 2 $400 21
The cost / unit produced overtime for each week is
$100 more than for regular time. The cost of storage
is $50 / unit for each week it is stored. There is
already an inventory of 2 widgets on hand currently,
but the company does not want to retain any widgets
in inventory after the 3 weeks.
Formulate the problem as a transportation problem.
Demand 1 3 3 5
26
Determination of Starting
Basic Feasible Solution
27
Determination of the starting Solution
• In any transportation model we determine a starting
BFS and then iteratively move towards the optimal
solution which has the least shipping cost.
• As mentioned earlier, any BFS will have only m+n-1
basic variables (which may assume non-zero =positive
values) and the remaining variables will all be non-
basic and so have zero values.
• In any transportation tableau, we only indicate the
values of basic variables. The cells corresponding to
non-basic variables will be blank.
28
Degenerate BFS
If in a cell we find a zero mentioned, it means that
that cell corresponds to a basic variable which
assumes a value of zero.
In simplex language, we say that we have a
degenerate BFS.
29
NORTH-WEST Corner Method for
determining a starting BFS
• The method starts at the north-west corner cell
(i.e. cell (1,1)).
• Step 1. We allocate as much as possible to the
selected cell and adjust the associated amounts
of supply and demand by subtracting the
allocated amount.
• Step 2. Cross out the row (column) with zero
supply (zero demand) to indicate that no further
assignments can be made to that row(column).
30
• If both a row and a column are
simultaneously satisfied then
• If exactly one row or column is left uncrossed
make the obvious allocations and stop. Else
cross out one only (either the row or the
column) and leave a zero supply(demand) in the
uncrossed out row(column).
• Step 3. If no further allocation is to be made,
stop. Else move to the cell to the right (if a
column has just been crossed out) or to the cell
below if a row has just been crossed out. Go to
Step 1.
31
Consider the transportation tableau:
Destination
1 2 3 4 Supply
3 7 6 4
1 52
3 2
Source 2 4 3 2
2 1 1 21
4 3 8 5
3 1 2 3 2
Demand 3 3 1 2 1 2
34
Consider the transportation tableau:
Destination
1 2 3 4 Supply
3 7 6 4
1 1 0 2 2 54 2
Source 2 4 3 2
2 2 2
4 3 8 5
3 3 3
Demand 3 1 3 0 2 2
37
Destination
1 2 3 4 Supply Row Penalties
3 7 6 4
1 3 0 0 2 5 1 1
S
o 2 4 3 2
2 2 2 0 -
u
r 4 3 8 5
3 3 3 1 1
c
e Demand
3 3 0 20 2
1 1 3 2
Column
Penalties 1 4 - 1
39
Iterative computations of the Transportation
algorithm
• After determining the starting BFS by any one of
the three methods discussed earlier, we use the
following algorithm to determine the optimum
solution
• Step1: Use the Simplex optimality condition to
determine the entering variable as a current non-
basic variable that can improve the solution. If the
optimality condition is satisfied by all non-basic
variables, the current solution is optimal and we
stop. Otherwise we go to Step 2.
40
Step 2. Determine the leaving variable using the
Simplex feasibility condition. Change the basis
and go to Step 1.
44
Destination
Starting Tableau Total Cost =48
v1=3 v2=7 v3=6 v4=3 Supply
3 7 6 4
S u1=0 5
3 2 0 -1
o
2 4 3 2
u u2= -3 1 1 2
r -2 -2
c 4 3 8 5
u3= 2 1 2 3
e 1 6
Demand 3 3 2 2
Demand 3 3 2 2
49
Destination
Start of Iteration 2 Total Cost =42
v1=3 v2=7 v3=12 v4=9 Supply
3 7 6 4
S u1=0 3 2 5
o 6 5
2 4 3 2
u u2= -9 2 2
r -8 -6 -2
c 4 3 8 5
u3= -4 1 0 2 3
e -5
Demand 3 3 2 2
51
Destination
Start of Iteration 3 Total Cost =42
v1=3 v2=7 v3=6 v4=9 Supply
3 7 6 4
S u1=0 3 2 0 5
o 5
2 4 3 2
u u2= -3 2 2
r -2 0 4
c 4 3 8 5
u3= -4 1 2 3
e -5 -6
Demand 3 3 2 2
v3=6 u2= -9
Thus the closed loop is
(1,4) (1,2) (2,3) (3,4) (1,4)
54
Thus will become 2 and in the process both the
basic variables x12 and x32 will become
simultaneously zero. Since only one of them should
leave the basis we make x32 leave the basis and
keep x12 in the basis but with value zero. Also x32
becomes 3. Thus the transportation cost reduces by
1*2+4*2=10 and we say third iteration is over. The
resulting new tableau is on the next slide.
55
Destination
Start of Iteration 4 Total Cost =32
v1=3 v2=7 v3=6 v4=4 Supply
3 7 6 4
S u1=0 3 0 0 2 5
o
2 4 3 2
u u2= -3 2 2
r -2 0 -1
c 4 3 8 5
u3= -4 3 3
e -5 -6 -5
Demand 3 3 2 2
57
1 2 3
1 1 2 1 20
2 3 4 5 40
3 2 3 3 30
30 20 20
To balance the problem, we introduce a dummy
destination with transportation costs
$5, $M, $3 respectively.
1 1 2 2
Column
Penalties 1 1 - M-3
1 1 - -
- 1 - -
Total shipping cost = 240
59
Destination
Starting Tableau Total Cost =240
v1=2v2=3 v3=3 v4=3 Supply
1 2 1 5
S u1=-2 20 20
o -1 -1 -4
3 4 5 M
u u2= 1 30 10 40
r -1 4-M
c 2 3 3 3
u3= 0 10 0 20 30
e 0
Demand 30 20 20 20
61
given by u1 = -2, u2 = 3, u3 = 5, v1 = 2, v2 =
5, and v3 = 10.
(a) Find the associated optimal cost
(b) Determine the smallest values of cij
associated with each non-basic variable
that will maintain the optimality of the
northwest corner solution.
62
Supply
v1=2 v2=5 v3=10
0 15 ≥3 ≥8 15
u1=-2
5 8 ≥13 30
u2=3 5 25
25
≥7 10 15 80
85
5
u3=5
Demand
20 5 30 5 80
63
Problem 8.1-6 Page 393 Hillier and Lieberman
(Operations Research 7th Edition)
The Onenote Co. produces a single product at
three plants for four customers. The three plants
will produce 60, 80, and 40 units respectively. The
firm has made a commitment to sell 40 units to
customer 1, 60 units to customer 2, and at least 20
units to customer 3. Both customers 3 and 4 also
want to buy as many of the remaining units as
possible. The net profit associated with shipping a
unit from plant i to customer j is given by the
following table. 64
Customer
1 2 3 4
1 $800 $700 $500 $200
Plant 2 $500 $200 $100 $300
3 $600 $400 $300 $500
2 3 2 2
1 - 2 2
- - 2 2
- - 3 5
68
Destination
v1= -9 v2= -7 v3= -5 v4= -7
u1= 0 -8 -7 -5 -2
S -1 60 0 -5
u2= 4 -5 -2 -1 -3
o
u 40 -5 0 40
r -6 -4 -3 -5
u3= 2 20 20
c -1 -9
e M M 0 0
u4= 5 60
-4-M -2-M -2
70
If each task is to be allocated to a person (i.e. no
splitting of the task between 2 or more persons is
allowed) and if each person can be assigned at most
two tasks, find the optimum allocation of the jobs to
the persons to minimize the total time taken to
complete all the 4 tasks.
This can be formulated as a transportation model with
three sources (persons) and 4 destinations (tasks). The
demands at the three destinations are bj = 1 for
j=1,2,3,4. But the availabilities are ai = 2 for i=1, 2, 3
as each person can be assigned a maximum of two
tasks. Thus to balance the problem, we introduce a
dummy task with demand 2 and time 0. Thus we get
the starting tableau: 71
Destination
Starting Tableau
1 2 3 4 Dummy Supply
S
o 1 4 11 2 1 6 0 2 1 1 1 3
u 2 6 4 3 5 0 2 2 3 - -
r
c 3 5 1
2 0
6 4 1 0 0 2 2 22
e
Demand 1 1 0 1 1 2 0
1 1 1 1 0
1 1 4 2 -
1 1 - 2 -
72
Destination
Starting Tableau
v1=5 v2=2 v3=3 v4=4 v5=0 Supply
S 4 1 2 6 0
o u1= -1 1 1 2
0 -3 -1
u
6 4 3 5 0
r u2= 0 2 2
c -1 -2 0 -1
e 5 2 6 4 0
2
0
u3= 0 1 0 1
-3
Demand 1 1 1 1 2