CHAPTER 8: What If Analysis For Linear Programming
CHAPTER 8: What If Analysis For Linear Programming
Programming
Wyndor (Before What-If Analysis)
Figure 8.1 The spreadsheet model and its optimal solution for the original Wyndor
problem before beginning what-if analysis.
So if di niyo maalala kung paano nagkaroon ng values yung yellow and orange cells
1. Set niyo muna yung given (lagay yung unit profit, values nung sa plant chuchu
ganon)
2. Then, under hours used, input niyo =SUMPRODUCT(Hours used per unit
produced, Units produced)
3. Sa total profit, =SUMPRODUCT(Unit profit, units produce)
4. solver
5. CLICK SOLVE then, okay
Ito naman yung nagbago na ng values si sir, tas gumamit na siya ng sensitivity analysis
Figure 8.2 The revised Wyndor problem where the estimate of the unit profit for doors has
been decreased from P = $300 to P = $200, but no change occurs in the optimal
D D
solution.
• The profit per door has been revised from $300 to $200. No change occurs in the
optimal solution.
Figure 8.3 The revised Wyndor problem where the estimate of the unit profit for doors has
been increased from P = $300 to P = $500, but no change occurs in the optimal
D D
solution.
• The profit per door has been revised from $300 to $1,000.
• The optimal solution changes.
Figure 8.4 The revised Wyndor problem where the estimate of the unit profit for doors has
been increased from P = $300 to P = $1,000, which results in a change in the optimal
D D
solution.
Setting up a Parameter Analysis Report 1
Figure 8.5 The parameter cell dialog box for P specifies here that this parameter cell for
D
Figure 8.6 The dialog box for the parameter analysis report specifies here for the Wyndor
problem that the UnitProfitPerDoor parameter cell will be varied and that results from all
the changing cells (DoorsProduced and WindowsProduced) and the objective cell
(TotalProfit) will be shown.
Figure 8.8 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.
Figure 8.9 The two dashed lines that pass through the solid constraint boundary lines are
the objective function lines when P (the unit profit for doors) is at an endpoint of its
D
allowable range, 0 ≤ P ≤ 750. Therefore, either line or any objective function line in
D
between still yields (D, W) = (2, 6) as an optimal solution for the Wyndor problem.
• 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.
Figure 8.10 The revised Wyndor problem where the estimates of the unit profit for doors
and windows have been changed to P = $450 and P = $400, respectively, but no
D W
• 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.
Figure 8.11 The revised Wyndor problem where the estimates of the unit profit for doors
and windows have been changed to P = $600 and P = $300, respectively, which results
D W
• Select C4 and choose Optimization under the Parameters menu. (Unit Profit per
Door to be varied from $300 to $600)
• Select D4 and choose Optimization under the Parameters menu. (Unit Profit per
Window to be varied from $100 to $500)
Figure 8.12 The dialog box for the parameter analysis report specifies here that the
UnitProfitPerDoor and UnitProfitPerWindow parameter cells will be varied and results
from the objective cell (TotalProfit) will be shown for the Wyndor problem.
Total Profit
Doors Produced
Windows Produced
Figure 8.13 The parameter analysis report that shows how the optimal total profit
changes when systematically varying the estimate of both the unit profit for doors and the
unit profit for windows for the Wyndor problem.
Figure 8.14 The pair of parameter analysis reports that show how the optimal number of
doors to produce (top report) and the optimal number of windows to produce (bottom
report) change when systematically varying the estimate of both the unit profit for doors
and the unit profit for windows for the Wyndor problem.
Figure 8.15 When the estimates of the unit profits for doors and windows change to P = D
$525 and P = $350, which lies at the edge of what is allowed by the 100 percent rule, the
W
graphical method shows that (D, W) = (2, 6) still is an optimal solution. In addition, every
other point on the line segment between this solution and (4, 3) also is optimal.
$150 and P = $250 (half their original values), the graphical method shows that the
W
optimal solution still is (D, W) = (2, 6). This occurs even though the 100 percent rule says
that the optimal solution might change.
• 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).
Figure 8.18 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).
• The hours available in plant 2 have been further increased from 18 to 20.
• The total profit does not increase any further.
Figure 8.19 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.
Figure 8.21 The complete sensitivity report generated by the Excel Solver for the original
Wyndor problem.
• final value is yun amount of doors/windows that are the best to maximize profit, for
the variable cells table
• objective coefficient is yun profit per unit for doors and windows
• tapos yun allowable increase/decrease, that means yan lang pwede mong
mabawasan or madagdagan sa objective coefficient to still maintain the optimal
solution of 2 doors and 6 windows
• 1E+30 - infinite
• Constraint - ito na yung pinaka sagad chuchu ganon which is yung given
• If sinabay pinalit yung values, may times na the optimal solution remains the
same parin and all kasi u may be like touching the optimal solution point parin but
with a different line.\
• objective/Max of increase/decrease = percentage
Figure 8.24 By inserting a formula into cell G8 that keeps the total number of hours
available in plant 2 and 3 equal to 30, it will be possible to generate a one-way parameter
analysis report that shows the effect of shifting more and more of the hours from plant 3
to plant 2.
• This parameter analysis report shows the effect of shifting more and more of the
hours available from plant 3 to plant 2 for the Wyndor problem.
Figure 8.25 The parameter analysis report that shows the effect of shifting more and
more of the hours available from plant 3 to plant 2 for the Wyndor problem.
Robust Optimization
• It is often not possible to estimate parameters with as much accuracy as desired.
• The seriousness of the consequences depends somewhat on whether there is
any latitude in the functional constraint.
• A soft constraint is a constraint that can be violated a little bit without
serious complications.
• A hard constraint is a constraint that must be satisfied.
• The goal of robust optimization is to find a solution for the model that is
guaranteed to remain feasible and near optimal for all plausible combinations of
the actual values of the parameters. Such a solution is called a robust solution.
To guarantee that the solution will remain feasible regardless of the values taken on by
the parameters, assign the most conservative value within the range of uncertainty to
each uncertain parameter, and then find the optimal solution for the revised problem
Example
What happens if the production rates of doors and windows at plant 3 are uncertain?
Solution to Example
Figure 8.26 Applying robust optimization to the Wyndor problem, each uncertain
parameter has been set to its most conservative value in its range of uncertainty: H =D3
3.5 and H = 2.5. Running Solver then yields this robust solution.
D3
• A chance constraint only requires that the original constraint will be satisfied with
some very high probability while leaving a small chance that it will be violated a
little bit.
• Chance constraints are useful when dealing with soft constraints.
• Analytic Solver includes the ability to define uncertain parameters and also can
include chance constraints.
Example
What happens if the production rates of doors and windows at plant 3 are uncertain?
Figure 8.28 This add constraint dialog box specifies a chance constraint that E9 is
required to be less than or equal to G9 with probability 0.95.
Figure 8.29 The Platform tab of Analytic Solver’s Model pane that shows the Auto Adjust
Chance Constraints option set to True.
Solution to Example (After Optimizing)
Compare to the robust optimization solution which yields a more conservative solution
(0.857 doors and 6 windows) and a profit of $3,257.
Figure 8.30 The spreadsheet obtained after solving the Wyndor problem with Analytic
Solver to maximize the Total Profit (G12) while meeting the hard constraints (E7:E8 ≤
G7:G8) and having at least a 95% chance of satisfying the original constraint (E9 ≤ G9).
Figure 8.30 The spreadsheet obtained after solving the Wyndor problem with Analytic
Solver to maximize the Total Profit (G12) while meeting the hard constraints (E7:E8 ≤
G7:G8) and having at least a 95% chance of satisfying the original constraint (E9 ≤ G9).
Example:
Suppose the hours used per door and window follow the normal distribution, with a
standard deviation of 0.5 hours around their original estimates of 3 hours and 2 hours,
respectively.