ch8_student
TRANSCRIPT
-
8/7/2019 ch8_student
1/76
Chap 8.
The Transportation and
Assignment Problem
by Dr. Peitsang Wu
Department of IndustrialEngineering and Management
I-Shou University
-
8/7/2019 ch8_student
2/76
The Transportation Problem
m resources, n destination
sinumber of nit supplied by source i
djnumber of unit required by destinationj
cijtransportation cost per unit shipped from
source i to destinationj
-
8/7/2019 ch8_student
3/76
The Transportation Problem
Objectiveminimize total transportation cost
xijnumber of product shipped from source i
to destinationj
-
8/7/2019 ch8_student
4/76
The Transportation Problem
ost per unit istributed estination
n....321 upply
source
m
/
/
/
/
2
1
mnmmm
n
n
cccc
cccc
cccc
....
/
/
/
/
1/
1/
1/
1/
....
....
321
2232221
1131211
ms
s
s
/
/
/
/
2
1
emand ndddd ....321
-
8/7/2019 ch8_student
5/76
Properties of Transportation Problem
Feasible Solutions Property :
If the total supply { total demand, it meaneithersi ordj represent a bound rather than anexact requirement, in this case introduce
dummy source or dummy destination asthe slack variable.
Integer solutions property: Not onlysi and djmust be integer values. But also all the B.F.S.
have integer values.
! !! !
!!m
i
n
j
ij
m
i
n
j
ji xds
1 11 1
-
8/7/2019 ch8_student
6/76
Example: Production Scheduling
Let xjbe the number of engines to be produced inmonthj.
The problem can be formulated as the general L.P.
model.
MonthScheduled
Installations
Max
Production
Unit cost
of
production
Unit cost
of storage
1 10 25 1.08 0.0152 15 35 1.11 0.015
3 25 30 1.10 0.015
4 20 10 1.13 0.015
-
8/7/2019 ch8_student
7/76
Formulate as Transportation Problem
si: production of jet engines in month i
(i =1.4)
dj: installation of jet engines in monthj(j =1.4)
xij: number of engines produced in month i
for installation in monthjcij: cost associated with each unit ofxij
-
8/7/2019 ch8_student
8/76
Formulate as Transportation Problem
Supply is not fixed quantities.
Cost per unit distributed
Destination Supply
1 2 3 4
source
1
2 ?
3 ? ?4 ? ? ?
Demand
-
8/7/2019 ch8_student
9/76
Formulate as Transportation Problem
In fact x11+x12+x13+x14e 25
x21+x22+x23+x24e 35
x31+x32+x33+x34e 30
x41+x42+x43+x44e 10
And notice that
i.e. total supply {total demand)+ + + = = supply+ + + = = demand
total supply - total demand =
{ 0demandSupply
-
8/7/2019 ch8_student
10/76
Solution
Use Big-Mmethod and introduce a new dummy
destination d5
Cost per unit distributed
Destination Supply
51 2 3 4
source
1 1.080 1.095 1.110 1.125 0 25
2 M 1.110 1.125 1.140 0 353 M M 1.100 1.115 0 30
4 M M M 1.130 0 10
Demand 10 15 25 20 30
-
8/7/2019 ch8_student
11/76
Example: Distribution of Water Resources
Cost per Acre Foot
Supply
BerdooLos
Devils
San
Go
Holly
glass
Colombo
River16 13 22 17 50
Sacron River 14 13 19 15 60
Calorie River 19 20 23 - 50
Min needed 30 70 0 10
requested 50 70 30 g
-
8/7/2019 ch8_student
12/76
Example: Distribution of Water Resources
Observations:
upper bound for Holly glass:
i.e. Holly glass can get as much as units.
Demand: bounded variables not constant.
regard less the minimum need, the demandis fixed.
now
pexcess demand.
-
8/7/2019 ch8_student
13/76
1 2 3 4 Supply
Colombo 16 13 22 17 50Sacron 14 13 19 15 60
Calorie 19 20 23 M 50
dummy 0 0 0 0 50demand 50 70 30 60
-
8/7/2019 ch8_student
14/76
After considering the minimum needs
1
(min)
2
(extra)
3 4 5 6Supply
1 16 16 13 22 17 17 50
2 14 14 13 19 15 15 60
3 19 19 20 23 M M 50
4 M 0 M 0 M 0 50
demand 30 20 70 30 10 50
-
8/7/2019 ch8_student
15/76
Transportation Simplex Method
estination
1 2 3 4 5 n Supply ui
c11 c12 c1n
1 s1
c21 c22 c212 s2
/
/ //
/
/
cm1 cm2 cmn
source
m
1
1
1
1
1
sm
emand d1 d2 d3 d4 d5 dn
vj
Z
-
8/7/2019 ch8_student
16/76
-
8/7/2019 ch8_student
17/76
Procedure
Step 1: Initialization
Step 2: Optimality Test
Step 3: Iteration 3
Determine the entering basic variable
Determine the leaving basic variable
Determine the new B.F.S.
-
8/7/2019 ch8_student
18/76
Initialization
In general L.P. problem, well have exact onebasic variable for each constraint,For transportation problem with m sources
and n destinations, the number of basicvariables is m+n-1.
The reason is that the functional constraintsare equality constraints, this set ofm+n equations with one extra (or redundant)equation that can be deleted without changingthe feasible region i.e. any one of theconstraints are satisfied.
-
8/7/2019 ch8_student
19/76
Procedure for Constructing the Initial B.F.S.
1.From the rows and columns still under
consideration, select the next basic variable
(allocation) according to some criterion.2.Make that allocation large enough to
exactly use up the remaining supply in its
row or the remaining demand in its column(which ever is smaller) .
-
8/7/2019 ch8_student
20/76
Procedure for Constructing the Initial B.F.S.
3.Eliminate that row or column from furtherconsideration. (If the row and the column havethe sane remaining supply and demand, select
arbitrary row as the one to be eliminated. Thecolumn will be use later to provide a degeneratebasic variable, i.e. a circled allocation with zero)
4.If only one row or column remains underconsideration, then the procedure is completed byselecting every remaining variable associatedwith that row or column to be basic with the onlyfeasible allocation. Otherwise return to step 1.
-
8/7/2019 ch8_student
21/76
Alternative Criteria for Initialization
Northwest corner rule.
Vogels approximation method.
Russells approximation method.
-
8/7/2019 ch8_student
22/76
Northwest Corner Rule
Begin by selecting x11
(the northwestcorner).
Thereafter, if
xij was the last variableselected, then next select xi , j+1 (that is,
move one column to the right) if source ihas any supply remaining.
Otherwise, select next xi+1 , j (that is, moveone row down) .
-
8/7/2019 ch8_student
23/76
Example
Destination
1 2 3 4 5 Supply u i
1 1 1 2 11 5 0
1 1 1 1 12 6 0
1 1 2 2 M
3 5 0
M 0 M 0 0
source
4 (D ) 5 0
D e m a n d 3 0 2 0 7 0 3 0 6 0
vj=
-
8/7/2019 ch8_student
24/76
Vogels Approximation Method
For each row and column remaining underconsideration, calculate its difference,which is defined as the arithmeticdifference between the smallest and thenext-to-the-smallest unit cost cij stillremaining in that row or column.
In that row or column has the largestdifference, select the variable having thesmallest remaining unit cost. (If tie, breaksarbitrarily)
-
8/7/2019 ch8_student
25/76
Example
estination
1 2 3 4 5 Supply di erence
1 16 16 13 22 17 50
2 14 14 13 19 15 60
3 19 19 20 23 50Source
4 0 0 0 50emand 20 70 30 60 Select x
di erence eliminate column
-
8/7/2019 ch8_student
26/76
Example
Destination
1 2 3 4 5 Supply difference
1 16 16 13 17 50
2 14 14 13 15 60
3 19 19 20 M 50Source
4 M 0 M 0 20
Demand 30 20 70 60 Select x =
difference eliminate row
-
8/7/2019 ch8_student
27/76
Example
estination
1 2 3 5 Supply di erence
1 16 16 13 17 50
2 14 14 13 15 60Source
3 19 19 20 50
emand 30 20 70 40 Select x
di erence eliminate ro
-
8/7/2019 ch8_student
28/76
Example
1 2 3 5 Supply difference
2 14 14 13 15 60Source3 19 19 20 M 50
Demand 30 20 70 40 Select x =
difference eliminate column
-
8/7/2019 ch8_student
29/76
Example
(not column 3,use or ourth iteration in degeneracy)
1 2 3 Supply di erence
2 14 14 13 20S
ource 3 19 19 20 50
emand 30 20 20 Select x
di erence eliminate ro
-
8/7/2019 ch8_student
30/76
Example
1 2 3 Supply
Source 3 19 19 20 50
emand 30 20 0
Select x31
x32
x33
z
-
8/7/2019 ch8_student
31/76
Russells Approximation Method
For each source row i remaining underconsideration, determine its, which is thelargest unit cost cij still remaining in that row.
For each destination columnj remaining underconsideration, determine its which is thelargest unit cost cij still in that column.
For each xij not previously selected in these rows
and columns, calculate . Select the variable having the largest negative
value of (Tie breaks arbitrarily).
jv
jiijij vuc!(
ij(
-
8/7/2019 ch8_student
32/76
Example
Iteration1u 2u 3u 4u 1v 2v 3v 4v 5v ij( llocation
1 x =
2 x =
3 x =
4 x =
5 x =
6 x =
x =
x =
Z =
-
8/7/2019 ch8_student
33/76
Destination
1 2 3 4 5 Supply iu
1 16 16 13 22 17 50
2 14 14 13 19 15 60
3 19 19 20 23 M 50Source
4 M 0 M 0 0 50Demand 30 20 70 30 60
jv
-
8/7/2019 ch8_student
34/76
Comparison of Three Methods
Northwest corner : quick and easy. But itpays no attention to cij, the solution will befar from optimal.
Vogels approximation : popular, easy toimplement by hand.
Russells approximation : excellent
criterion, quick implement is computer (butnot hand) better solution than the other twomethods.
-
8/7/2019 ch8_student
35/76
Optimality Test
A basic feasible solution is optimal if and
only if for every ( i ,j )
such that xij is non-basic.
0u jiij vuc
-
8/7/2019 ch8_student
36/76
Note
Since cij ui vj = 0 ifxij is a basic variable, cij = ui +vj
There are
m+n-1 basic variables.
m+n-1 equations,,but m+n unknowns.
A convenient choice is to select ui that hasthe largest number of allocations in
its row (tie broken arbitrarily), and toassign it to be zero.
-
8/7/2019 ch8_student
37/76
Example
30
0 20
40
30
30
10
50
estination
1 2 3 4 5 Supplyui
16 16 13 22 17
1 50
14 14 13 19 152 60
19 19 20 233
-2250
0 0 0
Source
4+3 +4
50
emand 30 20 70 30 60
vjZ =
-
8/7/2019 ch8_student
38/76
An Iteration
STEP 1:Select the one with the largest negative value
ofcij - ui - vj to be the entering basic variable.
STEP 2: Increase the entering basic variable from 0 sets
off a chain reaction of compensating changesin other basic variables.
In order to satisfy the supply and demandconstraints. The first basic variable to bedecreased to 0 then becomes the leaving basicvariable.
-
8/7/2019 ch8_student
39/76
An Iteration
STEP 3:
The new B.F.S. is identified by adding value
of the leaving basic variable to the allocationfor each recipient cell and subtracting this
same amount from the allocation for each
donor cell.
-
8/7/2019 ch8_student
40/76
Example (STEP 2)
3 4 5 Supply
1
22 171 50
1
19 152 60
emand 70 30 60
Step 3: (Z=10(15-17+13-13)=10(-2)=10(c25-u2-v5)
40
30
10
+
+
+4
+1
-
-
-2
-
8/7/2019 ch8_student
41/76
Summary
Initialization:
Construct an initial B.F.S. by any of the threemethods, go to optimality test.
Optimality Test: Derives ui and vjby selecting the row having the
largest number of allocations, setting it ui = 0 ,
and then solving the set of equations cij = ui +vj
for each ( i ,j ) such that xij is basic. If for every ( i ,j ) such that xij is
non-basic, then the current solution is optimal.pSTOP.
Otherwise, go to an iteration.
0u jiij vuc
-
8/7/2019 ch8_student
42/76
-
8/7/2019 ch8_student
43/76
Iteration
STEP 3:
Determine the new B.F.S. : Add the value of
the leaving basic variable to the allocation foreach recipient cell. Subtract this value from
the allocation for each donor cell. Return to
Optimality test.
-
8/7/2019 ch8_student
44/76
Transportation Simplex Tableaux
estinationIteration
0 1 2 3 4 5Supply ui
16 16 13 22 171 50
14 14 13 19 152 60
19 19 20 233 50
0 0 0
Source
4( ) 50
emand 30 20 70 30 60
vj
Z =
40 10
30
0 20
30
30
50
-
8/7/2019 ch8_student
45/76
Transportation Simplex Tableaux
estinationIteration
1 1 2 3 4 5Supply
ui
16 16 13 22 171 50
14 14 13 19 152 60
19 19 20 233 50
0 0 0
Source
4( ) 50
emand 30 20 70 30 60
vjZ =
50
30
0 20 30
50
20 10
-
8/7/2019 ch8_student
46/76
Transportation Simplex Tableaux
DestinationIteration
2 1 2 3 4 5 Supply ui
16 16 13 22 171 50
14 14 13 19 152 60
19 19 20 23 M3 50
M 0 M 0 0
Source
4(D) 50
Demand 30 20 70 30 60
vj=
50
20 40
0
30 20
30 20
-
8/7/2019 ch8_student
47/76
Complete set of transportation simplex
tableaux (P330,331 Table 8.23)
DestinationIteration
3 1 2 3 4 5 Supply ui
16 16 13 22 171 50
14 14 13 19 152
+260
19 19 20 233 50
0 0 0
Source
4(D) 50
Demand 30 20 70 30 60
vjZ =
50
20 40
30 20 0
30 20
-
8/7/2019 ch8_student
48/76
-
8/7/2019 ch8_student
49/76
Changing Coefficient of a Nonbasic Variable
The change of coefficient of a non basicvariable xij will leave the r.h.s. of theoptimal tableau unchanged. Thus thecurrent basis will still be feasible.
is not changed, ui , vj s remainunchanged.
In row 0, only the coefficient ofxijchanged, thus as long as the coefficient ofxij in the optimal row 0 is non negativethe current basis remains optimal.
1T
B
Bc
-
8/7/2019 ch8_student
50/76
Assure the Optimal Tableau
Destination
1 2 3 4 Supply ui
8 6 10 91
+2 +735 0
9 12 13 72
+3 +250 3
14 9 16 5
Source
3+5 +3
40 3
Demand 45 20 30 30
vj 6 6 10 2Z =1,020
10 25
45 5
10
-
8/7/2019 ch8_student
51/76
Ex: Change c11
from 8 to 8+
Change c11
from 8 to 8+ , for what
values of will the current basis remains
optimal?
ifc11u 6 the current basis remains optimal.
!d 1111 vuc
-
8/7/2019 ch8_student
52/76
Changing Coefficient of a Basic Variable
Since we are changing . willchange too. The coefficient of each nonbasic variable in row 0 may change.
To determine whether the current basisremains optimal, we must find the new uis,and vj s and use these values to price out
all non basic variables.The current basis remains optimal, as long
as all non basic variables are non negative.
Tc 1T
B
Bc
-
8/7/2019 ch8_student
53/76
-
8/7/2019 ch8_student
54/76
Ex:Change c13
from 10 to 10+
,
,,,
,
,,0
010..0
32
1432
4332
2123
31121
313113
!!
!!!!
!!
!!!!!
d
!d
d
(!d
uu
vvvv
vuvu
vuvuvuvuulet
vueivuc
-
8/7/2019 ch8_student
55/76
Ex:Change c13
from 10 to 10+
Price out each non basic variable
d
d
d
d
d
d
:
:
:
:
:
:
33
31
24
22
14
11
c
c
c
c
c
c
-
8/7/2019 ch8_student
56/76
Increasing bothsi and djby
This change maintains a balance transportation
problem.
Since bothsi
and dj
increase, this will cancel
out the supply demand balance.
Now.
New value = old -value +ui +vj
e.g. increase source 1 and destination 2 by 1 unit.
New cost = 1020+1*0+1*(6) = 1026
-
8/7/2019 ch8_student
57/76
Increasing bothsi and djby
We may also find new values of the decisionvariables as follows:
(i) Ifxij is a basic variable in the optimal solution,
increase xijby(ii) Ifxij is a non basic variable in the optimal
solution, find the loop involving xij and someof the basic variables. Find an odd cell in the
loop that is in row i. Increase the value of thisodd cell by and go around the loop,alternatively increasing and then decreasingcurrent basic variables in the loop by.
-
8/7/2019 ch8_student
58/76
-
8/7/2019 ch8_student
59/76
Ex: Increases1, d
2by 2
x12
is a basic variable in the optimal solution.
Now
-
8/7/2019 ch8_student
60/76
Ex: Increases1, d
1by 1
x11 is a non basic variable in the optimal solution.
Destination
1 2 3 4 Supply ui
1 35 0
2 50 3Source
3 40 3
Demand 45 20 30 30
vj 6 6 10 2
Z=1020+u1+v1
=
10 26
46 4
10 30
-
8/7/2019 ch8_student
61/76
The Assignment Problem
Assumptions:
The number of assignees and the number of tasksare the same. (denote by n)
Each assignee is to be assigned to exactly on task.
Each task is to be performed by exactly oneassignee.
There is a cost cij
associated with assignee iperforming taskj ( i ,j = 1..n )
The objective is to determine how all nassignments should be made in order to minimizethe total cost.
-
8/7/2019 ch8_student
62/76
Example
ocation
n =4
ocation
n =4
1 2 3 4 1 2 3 41 13161211 1 13161211
2 15 - 1320 2 15 1220
achine
n =3
3 5 7 10 6 3 5 7 10 6
achine
n =4
4
(D)0 0 0 0
-
8/7/2019 ch8_student
63/76
The Mathematical Model
( actually xij n_a )
jix
x
xts
xcZMin
ij
n
i
ij
n
j
ij
n
j
n
i
ijij
,,0
1
1..
1
1
1 1
u
!
!
!
!
!
! !
.
.0
1..
jtaskperformsi
not
assignee
if
ifxei ij
!
-
8/7/2019 ch8_student
64/76
The Mathematical Model
Assignment problem is a special case of
transportation problem:
Number of sources m = number ofdestination n
Every supply si = 1
Every demand dj = 1
-
8/7/2019 ch8_student
65/76
The Two Properties
Feasible solution property
Integer solution property holds here.
More over, the constraints prevent anyvariable from being greater than 1, and the
non-negativity constraints prevent values
less than 0. So it automatically satisfiesbinary restriction.
-
8/7/2019 ch8_student
66/76
-
8/7/2019 ch8_student
67/76
Our example
1 2 3 4 Supply
1 13 16 12 11 1
2 15 M 13 20 1
3 5 7 10 6 1
4(D) 0 0 0 0 1
Demand 1 1 1 1
-
8/7/2019 ch8_student
68/76
-
8/7/2019 ch8_student
69/76
-
8/7/2019 ch8_student
70/76
Hungarian Method:
STEP 2:
Draw the minimum number of lines
(horizontal and/or vertical) that are needed to
cover all the zeros in the reduced cost matrix.
Ifn lines are required to cover all the zeros, an
optimal solution is available among the cover
zeros in the matrix. If fewer than n lines are needed to cover all the
zeros, GOTO STEP 3.
-
8/7/2019 ch8_student
71/76
Hungarian Method:
STEP 3:
Find the smallest nonzero element (call itsvalue k) in the reduced cost matrix that is not
covered by lines draw n in STEP2.Now subtract kfrom each uncovered element
of the reduced cost matrix and add kto eachelement of the reduced cost matrix that is
covered by two lines.Return to STEP 2.
-
8/7/2019 ch8_student
72/76
Example
row min
14 5 8 7
2 12 6 5
7 8 3 9
2 4 6 10
Column
min
-
8/7/2019 ch8_student
73/76
Example
9 0 3 0
0 10 4 1 p
4 5 0 4Smallest
Uncovered:1
0 2 4 6
-
8/7/2019 ch8_student
74/76
Transshipment Problem
A supply node is a node that can send goods to
another node but cannot receive goods from any
other node.
A demand node is a node that can receive goods
from other nodes but cannot send goods to any
other node.
A transshipment node is a node that can bothreceive goods from other nodes and send goods
to other nodes.
-
8/7/2019 ch8_student
75/76
Solution Procedure
Step 1: If necessary, add a dummy demand tobalance the problem.s =total available supply.
Step 2: Construct a transportation tableau as
follow:A row consists of supply node and
transshipment node.
A column consists of demand node and
transshipment node.The transshipment node will have a supply
equal to (nodes original supply)+s, and ademand equal to (nodes original demand)+s.
-
8/7/2019 ch8_student
76/76
Example