Operations research 1-06

Operations research 1-06
Transportation Problem
Introduction
Consider m sources V1, V2, ...Vm producing goods
and n destinations S1, S2, ...Sn consuming goods.
V1 has capacity...
a1 (units of goods)
V2 has capacity...
a2 (units of goods)
...
Vm has capacity...
am (units of goods)
S1 demands
b1 (units)
S2 demands
b2 (units)
........
Sn demands
Let
xij
bn (units)
i = 1,2,K, m
j = 1,2,K, n
be the amount of goods transported from Vi to Sj and
cij
be the cost of transporting one unit of goods from Vi to Sj
The cost of transportation from Ai (i=1, ..m) to Bj (j=1, ..n) is
then equal to
c11 x11 + c12 x12 + K + cmn xmn
subject to (the following conditions):
x + x +K + x = a
x + x +K + x = a
M
M
M
M
M
x + x +K + x = a
x + x +K + x
=b
x + x +K + x
=b
M
M
M
M
M
x + x + K + x x = ≥b 0
11
12
1n
1
21
22
2n
2
m1
m2
mn
m
11
21
m1
1
12
22
m2
2
1n
2n
mn
ij
n
m
∑ ai = a1 + a2 + K + am
i =1
n
∑ bi = b1 + b2 + K + bn
units of produced goods
units of demanded goods
i =1
m
n
∑ ai = ∑ b j
i =1
j =1
m
n
∑ ai ≠ ∑ b j
i =1
j =1
balanced problem
non-balanced problem
If
m
n
i =1
j =1
∑ ai < ∑ b j
the demand is greater than the production
we add a virtual producer Vi+1 with capacity
n
m
j =1
i =1
ai +1 = ∑ b j − ∑ ai
and with zero transportation cost
ci +1, j = 0
j = 1,2,K, n
And if
m
n
i =1
j =1
∑ ai > ∑ b j
the production is greater than the demand
we add a virtual consumer Sj+1 with demand
m
n
i =1
j =1
b j +1 = ∑ ai − ∑ b j
and with zero transportation cost
ci , j +1 = 0
i = 1,2,K, m
From now on, we may assume that the transportation problem
is always balanced !
Definition (Transportation Problem)
i = 1,2,K m
j = 1,2,K n
xij ,
Find the values of
that minimize the function
m n
∑ ∑ cij xij
z=
i =1 j =1
m
subject to:
∑ xij
= ai
∑ xij
= bj
j =1
n
i =1
xij ≥ 0
where
m
n
i =1
j =1
∑ ai = ∑ b j
Theorem: The Transportation Problem has a Feasible Solution (FS)
Proof: We show that
where
xij =
ai ⋅ b j
A
m
n
i =1
j =1
A = ∑ ai = ∑ b j
is feasible solution to the Transportation Problem.
Remark: We have a Linear Programming problem with m × n
variables and m + n conditions
Theorem: The Transportation Problem has an optimal solution.
The dual problem
Find variables
that maximize
subject to:
i = 1,2,...m
j = 1,2,...n
ui, vj
m
n
i =1
j =1
z = ∑ ai ui + ∑ b j v j
ui + v j ≤ cij
i = 1,2,...m
j = 1,2,...n
Properties of the Transportation Problem
¾all variables have two indices
¾the number of variables is n × m
¾the number of conditions is m + n
¾the rank of the matrix is m + n − 1
¾always has a feasible solution
¾different optimal solutions have the same value of the
objective function
Solving the Transportation Problem
1. Initialize a basic feasible solution
2. Test for optimality – if solution is optimal, then STOP
3. Find a new basic feasible solution
4. Go to step 2.
Formal procedure
The matrix of transportation costs
⎛ c11 c12
⎜c
C = ⎜ 21 c22
M
⎜ M
⎝ cm1 cm 2
K c1n ⎞
K c2 n ⎟
⎟
O M ⎟
K cmn ⎠
To find a solution, we construct the following table
V1
V2
M
Vm
S1
x11
x21
M
xm1
b1
S2
x12
x22
M
xm 2
b2
K Sn
K x1n
K x2 n
O M
K xmn
L bn
If xij>0, then xij is a basic variable.
a1
a2
M
am
Methods of obtaining the Initial Basic Feasible Solution
9 North-West corner rule
9 Lowest cost entry method
9 Vogel’s approximation method
North-West corner rule
Given
a1 , a2 ,K am
and
b1 , b2 ,Kbn
we construct a table with (m+1) rows and (n+1) columns.
We assign to the cell (1,1) a basic variable
x11 = min{a1 , b1}
If x11= a1, then
x12 = x13 = K = x1n = 0
we decrease b1 by a1 and continue with the cell (2,1)
If x11= b1, then
x21 = x31 = K = xm1 = 0
we decrease a1 by b1 and continue with the cell (1,2)
after m+m-1 steps we fill the whole table
Example
Find a basic feasible solution to the following transportation
problem using the North-West corner rule:
a1 = 2, a2 = 4, a3 = 7
b1 = 3, b2 = 2, b3 = 4, b4 = 2, b5 = 2
Solution:
2
4
7
3
2
4
2
2
13
2
0
0
0
0
2
4
7
3-2
2
4
2
2
13
2
0
0
0
0
0
1
4-1
0
7
0
2
4
2
2
13
2
0
0
1
2
3-2
0
0
7
0
0
4
0
2
0
2
0
13
2
0
0
0
0
0
1
2
1
0
0
0
0
0
0
0
7
4-1
2
2
13
2
0
0
0
0
0
1
2
1
0
0
0
0
0
3
0
0
0
7-3
2
2
13
2
0
0
0
0
0
1
2
1
0
0
0
0
0
3
2
0
0
0
0
4-2
2
13
2
0
0
0
0
0
1
2
1
0
0
0
0
0
3
2
2
2-2
0
0
0
0
2-2
13
2
0
0
0
0
0
1
2
1
0
0
0
0
0
3
2
2
0
0
0
0
0
0
13
We found a solution.
2
0
0
0
0
2
1
2
1
0
0
4
0
0
3
2
2
7
3
2
4
2
2
13
Example
Find a basic feasible solution to the following transportation
problem using the North-West corner rule
a1 = 3, a2 = 4, a3 = 7
b1 = 1, b2 = 3, b3 = 3, b4 = 2, b5 = 5
1
2
0
0
0
3
0
1
3
0
0
4
0
0
0
2
5
7
1
3
3
2
5
14
Solution:
This solution is “degenerate”!
Lowest cost entry method
1. We construct the initial table for the transportation problem
2. First we find the cell in the i-th row and the j-th column with
the smallest value cij and occupy the cell with min{ai,bj}. If
there are more choices, we break ties arbitrarily.
3. We decrease the capacity of the corresponding row (column)
by the occupied value. Each row (column), whose capacity
we exhaust, is excluded from further calculations.
4. If we exhausted the capacities of all rows (columns), we stop.
5. Otherwise we go back to step 2.
Vogel’s approximation method (VAM)
1. We construct the initial table for the transportation problem.
2. For each row (or column) we compute the differential,
that is, the difference between the smallest and the second smallest
value cij in the row (column). We write the differentials around the
edges of the table in the corresponding rows (columns).
3. In the row (column) with the largest differential, we find the cell
with the smallest value of cij and occupy it with the value min{ai,bj}
4. We decrease the capacity of the corresponding row (column) by the
occupied value. Each row (column), whose capacity we exhaust, is
removed from further calculations.
.
5. If we exhausted all rows (columns), we stop.
6. Otherwise we go back to step 2.
Note: These methods also take into account the transportation
costs. So for the calculation using the table, we consider the
cells of the table to be of the form:
cij
xij
Example 01
Find a feasible solution to the following transportation
problem using the Lowest Cost Entry method and VAM:
⎛ 7 5 4 3 2⎞
⎟
⎜
C = ⎜ 6 5 3 5 4⎟
⎜ 2 7 4 6 3⎟
⎝
⎠
a1=20, a2=40, a3=80, b1= 10, b2= 20, b3 = 10, b4 =40, b5= 60
S1
7
S2
5
S3
4
S4
3
S5
2
V1
20
6
5
3
5
4
V2
40
2
7
4
6
3
V3
80
10
20
10
40
60
S1
7
V1
S2
5
6
S3
4
5
S4
3
3
S5
2
5
20
0
4
V2
40
2
7
4
6
3
V3
80
10
20
10
40
40
S1
7
V1
5
6
V2
S3
4
5
S4
3
3
S5
2
5
20
40
7
4
6
3
70
10
0
0
4
2
V3
S2
20
10
40
40
S1
7
V1
5
6
V2
S3
4
5
3
3
S5
2
5
20
4
10
30
6
3
70
20
0
0
4
10
7
0
S4
-
2
V3
S2
40
40
S1
7
V1
5
6
V2
S3
4
5
3
3
S5
2
5
4
10
6
0
0
-
30
40
30
3
20
20
4
10
7
0
S4
-
2
V3
S2
40
0
S1
7
V1
5
6
V2
S3
4
5
2
V3
S2
3
3
20
7
S4
S5
2
5
6
10
-
-
0
0
0
0
-
10
40
30
4
10
4
20
3
40
0
S1
7
V1
5
6
V2
S3
4
5
2
V3
S2
3
3
20
7
S4
2
5
10
4
-
-
0
0
0
20
0
-
0
40
30
4
10
6
10
S5
3
30
0
S1
7
V1
5
6
V2
S3
4
5
2
V3
S2
3
3
20
7
S4
2
5
10
4
S5
20
0
-
0
0
4
10
6
3
10
-
-
30
40
0
0
0
0
0
c= 2×20+5×20+3×10+5×10+2×10+6×30+4×30 = 540
Test of optimality
We may assume that the given solution is basic, i.e., exactly m+n−1
cells is occupied. If this is not the case, we artificially occupy some
cells with zero values so as to obtain this number of cells.
1. First we compute the so-called row and column numbers vi and uj
that satisfy the following condition:
cij = vi + u j
for all the occupied cells.
2. Based on the values of vi and uj , we compute the substitute
costs for unoccupied cells defined as follows:
cij′ = ui + v j
Theorem: If each unoccupied cell (i,j) satisfies
cij′ − cij ≤ 0,
then the solution is optimal.
Improving the solution
Suppose that the solution is not optimal, i.e.
cij′ − cij > 0,
for some i, j.
Then there exists a cell (i0, j0) for which the difference
ci′0 j0 − ci0 j0 ≥ cij′ − cij
attains the maximum value.
We occupy this cell with a value t and we perform a
change of basic variables by adding or subtracting t in the
appropriate corresponding cells.
To obtain another basic solution, we choose t so that some
occupied cell becomes unoccupied.
Since the variables must be non-negative, we choose
t = min{xij }
which is minimized over those i, j for which we subtracted
the value t.
Claim: The new solution is decreased by the value
(c′ − c )⋅ t
ij
ij
We write the corresponding values to the cells as follows:
cij
c´ij
xij
c´ij- cij
Example
Find an optimal solution to the problem from Example 1 based
on the initial basic feasible solution found by the North-West
corner method.
Initial basic solution – NW corner method
S1
7
V1
S2
5
10
6
S3
4
3
2
5
20
3
10
7
5
10
4
V3
4
20
6
20
10
40
3
20
10
S5
10
V2
2
S4
40
60
60
80
Optimal solution
S1
7
S2
-1 5
S3
S4
3 4
13
V1
S5
2
0
20
-8
1 5
6
V2
-2
-3
3
20
5
10
-2
2
4
10
-5
2
V3
-2
7
6 4
4 6
10
3
10
-1
10 0 20 4
20
1
40
2
60
0
10
-1
2 40 4 60 1
80