第五章 线性规划的what-if分析
TRANSCRIPT
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 1/26
Table of Contents
Chapter 5 (What-If Analysis for Linear Programming)
Continuing the Wyndor Case Study (Section 5.2) 5.2
Changes in One Objective Function Coefficient (Section 5.3) 5.3 – 5.9Simultaneous Changes in Objective Function Coefficients (Section 5.4) 5.10 – 5.17
Single Changes in a Constraint (Section 5.5) 5.18 – 5.23
Simultaneous Changes in the Constraints (Section 5.6) 5.24 – 5.26
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 2/26
Wyndor (Before What-If Analysis)
3
4
5
6
7
89
10
11
12
B C D E F G
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 2 6 $3,600
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 3/26
Using the Spreadsheet to do Sensitivity Analysis
3
4
5
6
7
8
9
10
11
12
B C D E F G
Doors Window s
Unit Profit $200 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 2 6 $3,400
Hours Used Per Unit Produced
The profit per door has been revised from $300 to $200.
No change occurs in the optimal solution.
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 4/26
Using the Spreadsheet to do Sensitivity Analysis
The profit per door has been revised from $300 to $500.
No change occurs in the optimal solution.
3
4
5
6
7
89
10
11
12
B C D E F G
Doors Window s
Unit Profit $500 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 2 6 $4,000
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 5/26
Using the Spreadsheet to do Sensitivity Analysis
The profit per door has been revised from $300 to $1,000.
The optimal solution changes.
3
4
5
6
78
9
10
11
12
B C D E F G
Doors Window s
Unit Profit $1,000 $500
Hours Hours
Used Available
Plant 1 1 0 4 <= 4Plant 2 0 2 6 <= 12
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 4 3 $5,500
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 6/26
Using Solver Table to do Sensitivity Analysis
3
4
5
6
7
8
9
10
11
12
1314
15
16
17
18
19
20
21
22
2324
25
26
27
28
B C D E F G
Doors Windows
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12
Plant 3 3 2 18 <= 18
Doors Windows Total Profit
Units Produced 2 6 $3,600
Unit Profit Total
for Doors Doors Windows Profit
2 6 $3,600
$100
$200
$300
$400
$500$600
$700
$800
$900
$1,000
Hours Used Per Unit Produced
Optimal Units ProducedSelect
hese cells
(B18:E28),
before
choosing
he Solver
Table.
16
17
18
C D E
Total
Doors Window s Profit
=DoorsProduced =WindowsProduced =TotalProfit
Optimal Units Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 7/26
Using Solver Table to do Sensitivity Analysis
16
17
18
19
20
21
22
23
24
25
26
2728
B C D E
Unit Profit Total
for Doors Doors Window s Profit
2 6 $3,600
$100 2 6 $3,200
$200 2 6 $3,400
$300 2 6 $3,600
$400 2 6 $3,800
$500 2 6 $4,000
$600 2 6 $4,200
$700 2 6 $4,400
$800 4 3 $4,700
$900 4 3 $5,100$1,000 4 3 $5,500
Optimal Units Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 8/26
Using the Sensitivity Report to Find the Allowable Range
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$12 Units Produced Doors 2 0 300 450 300
$D$12 Units Produced Window s 6 0 500 1E+30 300
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 9/26
Graphical Insight into the Allowable Range
The two dashed lines that pass through the solid constraint boundary lines are
the objective function lines when P D (the unit profit for doors) is at an endpoint
of its allowable range, 0 ≤ P D ≤ 750.
W
D
(2, 6) is optimal for 0< PD < 750
PD = 0 (Profit = 0 D + 500 W)
PD = 300 (Profit = 300 D + 500 W)
PD = 750 (Profit = 750 D + 500 W)
Line A
Line C
Line B
0 2 4 6
2
4
6
8
Production rate for doors
Production ratefor windows
Feasibleregion
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 10/26
Using the Spreadsheet to do Sensitivity Analysis
The profit per door has been revised from $300 to $450.
The profit per window has been revised from $500 to $400.
No change occurs in the optimal solution.
3
4
5
6
7
8
910
11
12
B C D E F G
Doors Window s
Unit Profit $450 $400
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 2 6 $3,300
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 11/26
Using the Spreadsheet to do Sensitivity Analysis
The profit per door has been revised from $300 to $600.The profit per window has been revised from $500 to $300.
The optimal solution changes.
3
4
5
6
7
8
910
11
12
B C D E F G
Doors Window s
Unit Profit $600 $300
Hours Hours
Used Available
Plant 1 1 0 4 <= 4
Plant 2 0 2 6 <= 12
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 4 3 $3,300
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 12/26
Using Solver Table to do Sensitivity Analysis
3
4
5
6
7
8
9
10
1112
13
14
15
16
17
18
19
20
21
B C D E F G H I
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12
Plant 3 3 2 18 <= 18
Doors Windows Total ProfitUnits Produced 2 6 $3,600
Total Profit Unit Profit for Windows
$3,600 $100 $200 $300 $400 $500
$300
Unit Profit $400
for Doors $500
$600
Hours Used Per Unit
Select
hese cells
(C17:H21),
before
choosing
he Solver
Table.
17
C
=TotalProfit
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 13/26
Using Solver Table to do Sensitivity Analysis
16
17
18
19
20
21
B C D E F G H
Total Profit Unit Profit for Windows
$3,600 $100 $200 $300 $400 $500
$300 $1,500 $1,800 $2,400 $3,000 $3,600
Unit Profit $400 $1,900 $2,200 $2,600 $3,200 $3,800
for Doors $500 $2,300 $2,600 $2,900 $3,400 $4,000
$600 $2,700 $3,000 $3,300 $3,600 $4,200
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 14/26
Using Solver Table to do Sensitivity Analysis
24
25
26
27
28
29
B C D E F G H
Units Produced (Doors, Windows) Unit Profit for Windows
(2, 6) $100 $200 $300 $400 $500
$300 (4, 3) (4, 3) (2, 6) (2, 6) (2, 6)
Unit Profit $400 (4, 3) (4, 3) (2, 6) (2, 6) (2, 6)
for Doors $500 (4, 3) (4, 3) (4, 3) (2, 6) (2, 6)
$600 (4, 3) (4, 3) (4, 3) (4, 3) (2, 6)
25
C
="(" & DoorsProduced & ", " & WindowsProduced & ")
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 15/26
The 100 Percent Rule
The 100 Percent Rule for Simultaneous Changes in Objective Function
Coefficients: If simultaneous changes are made in the coefficients of the objectivefunction, calculate for each change the percentage of the allowable change
(increase or decrease) for that coefficient to remain within its allowable range. If
the sum of the percentage changes does not exceed 100 percent, the original
optimal solution definitely will still be optimal. (If the sum does exceed 100
percent, then we cannot be sure.)
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 16/26
Graphical Insight into 100 Percent Rule
W
D0 2 4 6
2
4
6
8
Production rate for doors
Production rate
for windows
Feasible
region
10
Objective func tion line now is
Profit = $3150 = 525 D + 350 W
since PD = $525, PW = $350.
Entire line segment is optimal
(4, 3)
(2, 6)
8
The estimates of the
unit profits for doors
and windows change
to P D = $525 and
P W = $350, which lies
at the edge of what is
allowed by the 100
percent rule.
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 17/26
Graphical Insight into 100 Percent Rule
When the estimates of the unit profits for doors and windows change to P D =
$150 and P W = $250 (half their original values), the graphical method shows
that the optimal solution still is ( D, W ) = (2, 6) even though the 100 percent
rule says that the optimal solution might change.
0 2 4 6
2
4
6
8
(2, 6)
Feasibleregion
Optimal solution
Production rate for doors
Production ratefor windows
Profit = $1800 = 150D+ 250 W
8
W
D
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 18/26
Using the Spreadsheet to do Sensitivity Analysis
The hours available in plant 2 have been increased from 12 to 13.The total profit increases by $150 per week.
3
4
5
6
7
8
910
11
12
B C D E F G
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 1.667 <= 4
Plant 2 0 2 13 <= 13
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 1.667 6.5 $3,750
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 19/26
Using the Spreadsheet to do Sensitivity Analysis
The hours available in plant 2 have been further increased from 13 to 18.The total profit increases by $750 per week ($150 per hour added in plant 2).
3
4
5
6
7
8
910
11
12
B C D E F G
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 0 <= 4
Plant 2 0 2 18 <= 18
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 0 9 $4,500
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 20/26
Using the Spreadsheet to do Sensitivity Analysis
The hours available in plant 2 have been further increased from 18 to 20.The total profit does not increase any further.
3
4
5
6
7
8
910
11
12
B C D E F G
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 0 <= 4
Plant 2 0 2 18 <= 20
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 0 9 $4,500
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 21/26
Using Solver Table to do Sensitivity Analysis
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
20
21
22
23
24
25
2627
28
29
30
31
32
33
34
35
B C D E F G
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 2 6 $3,600
Time Available Total Incremental
in Plant 2 (hours) Doors Windows Prof it Prof it
2 6 $3,600
4 4 2 $2,200
5 4 2.5 $2,450 $250
6 4 3 $2,700 $250
7 3.667 3.5 $2,850 $150
8 3.333 4 $3,000 $150
9 3 4.5 $3,150 $150
10 2.667 5 $3,300 $150
11 2.333 5.5 $3,450 $15012 2 6 $3,600 $150
13 1.667 6.5 $3,750 $150
14 1.333 7 $3,900 $150
15 1 7.5 $4,050 $150
16 0.667 8 $4,200 $150
17 0.333 8.5 $4,350 $150
18 0 9 $4,500 $150
19 0 9 $4,500 $0
20 0 9 $4,500 $0
Hours Used Per Unit Produced
Optimal Units Produced
Select
these cell s
(B18:E35),
before
choosing
the Solver
Table.
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 22/26
Using the Sensitivity Report
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$12 Units Produced Doors 2 0 300 450 300
$D$12 Units Produced Window s 6 0 500 1E+30 300
Constraints
Final Shadow Constraint Allowable AllowableCell Name Value Price R.H. Side Increase Decrease
$E$7 Plant 1 Used 2 0 4 1E+30 2
$E$8 Plant 2 Used 12 150 12 6 6
$E$9 Plant 3 Used 18 100 18 6 6
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 23/26
Graphical Interpretation of the Allowable Range
0 2 4 6
2
4
6
8
2 W = 6 Profit = 300 (4) + 500 (3) = $2,7
2 W = 18 Profit = 300 (0) + 500 (9) = $4,500
2 W = 12 Profit = 300 (2) + 500 (6) = $3,600
(4, 3)
(2, 6)
Feasible
region for
original problem
Line B
Line A (D = 4)
Line C (3 D + 2 W = 18)
10
(0, 9)
D
W
Production rate for doors
Production r atefor windows
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 24/26
Using the Spreadsheet to do Sensitivity Analysis
One available hour in plant 3 has been shifted to plant 2.The total profit increases by $50 per week.
3
4
5
6
7
8
910
11
12
B C D E F G
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 1.333 <= 4
Plant 2 0 2 13 <= 13
Plant 3 3 2 17 <= 17
Doors Window s Total Profit
Units Produced 1.333 6.5 $3,650
Hours Used Per Unit Produced
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 25/26
Using Solver Table to do Sensitivity Analysis
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2122
23
24
25
26
B C D E F G H
Doors Window s
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4 Total (Plants 2 & 3)
Plant 2 0 2 12 <= 12 30
Plant 3 3 2 18 <= 18
Doors Window s Total Profit
Units Produced 2.000 6 $3,600
Time Available Time Available Total Incremental
in Plant 2 (hours) in Plant 3 (hours) Doors Window s Profit Profit
2 6 $3,600
12 18 2 6 $3,600
13 17 1.333 6.5 $3,650 $5014 16 0.667 7 $3,700 $50
15 15 0 7.5 $3,750 $50
16 14 0 7 $3,500 -$250
17 13 0 6.5 $3,250 -$250
18 12 0 6 $3,000 -$250
Hours Used Per Unit Produced
Optimal Units Produced
Select
these cell s
(C19:F26),before
choosing
the Solver
Table.
7/27/2019 What-If
http://slidepdf.com/reader/full/-what-if 26/26
The 100 Percent Rule
The 100 Percent Rule for Simultaneous Changes in Right-Hand Sides: The
shadow prices remain valid for predicting the effect of simultaneously changingthe right-hand sides of some of the functional constraints as long as the changes
are not too large. To check whether the changes are small enough, calculate for
each change the percentage of the allowable change (decrease or increase) for that
right-hand side to remain within its allowable range. If the sum of the percentage
changes does not exceed 100 percent, the shadow prices definitely will still be
valid. (If the sum does exceed 100 percent, then we cannot be sure.)