Presentation is loading. Please wait.

Presentation is loading. Please wait.

第 5 章 線性規劃的假設分析 學習目標 5.2 繼續偉伯公司的個案研究(5.2節) 5.3

Similar presentations


Presentation on theme: "第 5 章 線性規劃的假設分析 學習目標 5.2 繼續偉伯公司的個案研究(5.2節) 5.3"— Presentation transcript:

1 第 5 章 線性規劃的假設分析 學習目標 5.2 繼續偉伯公司的個案研究(5.2節) 5.3 目標函數改變單一係數的影響(5.3節) 5.4–5.10 目標函數改變多個係數的影響(5.4節) 5.11–5.18 改變單一限制式的影響(5.5節) 5.19–5.24 改變多個限制式的影響(5.6節) 5.25–5.27 補充教材 敏感度分析(華盛頓大學上課教材) 5.28–5.44

2 學習目標 在讀完本章後,你應該能夠: 1. 解釋何謂假設(what-if)分析。 2. 摘要假設分析的優點。
2. 摘要假設分析的優點。 3. 列舉進行假設分析時,模式可以考慮哪些變化。 4. 說明如何利用試算表做任何一種的假設分析。 5. 有系統地利用規劃求解表(Solver Table)研究,當一個或多個資料儲存格變動時,對其他試驗值的影響。 6. 找出單一目標函數係數最多能變動多少,而使最佳解仍維持不變。 7. 測定目標函數係數同時改變後,此改變是否輕微,而使得原最佳解仍為最佳解。 8. 預測一個或多個函數限制式其右側值微動後,其目標儲存格的值將會如何變化。 9. 找出在上述預測仍為有效前,單一函數限制式右側值最多能變動多少。 10. 測定右側值改變多少後,其改變是否夠輕微而使得原預測仍然正確。

3 偉伯公司問題(假設分析之前) Figure 5.1 The spreadsheet model and its optimal solution for the original Wyndor problem before beginning what-if analysis.

4 利用試算表進行敏感度分析 每扇門的利潤從 $300 調整為 $200。 最佳解並沒有改變。
Figure 5.2 The revised Wyndor problem where the estimate of the unit profit for doors has been decreased from PD = $300 to PD = $200, but no change occurs in the optimal solution. 每扇門的利潤從 $300 調整為 $200。 最佳解並沒有改變。

5 利用試算表進行敏感度分析(續) 每扇門的利潤從 $300 調整為 $500。 最佳解並沒有改變。
Figure 5.3 The revised Wyndor problem where the estimate of the unit profit for doors has been increased from PD = $300 to PD = $500, but no change occurs in the optimal solution. 每扇門的利潤從 $300 調整為 $500。 最佳解並沒有改變。

6 利用試算表進行敏感度分析(續) 每扇門的利潤從 $300 調整為 $1,000。 最佳解已經改變。
Figure 5.4 The revised Wyndor problem where the estimate of the unit profit for doors has been increased from PD = $300 to PD = $1,000, which results in a change in the optimal solution. 每扇門的利潤從 $300 調整為 $1,000。 最佳解已經改變。

7 利用規劃求解表進行敏感度分析 Figure 5.5 Expansion of the spreadsheet to prepare for using the Solver Table to show the effect of systematically varying the estimate of the unit profit for doors in the Wyndor problem.

8 利用規劃求解表進行敏感度分析(續) Figure 5.6 An application of the Solver Table that shows the effect of systematically varying the estimate of the unit profit for doors in the Wyndor problem.

9 利用敏感度報表找出可行解區域 Figure 5.7 Part of the sensitivity report generated by the Excel Solver for the original Wyndor problem, where the last three columns enable identifying the allowable ranges for the unit profits for doors and windows.

10 以圖形說明可行解區域 Figure 5.8 The two dashed lines that pass through the solid constraint boundary lines are the objective function lines when PD (the unit profit for doors) is at an endpoint of its allowable range, 0 ≤ PD ≤ 750, since either line or any objective function line in between still yields (D, W) = (2, 6) as an optimal solution for the Wyndor problem. 二條通過可行解區域的虛線分為當 PD (門的單位利潤)在其可行區域(0 ≤ PD ≤ 750)二個端點值時之目標函數線。

11 利用試算表進行敏感度分析 每扇門的利潤從 $300 調整為 $450。 每扇窗的利潤從 $500 調整為 $400。 最佳解並沒有改變。
Figure 5.9 The revised Wyndor problem where the estimates of the unit profit for doors and windows have been changed to PD = $450 and PW = $400, respectively, but no change occurs in the optimal solution. 每扇門的利潤從 $300 調整為 $450。 每扇窗的利潤從 $500 調整為 $400。 最佳解並沒有改變。

12 利用試算表進行敏感度分析(續) 每扇門的利潤從 $300 調整為 $600。 每扇窗的利潤從 $500 調整為 $300。 最佳解已經改變。
Figure The revised Wyndor problem where the estimates of the unit profit for doors and windows have been changed to PD = $600 and PW = $300, respectively, which results in a change in the optimal solution. 每扇門的利潤從 $300 調整為 $600。 每扇窗的利潤從 $500 調整為 $300。 最佳解已經改變。

13 利用規劃求解表進行敏感度分析 Figure Expansion of the spreadsheet to prepare for using a two-dimensional Solver Table to show the effect on total profit of systematically varying the estimates of the unit profits for doors and windows for the Wyndor problem.

14 利用規劃求解表進行敏感度分析(續) Figure A two-dimensional application of the Solver Table that shows the effect on total profit of systematically varying the estimates of the unit profits of doors and windows for the Wyndor problem.

15 利用規劃求解表進行敏感度分析(續) Figure A two-dimensional application of the Solver Table that shows the effect on the optimal solution of systematically varying the estimates of the unit profits of doors and windows for the Wyndor problem.

16 100% 法則 目標函數係數同時變動的 100% 法則:若目標 函數係數同時變動,但仍落在可允許範圍內,可 先計算每一係數可允許變動值(增量或減量)的 百分比。如果變動百分比的加總沒有超過 100%, 則原有的最佳解仍然是最佳的(然而,變動百分 比的加總超過 100% 就不確定了)。

17 以圖形說明 100% 法則 門和窗的單位利潤估計值分別變為 PD = $525 和 PW = $350,此二值正好落在100% 法則所允許的範圍邊界。 Figure When the estimates of the unit profits for doors and windows change to PD = $525 and PW = $350, which lies at the edge of what is allowed by the 100 percent rule, the graphical method shows that (D, W) = (2, 6) still is an optimal solution, but now every other point on the line segment between this solution and (4, 3) also is optimal.

18 以圖形說明 100% 法則(續) 門和窗的單位利潤估計值分別變為 PD = $150 和 PW = $250(原來的一半),圖解法顯示最佳解仍為 (D, W) = (2, 6),即使100% 法則顯示出最佳解可能改變。 Figure When the estimates of the unit profits for doors and windows change to PD = $150 and PW = $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.

19 利用試算表進行敏感度分析 工廠 2 可利用產能時數從 12 增加為 13 小時,每週總利潤增加 $150。
Figure The revised Wyndor problem where the hours available in plant 2 per week have been increased from 12 to 13, which results in an increase of $150 in the total profit per week. 工廠 2 可利用產能時數從 12 增加為 13 小時,每週總利潤增加 $150。

20 利用試算表進行敏感度分析(續) Figure A further revision of the Wyndor problem to further increase the hours available in plant 2 from 13 to 18, which results in a further increase in total profit of $750 (amounting to $150 per hour added in plant 2). 工廠 2 可利用產能時數進一步從 13 增加為 18 小時,每週總利潤增加 $750。(工廠 2 每增加 1 小時產能可增加 $150)

21 利用試算表進行敏感度分析(續) 工廠 2 可利用產能時數進一步從 18 增加為 20 小時, 總利潤不再增加。
Figure A further revision of the Wyndor problem to further increase the hours available in plant 2 from 18 to 20, which results in no change in total profit because the optimal solution cannot make use of these additional hours. 工廠 2 可利用產能時數進一步從 18 增加為 20 小時, 總利潤不再增加。

22 利用規劃求解表進行敏感度分析 Figure An application of the Solver Table that shows the effect of varying the number of hours of production time being made available per week in plant 2 for Wyndor’s new products.

23 利用敏感度報表 Figure The complete sensitivity report generated by the Excel Solver for the original Wyndor problem.

24 可行解區域的圖形解說 Figure A graphical interpretation of the allowable range 6 ≤ RHS2 ≤ 18, for the right-hand side of Wyndor’s plant 2 constraint.

25 利用試算表進行敏感度分析 工廠 3 有 1 小時的可利用產能被移轉到工廠 2, 則每週總利潤可增加 $50 。
Figure The revised Wyndor problem where column G has been changed by shifting one of the hours available in plant 3 to plant 2 and then re-solving. 工廠 3 有 1 小時的可利用產能被移轉到工廠 2, 則每週總利潤可增加 $50 。

26 利用規劃求解表進行敏感度分析 Figure By inserting a formula into cell G8 that keeps the total number of hours available in plant 2 and 3 equal to 30, this one-dimensional application of Solver Table shows the effect of shifting more and more of the hours available from plant 3 to plant 2.

27 100% 法則 同時變動右側值的 100% 法則:用以預測一些函數限制 式右側值同時變動的陰影價格,只要變動不大,陰影價格 仍是有效的。必須知道這個變動是大是小,則要計算可允 許範圍下每個右側值可允許變動(增加或減少)的百分比。 如果這些變動百分比的加總沒有超過 100%,陰影價格仍然 有效。(若加總超過 100%,那就無法確定了。)

28 一個生產問題 原物料每週供給量: 產品: 每週原物料的供給量 產品: 6 大木塊 8 小木塊 桌子 利潤 = $20 /桌子 椅子
Slides 5.27–5.43 are based upon a lecture introducing sensitivity analysis for linear programming models to first-year MBA students at the University of Washington (as taught by one of the authors). The lecture is largely based upon a production problem using lego building blocks. This example is based upon an example introduced in an OR/MS Today article. To start the example, students are given a set of legos (8 small bricks and 9 large bricks)—one set per two students works pretty well. Tell them to set aside 3 of the large bricks to begin with (so they have a total of 6 to work with). These are their “raw materials”. They are then to produce tables and chairs out of these legos (see the diagram on the slide). These are their “products”. Each table generates $20 profit and each chair generates $15 profit. Their goal is to use their limited resources (the bricks) to make products (tables and chairs) so as to make as much profit as possible. The next slide contains some questions to be answered, one-by-one. The lego building blocks can be used to help answer the questions. 桌子 利潤 = $20 /桌子 椅子 利潤 = $15 /椅子

29 敏感度分析問題 給定每週原物料的供給量以及利潤資料下,分別應該 生產多少數量的桌子和椅子?每週的利潤為何?
若有額外一大木塊可以取得的話,最多你願意付多少 價錢來購買? 若再有二大木塊可以取得的話(亦即總數為 9 塊), 最多你願意付多少價錢來購買此二大木塊? 若桌子的利潤現在變為 $25(假設現在只有 6 大木塊可 以運用),分別應該生產多少數量的桌子和椅子? 若桌子的利潤現在變為 $35 ,分別應該生產多少數量 的桌子和椅子? With 6 large bricks and 8 small bricks, with $20 profit per table and $15 profit per chair, the optimal solution is to build 2 tables and 2 chairs. Suppose they purchase the large bricks from an outside supplier, and this supplier is offering one more large brick. How much are you willing to pay for it? Initial inspection leads some to believe they are worthless. All the bricks are being used up to make the 2 tables and 2 chairs. Eventually, someone stumbles upon the fact that with one more large brick, you can turn a chair into a table. The extra profit from this is $5, so you should be willing to pay up to $5 for it. Without realizing it (at this point), they have found the shadow price for large bricks ($5). Now suppose that the vendor offers yet two more large bricks at the bargain price of $6 for both of them (well less than $5 each). However, if two additional large bricks are made available (for a total of 9), they are no longer worth $5 each. The ninth brick is worthless, since only one more chair can be made into a table. Thus, at this point they have discovered the allowable range (without realizing it at this point). The $5 shadow price (value of the large bricks) is only valid for two extra large bricks. Now put the 3 extra large bricks away (go back to 6 total). If the profit per table is now $25, what’s the best production plan? Many think (at first) it should be 3 tables and no chairs since this gives $75 profit (an increase of $5). However, keeping 2 tables and 2 chairs generates a profit of $80 (an increase of $10). They have now seen that for small changes in an objective coefficient, the solution does not change. If the profit per table is now $35, what’s the best production plan? Now it is 3 tables and 0 chairs, with a weekly profit of $105. They have now seen the allowable range in action. For small changes in an objective coefficient, the solution does not change. However, if the coefficient changes enough, the solution does change.

30 圖形解(原始問題) 最大化 利潤 = ($20)T + ($15)C 受限於 2T + C ≤ 6 大木塊 2T + 2C ≤ 8 小木塊 和 T ≥ 0, C ≥ 0

31 7 大木塊 最大化 利潤 = ($20)T + ($15)C 受限於 2T + C ≤ 7 大木塊 2T + 2C ≤ 8 小木塊 和 T ≥ 0, C ≥ 0 If one more large brick is available, this moves the large- brick constraint-boundary line out. This, in turn, increases the size of the feasible region. The optimal solution is still at the same corner (at the corner of the small brick and large brick constraint boundary lines), but this corner has moved from (2,2) to (3,1). The profit increases by $5. At this point, you may want to introduce the idea of the “shadow price”.

32 9 大木塊 最大化 利潤 = ($20)T + ($15)C 受限於 2T + C ≤ 9 大木塊 2T + 2C ≤ 8 小木塊 和 T ≥ 0, C ≥ 0 If two additional large bricks are available, this moves the large- brick constraint-boundary line further out, so it is now beyond the small-brick constraint (intersecting the T-axis at 4.5). This, in turn, increases the size of the feasible region. The optimal solution moves out with the large brick constraint until the large brick constraint moves past the small-brick constraint. At this point, the optimal solution is “stuck” at (4,0). The main point here is that the objective function increases by $5 for each increase in the right-hand-side of the large-brick constraint, but only up to a point (an increase of 2). Beyond that, the shadow price changes from $5 to $0. At this point, you may want to introduce the idea of the “allowable range”.

33 每張桌子利潤為 $25 最大化 利潤 = ($25)T + ($15)C 受限於 2T + C ≤ 6 大木塊 2T + 2C ≤ 8 小木塊 和 T ≥ 0, C ≥ 0 If the profit per table changes to $25, this changes the slope of the objective function line (it is now flatter). However, the same corner point is still optimal, so the solution does not change. The main point here is that for small changes in the objective function coefficients, the optimal solution remains the same. The solution will only change once the slope changes enough so that a new corner point is optimal. (See next slide.)

34 每張桌子利潤為 $35 最大化 利潤 = ($35)T + ($15)C 受限於 2T + C ≤ 6 大木塊 2T + 2C ≤ 8 小木塊 和 T ≥ 0, C ≥ 0 If the profit per table changes to $35, this changes the slope of the objective function line (it is now significantly flatter). Now a new corner point (3 tables and 0 chairs) is optimal. The main point here is that for small changes in an objective function coefficient, the optimal solution remains the same. However, once the objective function coefficient changes enough, a new corner point will be optimal. At this point, you may want to introduce the idea of the “allowable range”.

35 產生敏感度報告 在以 Solver 求解後,在“Reports”方塊中選擇 “Sensitivity”:

36 敏感度報告

37 當右側值(RHS)增加 1單位時,目標函數值的增量 ∆Z = (影子價格)(∆RHS)
敏感度報告(續) 可允許範圍 (最佳解仍然相同) 最佳解 資源使用量 (限制式的左側值) 可允許範圍 (影子價格仍然適用) 當右側值(RHS)增加 1單位時,目標函數值的增量 ∆Z = (影子價格)(∆RHS)

38 每張桌子利潤為 $35 Some interesting things to point out on this sensitivity report: There’s slack in the small bricks constraint (6 used, 8 available), and the shadow price = 0. Point out that slack > 0 always implies shadow price = 0. (If you’ve got extra anyway, more will be of no value.) The shadow price is 17.5 for the large brick constraint. At this solution, there are 3 tables, 0 chairs, and 2 leftover small bricks. You might think that with one more large brick, you would combine it with the 2 leftover small bricks and make a chair (profit = $15). But why is the shadow price $17.50? It turns out to be better to take one small brick and one large brick and make half a table (profit = half of $35 = $17.50). The 1E+30 value appears in three locations. This is Excel’s representation for ∞. Explain the intuition of why each of these values is ∞.

39 7 大木塊

40 9 大木塊

41 目標函數係數同時變動的 100% 法則 若目標函數係數同時變動,但仍落在可允許範圍內,可先計算每一 係數可允許變動值(增量或減量)的百分比。如果變動百分比的加 總沒有超過 100%,則原有的最佳解仍然是最佳的(然而,變動百分 比的加總超過 100% 就不確定了)。 Profit/Table = $24 (increase of 4), Profit/Chair = 13 (decrease of 2) (40% of allowable increase) + (40% of allowable decrease)= 80% ≤ 100% Solution stays the same. Profit/Table = $25 (increase of 5), Profit/Chair = $12 (decrease of 3) (50% of allowable increase) + (60% of allowable decrease) = 110% > 100% Solution may or may not change. It turns out it does in this case (to 3 tables and 0 chairs, profit = $75) Profit/Table = $28 (increase of 8), Profit/Chair = $18 (increase of 3) (80% of allowable increase) + (60% of allowable increase) = 140% > 100% Solution may or may not change. It turns out in this case it does not (2 tables, 2 chairs, profit = $92) 範例:(最佳解是否仍然相同?) 每張桌子利潤 = $24 & 每張椅子利潤 = $13 每張桌子利潤 = $25 & 每張椅子利潤 = $12 每張桌子利潤 = $28 & 每張椅子利潤 = $18

42 同時變動右側值的 100% 法則 用以預測一些函數限制式右側值同時變動的影子價格,只要變動不 大,影子價格仍是有效的。必須知道這個變動是大是小,則要計算 可允許範圍下每個右側值可允許變動(增加或減少)的百分比。如 果這些變動百分比的加總沒有超過 100%,影子價格仍然有效。(若 加總超過 100%,那就無法確定了。) (+1 large brick) & (+2 small bricks) (50% of allowable increase) + (50% of allowable increase) = 100% ≤ 100% shadow prices valid ∆Z = (5)(+1) + (5)(+2) = +$15 (one more chair) (+1 large brick) & (–1 small brick) (50% of allowable increase) + (50% of allowable decrease) = 100% ≤ 100% ∆Z = (5)(+1) + (5)(–1) = $0 New solution = 3.5 tables, 0 chairs, profit = $70 範例:(影子價格是否有效?若是的話,新的總利潤為何?) (+1 大木塊) & (+2 小木塊) (+1 大木塊) & (–1小木塊)

43 目標函數係數同時改變的敏感度報告摘要 終值(Final Value) 遞減成本(Reduced Cost)
最佳解中決策變數(變動儲存格)的數值。 遞減成本(Reduced Cost) 最佳解中數值為 0 的變數每增加 1 單位(小幅的增量),目標函數值的增加量—可以解釋為非負限制式的陰影價格。 目標式係數(Objective Coefficient) 目前目標函數的係數值。 允許的增量╱減量(Allowable Increase/Decrease) 定義目標函數係數可以變動的範圍,而可以使得目前的解(最佳解中決策變數或變動儲存格的數值)不會改變。

44 限制式右側值同時改變的敏感度報告摘要 終值(Final Value) 陰子價格(Shadow Price)
最佳解時資源的使用量(或效益達成量)—限制式的左側值 陰子價格(Shadow Price) 當限制式右側值(RHS)每增加 1 單位,目標函數值的改變量: ∆Z = (影子價格)(∆RHS) (注意:只有在可允許範圍內變動方為有效) 限制式R.H. Side(Constraint R.H. Side) 目前限制式的右側值 允許的增量╱減量(Allowable Increase/Decrease) 定義影子價格仍然有效的右側值範圍(並非是使得目前最佳解不變的範圍),因此新的目標函數值可以計算出。


Download ppt "第 5 章 線性規劃的假設分析 學習目標 5.2 繼續偉伯公司的個案研究(5.2節) 5.3"

Similar presentations


Ads by Google