Chapter 12

advertisement
Chapter 12
Perhaps the greatest impact of quantitative
methods has been in distribution, where
they result in billions saved every year.
Transportation and
Assignment Problems
1
The Transportation Problem:
Scheduling Shipments
 The following capacity, demand, and unit costs
apply for plants and warehouses.
To Warehouse
From Plant Frankfurt
2
New York
Phoenix
Yokohama
Capacity
Juarez
$19
$7
$3
$21
100
Seoul
15
21
18
6
300
Tel Aviv
11
14
15
22
200
Demand
150
100
200
150
600
 The linear program involves one variable for each
cell in the above:
Xij = quantity shipped from plant i to warehouse j
i = J, S, T and j = F, N, P, Y
The Transportation Problem:
LP Formulation
 The following objective applies.
Minimize C =19XJF + 7XJN + 3XJP +21XJY
+15XSF +21XSN +18XSP + 6XSY
+11XTF +14XTN +15XTP +22XTY
Subject to:
XJF + XJN + XJP + XJY = 100 (Juarez Capacity)
XSF +XSN + XSP + XSY = 300 (Seoul Capacity)
XTF +XTN + XTP + XTY = 200 (Tel Aviv Capacity)
XJF + XSF + XTF
= 150 (Frankfurt Demand)
XJN + XSN + XTN
= 100 (New York Demand)
XJP + XSP + XTP
= 200 (Phoenix Demand)
XJY + XSY + XTY
= 150 (Yokohama Demand)
where
all Xij’s > 0
3
Solving Transportation Problems
 Although transportation problems may be
solved using the general procedure for any
linear program, there is a faster way.
 The transportation method is a specialpurpose algorithm utilizing the features of
the shipping schedule and constraint forms:
 The quantities in each row sum to the row total
(capacity).
 The quantities in each column sum to the
column total (demand).
 It is user-friendly with limited arithmetic.
4
 Small problems may be easily solved by hand.
 Symbols are not needed.
Solving the
Transportation Problem
 Get a starting solution by filling a blank shipment schedule
using a procedure like the northwest corner method.
Compute total cost, C = $11,500.
5
Solving the
Transportation Problem
 Get a set of row and column numbers (so non-empty cells
have cost = row no. + col. no.). Use zero for first row.
6
Solving the
Transportation Problem
 Find the entering cell (now empty). It will have best
improvement (cost – row no. – col. no.). Then find the
closed-loop path, off-setting shifts, if its quantity is raised.
7
Solving the
Transportation Problem
 Change quantities, moving the maximum amount (i.e., the
minimum losing-cell quantity, 100, around path). C change
= impvt. × qty. = -$19(100) = -$1,900. Do next iteration.
8
Solving the
Transportation Problem
 Previous iteration changes cost by - $19 × 50 = - $950.
Continue until no improvements are possible. Here, the
change in cost is - $23 × 100 = - $2,300.
9
Solving the
Transportation Problem
 There was a tie for exiting variable. Cell TY ended up with
(0) quantity. Only one cell can go blank. Here zero is the
smallest losing quantity. Only (0) moves. C won’t change.
10
Solving the
Transportation Problem
 Here, the change in cost is - $1 × 100 = - $100.
11
Solving the
Transportation Problem
 Since there is no further improvement possible, the optimal
solution has been reached.
12
Solving Transportation Problems
with QuickQuant
 The ski-distribution problem is entered:
13
Solving Transportation Problems
with QuickQuant

After the data are entered, the run menu is
pulled down and Detailed Solve selected.
That launches individual iterations to be
seen on screen.
14
Solving Transportation Problems
with QuickQuant
 The first iteration provides:
15
Solving Transportation Problems
with QuickQuant
 After all iterations, the solution found before is provided:
16
Assignment Problem
 The following data apply for persons and jobs.
Time to Complete One Job
Individual
Drilling
Grinding
Lathe
Ann
5 min.
10 min.
10 min.
Bud
10
5
15
Chuck
15
15
10
 The linear program involves one variable for each
cell in the above:
Xij = Fraction of time person i is assigned to job j
i = A, B, C and j = D, G, L
17
Assignment Problem
18
 The following objective applies.
Minimize C = 5XAD + 10XAG + 10XAL
+10XBD + 5XBG + 15XBL
+
11XCD + 14XCG + 15XCL
Subject to:
XAD + XAG + XAL = 1 (Ann’s Availability)
XBD + XBG + XBL = 1 (Bud’s Availability)
XCD + XCG + XCL = 1 (Chuck’s Availability)
XAD + XBD + XCD = 1 (drill-press requirement)
XAG + XBG + XCG = 1 (grinder requirement)
XAL + XBL + XCL = 1 (lathe requirement)
where
all Xij’s > 0
 Solution:
XAD = 1 (Ann to Drilling) XBG = 1 (Bud to Grinding)
XCL = 1 (Chuck to Lathe) C = 20
Solving Assignment Problems
 Assignment problems are solved using the transportation
method. Here’s an iteration of a larger problem.
19
Solving Assignment Problems
 This problem has tying optimal solutions. Any
combination of the following (with job sharing) would also
be optimal.
 Why don’t we just enumerate all possibilities? Wouldn’t
that be faster?
20
Solving Assignment Problems
 For the six-person and job problem, there
are
6! = 6 × 5 × 4 × 3 × 2 × 1 = 720
possibilities (without job sharing). Try
doing this by trial and error.
 For ten persons and jobs, the number of
possibilities would be
10! = 10 × 9 × 8 × 7 × 6! = 3,328,800
 The transportation method is a very efficient
way to solve such problems, especially with
the computer.
21
Solving Transportation Problems
with a Spreadsheet
Spreadsheets can be used to solve transportation
problems just like they are used to solve linear
programs.
Step 1: Write out the formulation table.
Step 2: Put the formulation table into a
spreadsheet.
Step 3: Use Excel’s Solver to obtain a solution.
22
The Formulation Table
(Figure 12-16)
The formulation table arranges the problem in a
tabular format, as shown below for the ski distribution
problem. The shipping costs are shown in the table
with the plant capacities in the right-hand margin and
the warehouse demands in the lower margins.
From
To Warehouse
Plant Frankfurt New YorkPhoenix Yokohama Capacity
Juarez
19
7
3
21
100
Seoul
15
21
18
6
300
Tel Aviv
11
14
15
22
200
Demand 150
100
200
150
C(min)
23
The Formulation Table in a
Spreadsheet
The numbers in the Excel spreadsheet come from
the formulation table.
A
1
2
3
4
5
6
7
8
24
B
C
D
E
F
Ski Shipment-Scheduling Illustration
From
Plant Frankfurt
Juarez
19
Seoul
15
Tel Aviv
11
Demand
150
To Warehouse
New York Phoenix
7
3
21
18
14
15
100
200
Yokohama
21
6
22
150
Capacity
100
300
200
C(min)
The Expanded Spreadsheet
(Figure 12-17)
4. The sum of
the shipments
from Juarez is in
cell F12. Its
formulas is
=SUM(B12:E12)
and it is copied
down to cells
F13:F14.
5. The sum of
the shipments to
Frankfurt is in
cell B15. Its
formula is
=SUM(B12:B14)
and it is copied
to cells C15:E15.
25
2. All the
formulas
necessary to
use Solver are in
the expanded
table.
1. The expanded spreadsheet contains the previous Excel
spreadsheet in the upper portion (A1:F8) and a table for the
solution (shipping quantities) in the lower portion (A10:F15).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
3. The
G objective
H
function is in
Ski Shipment-Scheduling Illustration
cell F9. The
formulas is
From
To Warehouse
Plant Frankfurt New York Phoenix Yokohama Capacity =SUMPRODUCT(
Juarez
19
7
3
21
100
B5:E7,B12:E14)
A
B
Seoul
Tel Aviv
Demand
15
11
150
C
D
21
18
14
15
100
200
Solution
From
To Warehouse
Plant Frankfurt New York Phoenix
Juarez
0
0
0
Seoul
0
0
0
Tel Aviv
0
0
0
Total
0
0
0
E
F
6
22
150
300
200
Cost
$0
F
=SUMPRODUCT
9 (B5:E7,B12:E14)
Total
0
0
0
F
12 =SUM(B12:E12)
13 =SUM(B13:E13)
14 =SUM(B14:E14)
Yokohama
0
0
0
0
B
C
D
E
15 =SUM(B12:B14) =SUM(C12:C14) =SUM(D12:D14) =SUM(E12:E14)
Using Excel’s Solver to
Solve Transportation Problems
Click on Tools on the menu
bar, select the Solver option, and the
Solver Parameters dialog box shown
next appears.
26
1. Enter the
value of the
objective
function, F9, in
the Target Cell
line, either with
or without the $
sign.
The Solver Parameters Dialog Box
(Figure 12-18)
NOTE: Normally all these entries appear in the Solver Parameter dialog
box so you only need to click on the Solve button. However, you
should always check to make sure the entries are correct for the
problem you are solving.
2. The Target
Cell is to be
maximized so
click on Min in
the Equal To
line.
3. Enter the
decision
variables in the
By Changing
Cells line,
B12:E14.
4. The constraints are entered in the Subject to Constraints box by using the
Add Constraints dialog box shown next (obtained by clicking on the Add
button). If a constraint needs to be changed, click on the Change button.
27
The Change and Add Constraint dialog box function in the same manner.
The Add Constraint Dialog Box
1. Enter B15:E15 (or
$B$15:$E$15) in the Cell
Reference line. These cells
give the total amount shipped
to each warehouse.
4. Click Add
and repeat
Steps 1 - 3 for
the shipments
from each plant
to make sure
they are equal
to the plant
capacities.
After this, click
OK.
28
Normally, all
these entries
already appear.
You will need to
use this dialog
box only if you
need to add a
constraint.
3. Enter the
requirements for
each warehouse
B8:E8 in the
Constraint line (or
=$B$8:$E$8).
2. Enter = as the sign because the shipments must be
equal to the requirements, given next in Step 3.
If you need to change a constraint, the Change Constraint dialog box functions
just like this one.
Solver’s Answer Report
To get Solver’s Answer Report, highlight Answer
Report in the Report box of the Solver Results
dialog box before clicking the OK button.
29
3. To find the
solution, click
on Tools and
Solver to obtain
the Solver
Parameters
dialog box and
then click the
Solve button.
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1. To solve other problems:
Spreadsheet withOptimal Solution and
Answer Report (Figure 12-19 )
2. Enter the data: the capacities in cells F5:F7 and their source
names in cells A5:A7, the demands in cells B8:E8 and the
destination names in cells B4:E4, and the costs in cells B5:E7.
B
C
D
E
F
G
H
I
J
K
Ski Shipment-Scheduling Illustration
From
To Warehouse
Plant Frankfurt New York Phoenix Yokohama Capacity Cell
Name
Original Value Final Value
0
0
Juarez
19
7
3
21
100 B12 Juarez Frankfurt
0
0
Seoul
15
21
18
6
300 C12 Juarez New York
D12 Juarez Phoenix 5. Only a 0
100
Tel Aviv
11
14
15
22
200
E12 Juarez Yokohama
0
0
Demand
150
100
200
150
C(min) B13 Seoul Frankfurt portion of the
0
50
Solution
$6,250 C13 Seoul New York Answer Report
0
0
From
To Warehouse
D13 Seoul Phoenix
0
100
is shown here
E13
Seoul
Yokohama
0
150
Plant Frankfurt New York Phoenix Yokohama Total
because
of
the
0
100
Juarez
0
0
100
0
100 B14 Tel Aviv Frankfurt
lack
of
space.
0
100
Seoul
50
0
100
150
300 C14 Tel Aviv New York
D14 Tel Aviv Phoenix
0
0
Tel Aviv
100
100
0
0
200
E14 Tel Aviv Yokohama
0
0
Total
150
100
200
150
4. For bigger problems or if dummies are needed, insert additional rows or columns. Insert
them in the middle of the table and not at the beginning or the end. Copy the formulas in
column F and row 15 to any new cells created by the insertions. Check to make sure the
30
ranges of the formulas in the Solver Parameters dialog box are correct.
Download