3.1敏感性分析

线性规划的what-if分析

1

线性规划的what-if分析

 最优解只是针对某一特定的数学模型而言的。

 数学模型中的参数经常是估计值或假设。  管理者关心:如果某些参数发生了变化,最优解或目标函 数值会发生什么变化?  如果最优解相对稳定,就会比较放心地应用最优解对应 的决策方案。

 如果最优解对参数的变化很敏感,就需要对参数的估计 值重新定义。  最优解或影子价格保持不变的参数变化范围是什么。  以上所说的分析称为what-if分析或敏感性分析。

2

使用EXCEL进行what-if分析

          改变目标函数系数 单个参数 多个参数 改变约束函数右端值 单个参数 多个参数 分析方法 单个试算 系统试算 利用敏感性分析报告

3

伟恩德公司案例研究

生产能力、产品所需资源、利润:

4hr/wk 工厂1

1hr 12hr/wk 工厂2 18hr/wk 工厂3

3hr

2hr

2hr

窗 利润:500/unit

4

利润:300/unit

伟恩德公司案例研究

 代数模型

max P  300D  500W s.t. D4 2W  12 3D  2W  18 D, W  0

5

伟恩德公司案例研究

what-if 分析之前,伟恩德公司问题电子表格模型及最优解。

6

如果伟恩德公司一种新产品单位 利润的估计值是不精确的,将会 对结果产生怎样的影响?

7

目标函数系数的变化

P2

(0,6) (2,6)

Max s.t.

3 P1 + 5 P2

P1 0 (非负约束)

(4,3)

目标函数系数的变化可能会改 变最优解,也可能不改变.

(9,0)

P1

(0,0) (4,0)

8

单个目标函数系数

门的单位利润PD=$300降到PD=$200,而最优解不变 。

9

单个目标函数系数

门的单位利润PD=$300增加到PD=$500,而最优解不变。

10

单个目标函数系数

门的单位利润从PD=$300增加到PD=$1000,最优解改变。

11

单个目系数标函数

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Unit Profit C Doors $300 D Windows $500 E F G Plant 1 Plant 2 Plant 3 Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 2 Windows 6 Hours Used 2 12 18

Units Produced

Unit Profit for Doors $100 $200 $300 $400 $500 $600 $700 $800 $900 $1,000

Optimal Units Produced Doors Windows 2 6

Total Profit $3,600

Select these cells (B18:E28), before choosing the Solver Table.

C D Optimal Units Produced 16 17 Doors Windows 18 =DoorsProduced =WindowsProduced

E Total Profit =TotalProfit

单个目标函数系数

16 17 18 19 20 21 22 23 24 25 26 27 28 B Unit Profit for Doors $100 $200 $300 $400 $500 $600 $700 $800 $900 $1,000 C D Optimal Units Produced Doors Windows 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 4 3 4 3 4 3 E Total Profit $3,600 $3,200 $3,400 $3,600 $3,800 $4,000 $4,200 $4,400 $4,700 $5,100 $5,500

系统地改变门单位利润得到的结果。

单个目

标函数系数

 用Excel求解伟恩德公司门窗生产问题输出的敏感性报告:

可变单 元格

终 递减 目标式 允许的 单元格 名称 值 成本 系数 增量 $C$12 Units Produced Doors 2 0 300 450 Units Produced $D$12 Windows 6 0 500 1E+30 约束 单元格 $E$7 $E$8 $E$9 名称 Plant 1 Used Plant 2 Used Plant 3 Used 允许的 减量 300 300

终 值 2 12 18

阴影 约束 允许的 允许的 价格 限制值 增量 减量 0 4 1E+30 2 150 12 6 6 100 18 6 6

14

单个目标函数系数

Adjustable Cells Cell Name $C$9 Solution Doors $D$9 Solution Windows Final Reduced Objective Allowable Allowable Value Cost Coefficient Increase Decrease 2 0 300 450 300 6 0 500 1E+30 300

伟恩德模型用Excel Solver产生的灵敏度分析报告的一 部分,其中最后三栏表示了门窗单位利润的最优域。

15

目标函数系数最优域图形表示

W Production rate for windows 8 (2, 6) is optimal for 0

4 Feasible region 2

Line C PD = 300 (Profit = 300 D + 500 W)

PD = 750 (Profit = 750 D + 500 W) Line A 0 2 4 6 Production rate for doors D

通过约束边界线的虚线B和虚线C是单位门的利润PD 等于最优域 ( 0 ≤ PD ≤ 750 )两个端点时的目标函数线。

目标函数系数C1在多大范围内变化最优解不变

最优解对应的起作用的约束: 2 P2

P2 (0,6)

(2,6)

3 P1 + 5 P2

0/2

(4,3)

0

现在C1 =3, 最多减少 3,最多增加 4.5, 在此范围内最优解不变。

(9,0)

(0,0) (4,0)

P1

17

目标函数系数C2在多大范围内变化最优解不变

最优解对应的起作用的约束: 2 P2

P2 (0,6)

(2,6)

Max

3 P1 + 5 P2

0/2

(4,3)

2

现在C2 =5, 最多减少 3,可任意增加, 在此范围内最优解不变。

(9,0)

(0,0) (4,0)

P1

18

如果伟恩德公司两种新产品单位 利润的估计值都是不精确的,将 会对结果产生怎样的影响?

19

多个目标函数系数

门,窗的单位利润分别被改为PD=$450,PW =$400, 但是最优解不变 。

20

多个目标函数系数

门,窗的单位利润分别被改为PD=$600,PW =$300, 最优解改变 。

21

多个目标函数系数

B 3 4 Unit Profit 5 6 7 Plant 1 8 Plant 2 9 Plant 3 10 11 12 Units Produced 13 14 15 16 Total Profit 17 18 19 Unit Profit 20 for Doors 21 C Doors $300 D Windows $500 E F G H I Hours Used Per Unit 1 0 0 2 3 2 Doors 2 Windows 6 Hours Used 2 12 18 Hours Available 4 12 18 Total Profit $3,600

Select these cells (C17:H21), before choosing the Solver Table.

$3,600 $300 $400 $500 $600

$100

Unit Profit for Windows $200 $300 $400

$500

C 17 =TotalProfit

多个目标函数系数

B 16 Total Profit 17 18 19 Unit Profit 20 for Doors 21

C $3,600 $300 $400 $500 $600

D $100 $1,500 $1,900 $2,300 $2,700

E F G Unit Profit for Windows $200 $300 $400 $1,800

$2,400 $3,000 $2,200 $2,600 $3,200 $2,600 $2,900 $3,400 $3,000 $3,300 $3,600

H $500 $3,600 $3,800 $4,000 $4,200

系统地改变门、窗单位利润得到的结果(总利润)。

多个目标函数系数

24 25 26 27 28 29 B C D Units Produced (Doors, Windows) (2, 6) $100 $300 (4, 3) Unit Profit $400 (4, 3) for Doors $500 (4, 3) $600 (4, 3) E F G Unit Profit for Windows $200 $300 $400 (4, 3) (2, 6) (2, 6) (4, 3) (2, 6) (2, 6) (4, 3) (4, 3) (2, 6) (4, 3) (4, 3) (4, 3) H $500 (2, 6) (2, 6) (2, 6) (2, 6)

C 25 =道如 果改变这些决策是否会提高最终收益。  影子价格( Shadow Price )

在给定线性规划模型的最优解和目标函数 相应值的条件下,影子价格就是约束函数右 端项(常数)变化一个单位,使得目标函数

值变化的量。  影子价格只有在约束右端值变动不大的情况

下才有效。

30

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 1.667 Windows 6.5

Hours Used 1.667 13 18

Hours Available 4 13 18 Total Profit $3,750

Units Produced

工厂2可用时间从12增加到13,总利润增加了$150 。

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 0 Windows 9

Hours Used 0 18 18

Hours Available 4 18 18 Total Profit $4,500

Units Produced

工厂2可用时间进一步从13增加到18,总利润增加了$750 。

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 0 Windows 9

Hours Used 0 18 18

Hours Available 4 20 18 Total Profit $4,500

Units Produced

工厂2可用时间进一步从18增加到20,总利润不再增加了。

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Unit Profit C Doors $300 D Windows $500 E F G Plant 1 Plant 2 Plant 3 Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 2 Windows 6 Hours Used 2 12 18

Units Produced

Time Available in Plant 2 (hours) 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Optimal Units Produced Doors Windows 2 6 4 2 4 2.5 4 3 3.667 3.5 3.333 4 3 4.5 2.667 5 2.333 5.5 2 6 1.667 6.5 1.333 7 1 7.5 0.667 8 0.333 8.5 0 9 0 9 0 9

Total Profit $3,600 $2,200 $2,450 $2,700 $2,850 $3,000 $3,150 $3,300 $3,450 $3,600 $3,750 $3,900 $4,050 $4,200 $4,350 $4,500 $4,500 $4,500

Incremental Profit

Select these cells (B18:E35), before choosing the Solver Table.

$250 $250 $150 $150 $150 $150 $150 $150 $150 $150 $150 $150 $150 $150 $0 $0

单个约束函数右端值

 用Excel求解伟恩德公司门窗生产问题输出的敏感性报告:

可变单 元格

终 递减 目标式 允许的 单元格 名称 值 成本 系数 增量 $C$12 Units Produced Doors 2 0 300 450 Units Produced $D$12 Windows 6 0 500 1E+30 约束 单元格 $E$7 $E$8 $E$9 名称 Plant 1 Used Plant 2 Used Plant 3 Used 允许的 减量 300 300

终 值 2 12 18

阴影 约束 允许的 允许的 价格 限制值 增量 减量 0 4 1E+30 2 150 12 6 6 100 18 6 6

35

伟恩德公司案例研究  代数模型

max P  300D  500W s.t.

D4 2W  12 3D  2W  18 D, W  0

36

 W Production rate for windows 10

影子价格可行域图

形表示

(0, 9) 8

2 W = 18  Profit = 300 (0) + 500 (9) = $4,500

6

Line B

(2, 6)

2 W = 12  Profit = 300 (2) + 500 (6) = $3,600

4

Feasible region for original (4, 3) 2 W = 6  Profit = 300 (4) + 500 (3) = $2,700

2

problem

Line C (3 D + 2 W = 18) Line A (D = 4)

0

2 4 Production rate for doors

6

D

多个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 1.333 Windows 6.5

Hours Used 1.333 13 17

Hours Available 4 13 17 Total Profit $3,650

Units Produced

一个可用时间从工厂3转移到工厂2,总利润增加了$50 。

多个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Unit Profit C Doors $300 D Windows $500 E F G H Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 2.000 Windows 6 Hours Used 2 12 18 Hours Available 4 12 18 Total Profit $3,600

Plant 1 Plant 2 Plant 3

Total (Plants 2 & 3) 30

Units Produced

Time Available Time Available Optimal Units Produced in Plant 2 (hours) in Plant 3 (hours) Doors Windows 2 6 12 18 2 6 13 17 1.333 6.5 14 16 0.667 7 15 15 0 7.5 16 14 0 7 17 13 0 6.5 18 12 0 6

Total Profit $3,600 $3,600 $3,650 $3,700 $3,750 $3,500 $3,250 $3,000

Incremental Profit

Select these cells (C19:F26), before choosing the Solver Table.

$50 $50 $50 -$250 -$250 -$250

百分之百法则(The 100 percent rule)

同时改变几个或所有函数约束的右端值,如 果这些变动的幅度不大,那么可以用影子价格预 测变动产生的影响。为了判别这些变动的幅度是 否允许,计算每一变动占允许变动的百分比(增 加或减少)。如果所有的百分比之和不超过100% ,那么影子价格仍然有效,如果所有百分比之和 超过100%,则无法确定影子价格是否有效 。

40

一个生产问题例子

每周的原材料:

8 Small Bricks

产品:

6 Large Bricks

Table Profit = $20 / Table

Chair Profit = $15 / Chair

Graphical Solution (Original Problem)

T 4 2T + 2C

Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

2

Optimal Solution (2, 2). Profit = $70

1

2T + C

1

2

3

4

5

6

C

Z = ($20)T + ($15)C = $70

7 Large Bricks

T 4 2T + 2C

Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 7 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

Z = ($20)T + ($15)C = $75

9 Large Bricks

T 4 New Optimal Solution (4, 0). Profit = $80

Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 9 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

3

2T + C

2

Old Optimal Solution (2, 2). Profit = $70

1 2T + C

2 3 4 5 6 C

Z = ($20)T + ($15)C = $80

$25 Profit per Table

T 4 2T + 2C

Maximize Profit = ($25)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

2

Optimal Solution (2, 2). Profit = $80

1

2T + C

1

2

3

4 5 6 C Z = ($25)T + ($15)C = $80

$35 Profit per Table

T 4 2T + 2C

Maximize Profit = ($35)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

2

Old Optimal Solution (2, 2). Profit = $100 Z = ($35)T + ($15)C = $105

1

1

2

3

4

5

6

C

Generating the Sensitivity Report

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 6 8 Available 6 8 Total Profit $70.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 2 Chairs 2

Production Quantity:

After solving with Solver, choose “Sensitivity” under reports:

The Sensitivity Report

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 6 8 Available 6 8 Total Profit $70.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 2 Chairs 2

Production Quantity:

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

The Sensitivity Report

The solution

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

Allowable range (Solution stays the same)

Usage of the resource (Left-hand-side of constraint)

Allowable range (Shadow price is valid)

Increase in objective function value per unit increase in right-hand-side (RHS) ∆Z = (shadow price)(∆RHS)

$35 Profit per Table

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $35.00

Chairs $15.00 Total Used 6 6 Available 6 8 Total Profit $105.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 3 Chairs 0

Production Quantity:

Adjustable Cells Final Cell Name Value $C$11 Production Quantity: Tables 3 $D$11 Production Quantity: Chairs 0 Constraints Cell Name $E$7 Large Bricks Total Used $E$8 Small Bricks Total Used Final Value 6 6 Shadow Price 17.5 0 Constraint R.H. Side 6 8 Allowable Increase 2 1E+30 Allowable Decrease 6 2 Reduced Cost 0 -2.5 Objective Coefficient 35 15 Allowable Increase 1E+30 2.5 Allowable Decrease 5 1E+30

7 Large Bricks

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 7 8 Available 7 8 Total Profit $75.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 3 Chairs 1

Production Quantity:

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell Name $E$7 Large Bricks Total Used $E$8 Small Bricks Total Used Final Shadow Value Price 7 5 8 5 Constraint R.H. Side 7 8 Allowable Increase 1 6 Allowable Decrease 3 1 Final Reduced Objective Value Cost Coefficient 3 0 20 1 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

9 Large Bricks

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 8 8 Available 9 8 Total Profit $80.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 4 Chairs 0

Production Quantity:

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell Name $E$7 Large Bricks Total Used $E$8 Small Bricks Total Used Final Shadow Value Price 8 0 8 10 Constraint R.H. Side 9 8 Allowable Increase 1E+30 1 Allowable Decrease 1 8 Final Reduced Objective Value Cost Coefficient 4 0 20 0 -5 15 Allowable Increase 1E+30 5 Allowable Decrease 5 1E+30

100% Rule for Simultaneous Changes in the Objective Coefficients

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

Examples: (Does solution stay the same?)

Profit per Table = $24 & Profit per Chair = $13 Profit per Table = $25 & Profit per Chair = $12 Profit per Table = $28 & Profit per Chair = $18

100% Rule for Simultaneous Changes in the Right-Hand-Sides

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

Examples: (Are the shadow prices valid? If so, what’s the new total profit?) (+1 Large Brick) & (+2 Small Bricks) (+1 Large Brick) & (–1 Small Brick)

Summary of Sensitivity Report for Changes in the Objective Function Coefficients

 Final Value  The value of the decision variables (changing cells) in the optimal solution. Reduced Cost  Increase in the objective function value per unit increase in the value of a zero-valued variable (for small increases)—may be interpreted as the shadow price for the nonnegativity constraint. Objective Coefficient  The current value of the objective coefficient. Allowable Increase/Decrease  Defines the range of the coefficients in the objective function for

which the current solution (value of the decision variables or changing cells in the optimal solution) will not change.

Summary of Sensitivity Report for Changes in the Right-Hand-Sides

 Final Value

 The usage of the resource (or level of benefit achieved) in the optimal solution—the left-hand side of the constraint.

Shadow Price  The change in the value of the objective function per unit

increase in the right-hand-side of the constraint (RHS): ∆Z = (Shadow Price)(∆RHS) (Note: only valid if change is within the allowable range— see below.) The current value of the right-hand-side of the constraint. Defines the range of values for the RHS for which the shadow price is valid and hence for which the new objective function value can be calculated. (NOT the range for which the current solution will not change.)

 

Constraint R.H. Side

 

Allowable Increase/Decrease

 what-if 分析是在求得基本模型的最优解之后进行的, 这些分析可以为管理层决策提供非常有用的信息;  利用Solver Table系统地检查模型系数的变化给最优解 和目标函数值带来的变化;

 利用Excel Solver生成的灵敏度报告数据计算:最优解 保持不变的目标函数系数变动范围,或影子价格保持不变 的约束右端值变动范围;  利用目标函数系数的百分之百法则判断最优解变动情况 ;  利用约束右端值的百分之百法则判断目标函数值变动情况。

57

作业

 第五章下面两个习题选做一题 (5.1+5.8);5.7

 第五章共四个案例选做一个

58

线性规划的what-if分析

1

线性规划的what-if分析

 最优解只是针对某一特定的数学模型而言的。

 数学模型中的参数经常是估计值或假设。  管理者关心:如果某些参数发生了变化,最优解或目标函 数值会发生什么变化?  如果最优解相对稳定,就会比较放心地应用最优解对应 的决策方案。

 如果最优解对参数的变化很敏感,就需要对参数的估计 值重新定义。  最优解或影子价格保持不变的参数变化范围是什么。  以上所说的分析称为what-if分析或敏感性分析。

2

使用EXCEL进行what-if分析

          改变目标函数系数 单个参数 多个参数 改变约束函数右端值 单个参数 多个参数 分析方法 单个试算 系统试算 利用敏感性分析报告

3

伟恩德公司案例研究

生产能力、产品所需资源、利润:

4hr/wk 工厂1

1hr 12hr/wk 工厂2 18hr/wk 工厂3

3hr

2hr

2hr

窗 利润:500/unit

4

利润:300/unit

伟恩德公司案例研究

 代数模型

max P  300D  500W s.t. D4 2W  12 3D  2W  18 D, W  0

5

伟恩德公司案例研究

what-if 分析之前,伟恩德公司问题电子表格模型及最优解。

6

如果伟恩德公司一种新产品单位 利润的估计值是不精确的,将会 对结果产生怎样的影响?

7

目标函数系数的变化

P2

(0,6) (2,6)

Max s.t.

3 P1 + 5 P2

P1 0 (非负约束)

(4,3)

目标函数系数的变化可能会改 变最优解,也可能不改变.

(9,0)

P1

(0,0) (4,0)

8

单个目标函数系数

门的单位利润PD=$300降到PD=$200,而最优解不变 。

9

单个目标函数系数

门的单位利润PD=$300增加到PD=$500,而最优解不变。

10

单个目标函数系数

门的单位利润从PD=$300增加到PD=$1000,最优解改变。

11

单个目系数标函数

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Unit Profit C Doors $300 D Windows $500 E F G Plant 1 Plant 2 Plant 3 Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 2 Windows 6 Hours Used 2 12 18

Units Produced

Unit Profit for Doors $100 $200 $300 $400 $500 $600 $700 $800 $900 $1,000

Optimal Units Produced Doors Windows 2 6

Total Profit $3,600

Select these cells (B18:E28), before choosing the Solver Table.

C D Optimal Units Produced 16 17 Doors Windows 18 =DoorsProduced =WindowsProduced

E Total Profit =TotalProfit

单个目标函数系数

16 17 18 19 20 21 22 23 24 25 26 27 28 B Unit Profit for Doors $100 $200 $300 $400 $500 $600 $700 $800 $900 $1,000 C D Optimal Units Produced Doors Windows 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 4 3 4 3 4 3 E Total Profit $3,600 $3,200 $3,400 $3,600 $3,800 $4,000 $4,200 $4,400 $4,700 $5,100 $5,500

系统地改变门单位利润得到的结果。

单个目

标函数系数

 用Excel求解伟恩德公司门窗生产问题输出的敏感性报告:

可变单 元格

终 递减 目标式 允许的 单元格 名称 值 成本 系数 增量 $C$12 Units Produced Doors 2 0 300 450 Units Produced $D$12 Windows 6 0 500 1E+30 约束 单元格 $E$7 $E$8 $E$9 名称 Plant 1 Used Plant 2 Used Plant 3 Used 允许的 减量 300 300

终 值 2 12 18

阴影 约束 允许的 允许的 价格 限制值 增量 减量 0 4 1E+30 2 150 12 6 6 100 18 6 6

14

单个目标函数系数

Adjustable Cells Cell Name $C$9 Solution Doors $D$9 Solution Windows Final Reduced Objective Allowable Allowable Value Cost Coefficient Increase Decrease 2 0 300 450 300 6 0 500 1E+30 300

伟恩德模型用Excel Solver产生的灵敏度分析报告的一 部分,其中最后三栏表示了门窗单位利润的最优域。

15

目标函数系数最优域图形表示

W Production rate for windows 8 (2, 6) is optimal for 0

4 Feasible region 2

Line C PD = 300 (Profit = 300 D + 500 W)

PD = 750 (Profit = 750 D + 500 W) Line A 0 2 4 6 Production rate for doors D

通过约束边界线的虚线B和虚线C是单位门的利润PD 等于最优域 ( 0 ≤ PD ≤ 750 )两个端点时的目标函数线。

目标函数系数C1在多大范围内变化最优解不变

最优解对应的起作用的约束: 2 P2

P2 (0,6)

(2,6)

3 P1 + 5 P2

0/2

(4,3)

0

现在C1 =3, 最多减少 3,最多增加 4.5, 在此范围内最优解不变。

(9,0)

(0,0) (4,0)

P1

17

目标函数系数C2在多大范围内变化最优解不变

最优解对应的起作用的约束: 2 P2

P2 (0,6)

(2,6)

Max

3 P1 + 5 P2

0/2

(4,3)

2

现在C2 =5, 最多减少 3,可任意增加, 在此范围内最优解不变。

(9,0)

(0,0) (4,0)

P1

18

如果伟恩德公司两种新产品单位 利润的估计值都是不精确的,将 会对结果产生怎样的影响?

19

多个目标函数系数

门,窗的单位利润分别被改为PD=$450,PW =$400, 但是最优解不变 。

20

多个目标函数系数

门,窗的单位利润分别被改为PD=$600,PW =$300, 最优解改变 。

21

多个目标函数系数

B 3 4 Unit Profit 5 6 7 Plant 1 8 Plant 2 9 Plant 3 10 11 12 Units Produced 13 14 15 16 Total Profit 17 18 19 Unit Profit 20 for Doors 21 C Doors $300 D Windows $500 E F G H I Hours Used Per Unit 1 0 0 2 3 2 Doors 2 Windows 6 Hours Used 2 12 18 Hours Available 4 12 18 Total Profit $3,600

Select these cells (C17:H21), before choosing the Solver Table.

$3,600 $300 $400 $500 $600

$100

Unit Profit for Windows $200 $300 $400

$500

C 17 =TotalProfit

多个目标函数系数

B 16 Total Profit 17 18 19 Unit Profit 20 for Doors 21

C $3,600 $300 $400 $500 $600

D $100 $1,500 $1,900 $2,300 $2,700

E F G Unit Profit for Windows $200 $300 $400 $1,800

$2,400 $3,000 $2,200 $2,600 $3,200 $2,600 $2,900 $3,400 $3,000 $3,300 $3,600

H $500 $3,600 $3,800 $4,000 $4,200

系统地改变门、窗单位利润得到的结果(总利润)。

多个目标函数系数

24 25 26 27 28 29 B C D Units Produced (Doors, Windows) (2, 6) $100 $300 (4, 3) Unit Profit $400 (4, 3) for Doors $500 (4, 3) $600 (4, 3) E F G Unit Profit for Windows $200 $300 $400 (4, 3) (2, 6) (2, 6) (4, 3) (2, 6) (2, 6) (4, 3) (4, 3) (2, 6) (4, 3) (4, 3) (4, 3) H $500 (2, 6) (2, 6) (2, 6) (2, 6)

C 25 =道如 果改变这些决策是否会提高最终收益。  影子价格( Shadow Price )

在给定线性规划模型的最优解和目标函数 相应值的条件下,影子价格就是约束函数右 端项(常数)变化一个单位,使得目标函数

值变化的量。  影子价格只有在约束右端值变动不大的情况

下才有效。

30

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 1.667 Windows 6.5

Hours Used 1.667 13 18

Hours Available 4 13 18 Total Profit $3,750

Units Produced

工厂2可用时间从12增加到13,总利润增加了$150 。

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 0 Windows 9

Hours Used 0 18 18

Hours Available 4 18 18 Total Profit $4,500

Units Produced

工厂2可用时间进一步从13增加到18,总利润增加了$750 。

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 0 Windows 9

Hours Used 0 18 18

Hours Available 4 20 18 Total Profit $4,500

Units Produced

工厂2可用时间进一步从18增加到20,总利润不再增加了。

单个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Unit Profit C Doors $300 D Windows $500 E F G Plant 1 Plant 2 Plant 3 Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 2 Windows 6 Hours Used 2 12 18

Units Produced

Time Available in Plant 2 (hours) 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Optimal Units Produced Doors Windows 2 6 4 2 4 2.5 4 3 3.667 3.5 3.333 4 3 4.5 2.667 5 2.333 5.5 2 6 1.667 6.5 1.333 7 1 7.5 0.667 8 0.333 8.5 0 9 0 9 0 9

Total Profit $3,600 $2,200 $2,450 $2,700 $2,850 $3,000 $3,150 $3,300 $3,450 $3,600 $3,750 $3,900 $4,050 $4,200 $4,350 $4,500 $4,500 $4,500

Incremental Profit

Select these cells (B18:E35), before choosing the Solver Table.

$250 $250 $150 $150 $150 $150 $150 $150 $150 $150 $150 $150 $150 $150 $0 $0

单个约束函数右端值

 用Excel求解伟恩德公司门窗生产问题输出的敏感性报告:

可变单 元格

终 递减 目标式 允许的 单元格 名称 值 成本 系数 增量 $C$12 Units Produced Doors 2 0 300 450 Units Produced $D$12 Windows 6 0 500 1E+30 约束 单元格 $E$7 $E$8 $E$9 名称 Plant 1 Used Plant 2 Used Plant 3 Used 允许的 减量 300 300

终 值 2 12 18

阴影 约束 允许的 允许的 价格 限制值 增量 减量 0 4 1E+30 2 150 12 6 6 100 18 6 6

35

伟恩德公司案例研究  代数模型

max P  300D  500W s.t.

D4 2W  12 3D  2W  18 D, W  0

36

 W Production rate for windows 10

影子价格可行域图

形表示

(0, 9) 8

2 W = 18  Profit = 300 (0) + 500 (9) = $4,500

6

Line B

(2, 6)

2 W = 12  Profit = 300 (2) + 500 (6) = $3,600

4

Feasible region for original (4, 3) 2 W = 6  Profit = 300 (4) + 500 (3) = $2,700

2

problem

Line C (3 D + 2 W = 18) Line A (D = 4)

0

2 4 Production rate for doors

6

D

多个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 Unit Profit C Doors $300 D Windows $500 E F G

Plant 1 Plant 2 Plant 3

Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 1.333 Windows 6.5

Hours Used 1.333 13 17

Hours Available 4 13 17 Total Profit $3,650

Units Produced

一个可用时间从工厂3转移到工厂2,总利润增加了$50 。

多个约束函数右端值

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Unit Profit C Doors $300 D Windows $500 E F G H Hours Used Per Unit Produced 1 0 0 2 3 2 Doors 2.000 Windows 6 Hours Used 2 12 18 Hours Available 4 12 18 Total Profit $3,600

Plant 1 Plant 2 Plant 3

Total (Plants 2 & 3) 30

Units Produced

Time Available Time Available Optimal Units Produced in Plant 2 (hours) in Plant 3 (hours) Doors Windows 2 6 12 18 2 6 13 17 1.333 6.5 14 16 0.667 7 15 15 0 7.5 16 14 0 7 17 13 0 6.5 18 12 0 6

Total Profit $3,600 $3,600 $3,650 $3,700 $3,750 $3,500 $3,250 $3,000

Incremental Profit

Select these cells (C19:F26), before choosing the Solver Table.

$50 $50 $50 -$250 -$250 -$250

百分之百法则(The 100 percent rule)

同时改变几个或所有函数约束的右端值,如 果这些变动的幅度不大,那么可以用影子价格预 测变动产生的影响。为了判别这些变动的幅度是 否允许,计算每一变动占允许变动的百分比(增 加或减少)。如果所有的百分比之和不超过100% ,那么影子价格仍然有效,如果所有百分比之和 超过100%,则无法确定影子价格是否有效 。

40

一个生产问题例子

每周的原材料:

8 Small Bricks

产品:

6 Large Bricks

Table Profit = $20 / Table

Chair Profit = $15 / Chair

Graphical Solution (Original Problem)

T 4 2T + 2C

Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

2

Optimal Solution (2, 2). Profit = $70

1

2T + C

1

2

3

4

5

6

C

Z = ($20)T + ($15)C = $70

7 Large Bricks

T 4 2T + 2C

Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 7 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

Z = ($20)T + ($15)C = $75

9 Large Bricks

T 4 New Optimal Solution (4, 0). Profit = $80

Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 9 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

3

2T + C

2

Old Optimal Solution (2, 2). Profit = $70

1 2T + C

2 3 4 5 6 C

Z = ($20)T + ($15)C = $80

$25 Profit per Table

T 4 2T + 2C

Maximize Profit = ($25)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

2

Optimal Solution (2, 2). Profit = $80

1

2T + C

1

2

3

4 5 6 C Z = ($25)T + ($15)C = $80

$35 Profit per Table

T 4 2T + 2C

Maximize Profit = ($35)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.

2

Old Optimal Solution (2, 2). Profit = $100 Z = ($35)T + ($15)C = $105

1

1

2

3

4

5

6

C

Generating the Sensitivity Report

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 6 8 Available 6 8 Total Profit $70.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 2 Chairs 2

Production Quantity:

After solving with Solver, choose “Sensitivity” under reports:

The Sensitivity Report

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 6 8 Available 6 8 Total Profit $70.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 2 Chairs 2

Production Quantity:

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

The Sensitivity Report

The solution

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

Allowable range (Solution stays the same)

Usage of the resource (Left-hand-side of constraint)

Allowable range (Shadow price is valid)

Increase in objective function value per unit increase in right-hand-side (RHS) ∆Z = (shadow price)(∆RHS)

$35 Profit per Table

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $35.00

Chairs $15.00 Total Used 6 6 Available 6 8 Total Profit $105.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 3 Chairs 0

Production Quantity:

Adjustable Cells Final Cell Name Value $C$11 Production Quantity: Tables 3 $D$11 Production Quantity: Chairs 0 Constraints Cell Name $E$7 Large Bricks Total Used $E$8 Small Bricks Total Used Final Value 6 6 Shadow Price 17.5 0 Constraint R.H. Side 6 8 Allowable Increase 2 1E+30 Allowable Decrease 6 2 Reduced Cost 0 -2.5 Objective Coefficient 35 15 Allowable Increase 1E+30 2.5 Allowable Decrease 5 1E+30

7 Large Bricks

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 7 8 Available 7 8 Total Profit $75.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 3 Chairs 1

Production Quantity:

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell Name $E$7 Large Bricks Total Used $E$8 Small Bricks Total Used Final Shadow Value Price 7 5 8 5 Constraint R.H. Side 7 8 Allowable Increase 1 6 Allowable Decrease 3 1 Final Reduced Objective Value Cost Coefficient 3 0 20 1 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

9 Large Bricks

B 3 4 5 6 7 8 9 10 11 C D E F G

Profit

Tables $20.00

Chairs $15.00 Total Used 8 8 Available 9 8 Total Profit $80.00

Large Bricks Small Bricks

Bill of Materials 2 1 2 2 Tables 4 Chairs 0

Production Quantity:

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell Name $E$7 Large Bricks Total Used $E$8 Small Bricks Total Used Final Shadow Value Price 8 0 8 10 Constraint R.H. Side 9 8 Allowable Increase 1E+30 1 Allowable Decrease 1 8 Final Reduced Objective Value Cost Coefficient 4 0 20 0 -5 15 Allowable Increase 1E+30 5 Allowable Decrease 5 1E+30

100% Rule for Simultaneous Changes in the Objective Coefficients

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

Examples: (Does solution stay the same?)

Profit per Table = $24 & Profit per Chair = $13 Profit per Table = $25 & Profit per Chair = $12 Profit per Table = $28 & Profit per Chair = $18

100% Rule for Simultaneous Changes in the Right-Hand-Sides

Adjustable Cells Cell Name $C$11 Production Quantity: Tables $D$11 Production Quantity: Chairs Constraints Cell $E$7 $E$8 Name Large Bricks Total Used Small Bricks Total Used Final Shadow Value Price 6 5 8 5 Constraint R.H. Side 6 8 Allowable Increase 2 4 Allowable Decrease 2 2 Final Reduced Objective Value Cost Coefficient 2 0 20 2 0 15 Allowable Increase 10 5 Allowable Decrease 5 5

Examples: (Are the shadow prices valid? If so, what’s the new total profit?) (+1 Large Brick) & (+2 Small Bricks) (+1 Large Brick) & (–1 Small Brick)

Summary of Sensitivity Report for Changes in the Objective Function Coefficients

 Final Value  The value of the decision variables (changing cells) in the optimal solution. Reduced Cost  Increase in the objective function value per unit increase in the value of a zero-valued variable (for small increases)—may be interpreted as the shadow price for the nonnegativity constraint. Objective Coefficient  The current value of the objective coefficient. Allowable Increase/Decrease  Defines the range of the coefficients in the objective function for

which the current solution (value of the decision variables or changing cells in the optimal solution) will not change.

Summary of Sensitivity Report for Changes in the Right-Hand-Sides

 Final Value

 The usage of the resource (or level of benefit achieved) in the optimal solution—the left-hand side of the constraint.

Shadow Price  The change in the value of the objective function per unit

increase in the right-hand-side of the constraint (RHS): ∆Z = (Shadow Price)(∆RHS) (Note: only valid if change is within the allowable range— see below.) The current value of the right-hand-side of the constraint. Defines the range of values for the RHS for which the shadow price is valid and hence for which the new objective function value can be calculated. (NOT the range for which the current solution will not change.)

 

Constraint R.H. Side

 

Allowable Increase/Decrease

 what-if 分析是在求得基本模型的最优解之后进行的, 这些分析可以为管理层决策提供非常有用的信息;  利用Solver Table系统地检查模型系数的变化给最优解 和目标函数值带来的变化;

 利用Excel Solver生成的灵敏度报告数据计算:最优解 保持不变的目标函数系数变动范围,或影子价格保持不变 的约束右端值变动范围;  利用目标函数系数的百分之百法则判断最优解变动情况 ;  利用约束右端值的百分之百法则判断目标函数值变动情况。

57

作业

 第五章下面两个习题选做一题 (5.1+5.8);5.7

 第五章共四个案例选做一个

58


相关内容

  • 人教版高中数学必修选修目录
  • 必修1 第一章 集合与函数概念 1.1 集合 阅读与思考 集合中元素的个数 1.2 函数及其表示 阅读与思考 函数概念的发展历程 1.3 函数的基本性质 信息技术应用 用计算机绘制函数图象 实习作业 小结 第二章 基本初等函数(Ⅰ) 2.1 指数函数 信息技术应用 借助信息技术探究指数函数的性质 2 ...

  • 舌诊实验报告
  • 篇一:探究味觉的实验报告 探究舌头与味觉的实验报告 实验名称:舌头与味觉的实验 要研究的问题:舌头各部位所最敏感的味道是什么? 实验准备(实验器材与药品):浓咖啡溶液.白糖溶液.食盐溶液和柠檬汁溶液各一杯.棉签少许 实验假设:舌尖对酸味最敏感:舌根对苦味最敏感:舌侧前对酸味最敏感:舌侧后对咸味最敏感 ...

  • 高中数学目录
  • 人教版高中数学目录 必修1 第一章 集合与函数概念 1.1 集合 1.2 函数及其表示 1.3 函数的基本性质 第二章 基本初等函数(Ⅰ) 2.1 指数函数 2.2 对数函数 2.3 幂函数 第三章 函数的应用 3.1 函数与方程 3.2 函数模型及其应用 必修2 第一章 空间几何体 1.1 空间几 ...

  • 房地产项目投资可行性研究分析报告写作格式(包括基本估算数据)
  • 房地产项目投资可行性研究分析报告写作格式(包括基本估算数据) 2009-03-28 02:22 第一部分 项目总论 1.项目概况 1.1项目名称 1.2项目建设单位 1.3项目位置(四周范围) 1.4项目周边目前现状 1.5项目性质及主要特点 1.6项目地块面积及边界长 1.7研究工作依据 1.8研 ...

  • 房地产项目投资可行性研究分析报告模板格式
  • 房地产项目投资可行性研究分析报告模板格式(包括基本估算数据) 第一部分 房地产项目总论(感觉像是后面的东西的概括)但有些后面没有的需要一个人去做 1.房地产项目概况 1.1房地产项目名称 1.2房地产项目建设单位 1.3房地产项目位置(四周范围) 1.4房地产项目周边目前现状 1.5房地产项目性质及 ...

  • 软件工程文档
  • 一. 可行研究报告 1引言 1.1编写目的 阐明编写可行性研究报告的目的,指明读者对象 1.2项目背景 建议开发的软件系统名称 项目提出者,开发者,用户,实现该软件的计算中心或计算中心或计算机网络 同其他系统的基本的相互往来关系 1.3定义 列出文档当中所用到的术语的定义和缩写词的原文 1.4参考资 ...

  • 学校总务科岗位职责
  • 总务科科长的职责权限与能力要求 1.岗位名称:总务科科长 2.直接上级:校长 3.直接下级:科员 4.职责与权限: 4.1职责:执行上级领导的决议,组织管理本科室的日常工作。 4.1.1在校长的领导下,全面主持总务科的工作,贯彻执行国家的各项方针政策和校领导及校长办公会的决定决议。 4.1.2根据上 ...

  • 超市账单管理系统可行性分析
  • 超市账单管理系统 可行性分析 第一章 .引言 . ............................................................................................................................. ...

  • 人教版高中数学教材最新目录
  • 人教版普通高中课程标准实验教科书 数学 1.3 算法案例 必修一 第一章 集合与函数概念 1.1 集合 1.2 函数及其表示 1.3 函数的基本性质 第二章 基本初等函数(Ⅰ) 2.1 指数函数 2.2 对数函数 2.3 幂函数 第三章 函数的应用 3.1 函数与方程 3.2 函数模型及其应用 第二 ...