Sunteți pe pagina 1din 49

Operations research 1-06

Transportation Problem
Introduction
Consider m sources V
1
, V
2
, ...V
m
producing goods
and n destinations S
1
, S
2
, ...S
n
consuming goods.
V
1
has capacity... a
1
(units of goods)
V
2
has capacity... a
2
(units of goods)
...
V
m
has capacity... a
m
(units of goods)
S
1
demands b
1
(units)
S
2
demands b
2
(units)
........
S
n
demands b
n
(units)
Let ij
x
m i , , 2 , 1 K =
n j , , 2 , 1 K =
be the amount of goods transported from V
i
to S
j
and
c
ij
be the cost of transporting one unit of goods from V
i
to S
j
The cost of transportation from A
i
(i=1, ..m) to B
j
(j=1, ..n) is
then equal to
mn mn
x c x c x c + + + K
12 12 11 11
subject to (the following conditions):
n mn n n
m
m
m mn m m
n
n
b x x x
b x x x
b x x x
a x x x
a x x x
a x x x
= + + +
= + + +
= + + +
= + + +
= + + +
= + + +
K
M M M M M
K
K
K
M M M M M
K
K
2 1
2 2 22 12
1 1 21 11
2 1
2 2 22 21
1 1 12 11
0
ij
x
m
m
i
i
a a a a + + + =

=
K
2 1
1
units of produced goods
n
n
i
i
b b b b + + + =

=
K
2 1
1
units of demanded goods

= =
=
n
j
j
m
i
i
b a
1 1
balanced problem

= =

n
j
j
m
i
i
b a
1 1
non-balanced problem
If

= =
<
n
j
j
m
i
i
b a
1 1
we add a virtual producer V
i+1
with capacity

= =
+
=
m
i
i
n
j
j i
a b a
1 1
1
and with zero transportation cost
0
, 1
=
+ j i
c
n j , , 2 , 1 K =
the demand is greater than the production
And if

= =
>
n
j
j
m
i
i
b a
1 1
we add a virtual consumer S
j+1
with demand

= =
+
=
n
j
j
m
i
i j
b a b
1 1
1
and with zero transportation cost
0
1 ,
=
+ j i
c
m i , , 2 , 1 K =
the production is greater than the demand
From now on, we may assume that the transportation problem
is always balanced !
Definition (Transportation Problem)
ij
x
m i K , 2 , 1 =
n j K , 2 , 1 =

= =
=
m
i
ij
n
j
ij
x c z
1 1

=
=
m
j
i ij
a x
1

=
=
n
i
j ij
b x
1
0
ij
x

= =
=
m
i
n
j
j i
b a
1 1
Find the values of ,
that minimize the function
subject to:
where
Theorem: The Transportation Problem has a Feasible Solution (FS)
Proof: We show that
where
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.
A
b a
x
j i
ij

=

= =
= =
n
j
j
m
i
i
b a A
1 1
The dual problem

= =
+ =
n
j
j j
m
i
i i
v b u a z
1 1
Find variables
ij j i
c v u +
u
i
, v
j
i = 1,2,...m
j = 1,2,...n
that maximize
subject to: 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

=
mn m m
n
n
c c c
c c c
c c c
C
K
M O M M
K
K
2 1
2 22 21
1 12 11
n
m mn m m m
n
n
n
b b b
a x x x V
a x x x V
a x x x V
S S S
L
K
M M O M M M
K
K
K
2 1
2 1
2 2 22 21 2
1 1 12 11 1
2 1
To find a solution, we construct the following table
If x
ij
>0, then xij is a basic variable.
Methods of obtaining the Initial Basic Feasible Solution
North-West corner rule
Lowest cost entry method
Vogels approximation method
North-West corner rule
Given
n
b b b K , ,
2 1 m
a a a K , ,
2 1
and
we construct a table with (m+1) rows and (n+1) columns.
We assign to the cell (1,1) a basic variable
{ }
1 1 11
, min b a x =
If x
11
= a
1
, then
0
1 13 12
= = = =
n
x x x K
we decrease b
1
by a
1
and continue with the cell (2,1)
If x
11
= b
1
, then 0
1 31 21
= = = =
m
x x x K
we decrease a
1
by b
1
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:
7 , 4 , 2
3 2 1
= = = a a a
2 , 2 , 4 , 2 , 3
5 4 3 2 1
= = = = = b b b b b
Solution:
13 2 2 4 2 3
7
4
2
13 2 2 4 2 3-2
7
4
2 0 0 0 0 2
13 2 2 4 2 0
7 0
4-1 1
0 0 0 0 0 2
13 2 2 4 0 0
7 0 0
3-2 2 1
0 0 0 0 0 2
13 2 2 4-1 0 0
7 0 0
0 0 0 1 2 1
0 0 0 0 0 2
13 2 2 0 0 0
7-3 3 0 0
0 0 0 1 2 1
0 0 0 0 0 2
13 2 0 0 0 0
4-2 2 3 0 0
0 0 0 1 2 1
0 0 0 0 0 2
13 2-2 0 0 0 0
2-2 2 2 3 0 0
0 0 0 1 2 1
0 0 0 0 0 2
13 0 0 0 0 0
0 2 2 3 0 0
0 0 0 1 2 1
0 0 0 0 0 2
13
2
2
2
2
4
4
2
2
3
3
7
7 2 2 3 0 0
4
4 0 0 1 2 1
2
2 0 0 0 0 2
We found a solution.
Example
Find a basic feasible solution to the following transportation
problem using the North-West corner rule
7 , 4 , 3
3 2 1
= = = a a a
5 , 2 , 3 , 3 , 1
5 4 3 2 1
= = = = = b b b b b
Solution:
14
5
5
2
2
3
3
3
3
1
1
7
7 5 2 0 0 0
4
4 0 0 3 1 0
3
3 0 0 0 2 1
This solution is degenerate!
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 c
ij
and occupy the cell with min{a
i
,b
j
}. 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.
Lowest cost entry method
.
Vogels 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 c
ij
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 c
ij
and occupy it with the value min{a
i
,b
j
}
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:
x
ij
c
ij
Example 01
Find a feasible solution to the following transportation
problem using the Lowest Cost Entry method and VAM:

=
3 6 4 7 2
4 5 3 5 6
2 3 4 5 7
C
a
1
=20, a
2
=40, a
3
=80, b
1
= 10, b
2
= 20, b
3
= 10, b
4
=40, b
5
= 60
60 40 10 20 10
80
3 6 4 7 2
V
3
40
4 5 3 5 6
V
2
20
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
40 40 10 20 10
80
3 6 4 7 2
V
3
40
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
40 40 10 20 0
70 10
3 6 4 7 2
V
3
40 -
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
40 40 0 20 0
70 - 10
3 6 4 7 2
V
3
30 10 -
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
0 40 0 20 0
30 40 - 10
3 6 4 7 2
V
3
30 - 10 -
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
0 40 0 0 0
30 40 - - 10
3 6 4 7 2
V
3
10 - 10 20 -
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
0 30 0 0 0
30 40 - - 10
3 6 4 7 2
V
3
0 - 10 10 20 -
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
0 0 0 0 0
0 40 30 - - 10
3 6 4 7 2
V
3
0 - 10 10 20 -
4 5 3 5 6
V
2
0 20 - - - -
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
c= 220+520+310+510+210+630+430 = 540
Test of optimality
We may assume that the given solution is basic, i.e., exactly m+n1
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 v
i
and u
j
that satisfy the following condition:
j i ij
u v c + =
for all the occupied cells.
2. Based on the values of v
i
and u
j
, we compute the substitute
costs for unoccupied cells defined as follows:
j i ij
v u c + =

Theorem: If each unoccupied cell (i,j) satisfies


, 0

ij ij
c c
then the solution is optimal.
Improving the solution
Suppose that the solution is not optimal, i.e.
ij ij j i j i
c c c c

0 0 0 0
Then there exists a cell (i
0
, j
0
) for which the difference
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.
, 0 >

ij ij
c c
for some i, j.
To obtain another basic solution, we choose t so that some
occupied cell becomes unoccupied.
Since the variables must be non-negative, we choose
{ }
ij
x t min =
which is minimized over those i, j for which we subtracted
the value t.
Claim: The new solution is decreased by the value
( ) t c c
ij ij

We write the corresponding values to the cells as follows:


c
ij
- c
ij
x
ij
c
ij
c
ij
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.
60 40 10 20 10
80
60 20
3 6 4 7 2
V
3
40
20 10 10
4 5 3 5 6
V
2
20
10 10
2 3 4 5 7
V
1
S
5
S
4
S
3
S
2
S
1
Initial basic solution NW corner method
1 60 4 40 2 10 4 20 0 10
0 -1
80
60 10 10
2 3 6 4 4 6 7 2
V
3
-2 -5
40
10 10 20
1 2 4 5 3 5 1 6
V
2
-2 -3 -2 -8
20
20
-1 0 2 3 1 4 3 5 -1 7
V
1
S
5
S
4
S
3
S
2
S
1
Optimal solution

S-ar putea să vă placă și