LP 3 of 3_Sensitivity Analysis
LP 3 of 3_Sensitivity Analysis
4.0 Introduction
In chapters 2 and 3, we studied how to formulate and solve LP models for a variety
of decision problems. However, formulating and solving an LP model does not
necessarily mean that the original decision problem has been solved. After solving an
LP model, a number of questions often arise about the optimal solution. In particular,
we might be interested in how sensitive the optimal solution is to changes in various
coefficients of the LP model.
Businesses rarely know with certainty what costs will be incurred or the exact
amount of resources that will be consumed or available in a given situation or time
period. Thus, optimal solutions obtained using models that assume all relevant factors
are known with certainty might be viewed with skepticism by management. Sensitivity
analysis can help overcome this skepticism and provide a better picture of how the
solution to a problem will change if different factors in the model change. Sensitivity
analysis also can help answer a number of practical managerial questions that might
arise about the solution to an LP problem.
Realizing that such uncertainties exist, a manager should consider how sensitive
an LP model’s solution is to changes or estimation errors that might occur in: (1) the
objective function coefficients (the cj), (2) the constraint coefficients (the aij), and (3) the
RHS values for the constraints (the bi). A manager also might ask a number of “What
if?” questions about these values. For example, what if the cost of a product increases
by 7%? What if a reduction in setup time allows for additional capacity on a given
machine? What if a worker’s suggestion results in a product requiring only 2 hours
of labor rather than three? Sensitivity analysis addresses these issues by assessing the
sensitivity of the solution to uncertainty or estimation errors in the model coefficients,
as well as the solution’s sensitivity to changes in model coefficients that might occur
because of human intervention.
This model is implemented in the spreadsheet shown in Figure 4.1 (and file Fig4-1.
xlsm that accompanies this book). (See chapter 3 for details on the procedure used
The Answer Report 143
FIGURE 4.1 Spreadsheet model for the Blue Ridge Hot Tubs product mix problem
Variable Cells
Objective Cell
Constraint Cells
D6 5SUMPRODUCT(B6:C6,$B$5:$C$5) D9:D11
to create and solve this spreadsheet model.) After solving the LP problem, a number
of reports are available about its solution via the Reports icon on the Analytic Solver
Platform tab on the ribbon.
Software Note
When solving an LP problem, be sure to use Solver’s Standard LP/Quadratic
Engine. This allows for the maximum amount of sensitivity analysis information
in the reports discussed throughout this chapter.
FIGURE 4.2
Answer Report
for the hot tub
problem
The final section of this report provides information about the constraints. In
particular, the Cell Value column shows the final (optimal) value assumed by each
constraint cell. Note that these values correspond to the final value assumed by the LHS
formula of each constraint. The Formula column indicates the upper or lower bounds
that apply to each constraint cell. The Status column indicates which constraints are
binding and which are nonbinding. A constraint is binding if it is satisfied as a strict
equality in the optimal solution; otherwise, it is nonbinding. Notice that the constraints
for the number of pumps and amount of labor used are both binding, meaning that
all the available pumps and labor hours will be used if this solution is implemented.
Therefore, these constraints are preventing Blue Ridge Hot Tubs from achieving a
higher level of profit.
Finally, the values in the Slack column indicate the difference between the LHS
and RHS of each constraint. By definition, binding constraints have zero slack and
nonbinding constraints have some positive level of slack. The values in the Slack
column indicate that if this solution is implemented, all the available pumps and labor
hours will be used, but 168 feet of tubing will be left over. The slack values for the
nonnegativity conditions indicate the amounts by which the decision variables exceed
their respective lower bounds of zero.
The Answer Report does not provide any information that could not be derived
from the solution shown in the spreadsheet model. However, the format of this report
gives a convenient summary of the solution that can be incorporated easily into a word-
processing document as part of a written report to management.
The Sensitivity Report 145
Report Headings
When creating the reports described in this chapter, Solver will try to use various
text entries from the original spreadsheet to generate meaningful headings
and labels in the reports. Given the various ways in which a model can be
implemented, Solver might not always produce meaningful headings. However,
you can change any text entry to make the report more meaningful or descriptive.
FIGURE 4.3
Sensitivity Report
for the hot tub
problem
146 Chapter 4 Sensitivity Analysis and the Simplex Method
Original Level
Curve
Original
Optimal
Solutions
FIGURE 4.5 How a change in an objective function coefficient can change the slope of the level curve and
the optimal solution
New Level
Curve
New Optimal
Solutions
The Sensitivity Report 147
see that if the slope of the level curve were different, the extreme point represented by
X1 5 80, X2 5 120 would be the optimal solution. Of course, the only way to change
the level curve for the objective function is to change the coefficients in the objective
function. So, if the objective function coefficients are at all uncertain, we might be
interested in determining how much these values could change before the optimal
solution would change.
For example, if the owner of Blue Ridge Hot Tubs does not have complete control
over the costs of producing hot tubs (which is likely because he purchases the fiberglass
hot tub shells from another company), the profit figures in the objective function
of our LP model might not be the exact profits earned on hot tubs produced in the
future. So before the manager decides to produce 122 Aqua-Spas and 78 Hydro-Luxes,
he might want to determine how sensitive this solution is to the profit figures in the
objective. That is, the manager might want to determine how much the profit figures
could change before the optimal solution of X1 5 122, X2 5 78 would change. This
information is provided in the Sensitivity Report shown in Figure 4.3.
The original objective function coefficients associated with the variable cells are
listed in the Objective Coefficient column in Figure 4.3. The next two columns show the
allowable increases and decreases in these values. For example, the objective function
value associated with Aqua-Spas (or variable X1) can increase by as much as $100 or
decrease by as much as $50 without changing the optimal solution, assuming all other
coefficients remain constant. (You can verify this by changing the profit coefficient
for Aqua-Spas to any value in the range from $300 to $450 and re-solving the model.)
Similarly, the objective function value asso ciated with Hydro-Luxes (or variable X2)
can increase by $50 or decrease by approximately $66.67 without changing the optimal
values of the decision variables, assuming all other coefficients remain constant. (Again,
you can verify this by re-solving the model with different profit values for Hydro-Luxes.)
Software Note
When setting up a spreadsheet model for an LP problem for which you
intend to generate a Sensitivity Report, it is a good idea to make sure the cells
corresponding to RHS values of constraints contain constants or formulas that
do not involve the decision variables. Thus, any RHS formula related directly
or indirectly to the decision variables should be moved algebraically to the LHS
of the constraint before implementing your model. This will help to reduce
problems in interpreting the Solver Sensitivity Report.
the current solution remains optimal if changes are made in two or more objective
coefficients at the same time.
FIGURE 4.6 Solution to the revised hot tub problem with 162 additional labor hours
150 Chapter 4 Sensitivity Analysis and the Simplex Method
FIGURE 4.7
How a change
in the RHS
value of the labor
constraint changes
the feasible region
and optimal
solution
optimal solution to the revised problem is different from the solution to the original
problem shown in Figure 4.1. This is not surprising because changing the RHS of a
constraint also changes the feasible region for the problem. The effect of increasing the
RHS of the labor constraint is shown graphically in Figure 4.7.
So, although shadow prices indicate how the objective function value changes if
a given RHS value changes, they do not tell you which values the decision variables
need to assume in order to achieve this new objective function value. Determining the
new optimal values for the decision variables requires that you make the appropriate
changes in the RHS value and re-solve the model.
Another Interpretation
of Shadow Prices
Unfortunately, there is no one universally accepted way of reporting shadow
prices for constraints. In some software packages, the signs of the shadow prices
do not conform to the convention used by Solver. Regardless of which software
package you use, there is another way to look at shadow prices that should
always lead to a proper interpretation. The absolute value of the shadow price
always indicates the amount by which the objective function will be improved
if the corresponding constraint is loosened. A less than or equal to constraint is
loosened by increasing its RHS value, whereas a greater than or equal to constraint
is loosened by decreasing its RHS value. (The absolute value of the shadow price
can also be interpreted as the amount by which the objective will be made worse if
the corresponding constraint is tightened.)
The Sensitivity Report 151
FIGURE 4.8 Spreadsheet model for the revised product mix problem with three hot tub models
E6 5SUMPRODUCT(B6:D6,$B$5:$D$5) E9:E11
this revised problem is represented as follows, where X1, X2, and X3 represent the number
of Aqua-Spas, Hydro-Luxes, and Typhoon-Lagoons to be produced, respectively:
MAX: 350X1 1 300X2 1 320X3 } profit
Subject to: 1X1 1 1X2 1 1X3 # 200 } pump constraint
9X1 1 6X2 1 8X3 # 1,566 } labor constraint
12X1 1 16X2 1 13X3 # 2,880 } tubing constraint
X1, X2, X3 $ 0 } nonnegativity conditions
This model is implemented and solved in the spreadsheet, as shown in Figure 4.8
(and file Fig4-8.xlsm that accompanies this book). Notice that the optimal solution
to this problem involves producing 122 Aqua-Spas 1 X1 5 122 2 , 78 Hydro-Luxes
1 X2 5 78 2 , and no Typhoon-Lagoons 1 X3 5 0 2 . So, as expected, the optimal solution
does not involve producing Typhoon-Lagoons. Figure 4.9 shows the Sensitivity Report
for our revised model.
the reduced cost value for Typhoon-Lagoons is 213.33. This is the same number that
we calculated in the previous section when determining whether or not it would be
profitable to produce Typhoon-Lagoons.
The reduced cost for each variable is equal to the per-unit amount the product
contributes to profits minus the per-unit value of the resources it consumes (where the
consumed resources are priced at their shadow prices). For example, the reduced cost
of each variable in this problem is calculated as:
Reduced cost of Aqua-Spas 5 350 2 200 3 1 2 16.67 3 9 2 0 3 12 5 0
Reduced cost of Hydro-Luxes 5 300 2 200 3 1 2 16.67 3 6 2 0 3 16 5 0
Reduced cost of Typhoon-Lagoons 5 320 2 200 3 1 2 16.67 3 8 2 0 3 13 5 213.33
The allowable increase in the objective function coefficient for Typhoon-
Lagoons equals 13.33. This means that the current solution will remain optimal
provided that the marginal profit on Typhoon-Lagoons is less than or equal to
$320 1 $13.33 5 $333.33 (because this would keep its reduced cost less than or equal
to zero). However, if the marginal profit for Typhoon-Lagoons is more than $333.33,
producing this product would be profitable and the optimal solution to the problem
would change.
It is interesting to note that the shadow prices (marginal values) of the resources
consumed equate exactly with the marginal profits of the products that, at optimality,
assume values between their simple lower and upper bounds. This will always be the
case. In the optimal solution to an LP problem, the variables that assume values between
their simple lower and upper bounds always have reduced cost values of zero. (In
our example problem, all the variables have implicit simple upper bounds of positive
infinity.) The variables with optimal values equal to their simple lower bounds have
reduced cost values that are less than or equal to zero for maximization problems, or
greater than or equal to zero for minimization problems. Variables with optimal values
equal to their simple upper bounds have reduced cost values that are greater than or
FIGURE 4.9
Sensitivity Report
for the revised
product mix
problem with three
hot tub models
154 Chapter 4 Sensitivity Analysis and the Simplex Method
FIGURE 4.10
Summary of Optimal Value of Optimal Value of
optimal reduced Type of Problem Decision Variable Reduced Cost
cost values at simple lower bound #0
Maximization between lower and upper bounds 50
at simple upper bound $0
at simple lower bound $0
Minimization between lower and upper bounds 50
at simple upper bound #0
equal to zero for maximization problems, or less than or equal to zero for minimization
problems. Figure 4.10 summarizes these relationships.
Generally, at optimality, a variable assumes its largest possible value (or is set
equal to its simple upper bound) if this variable helps improve the objective function
value. In a maximization problem, the variable’s reduced cost must be nonnegative
to indicate that if the variable’s value increased, the objective value would increase
(improve). In a minimization problem, the variable’s reduced cost must be non-
positive to indicate that if the variable’s value increased, the objective value would
decrease (improve).
Similar arguments can be made for the optimal reduced costs of variables at their
lower bounds. At optimality, a variable assumes its smallest (lower bound) value if it
cannot be used to improve the objective value. In a maximization problem, the vari-
able’s reduced cost must be nonpositive to indicate that if the variable’s value increased,
the objective value would decrease (worsen). In a minimization problem, the variable’s
reduced cost must be nonnegative to indicate that if the variable’s value increased, the
objective value would increase (worsen).
Key Points
Our discussion of Solver’s Sensitivity Report highlights some key points concern-
ing shadow prices and their relationship to reduced costs. These key points are
summarized as:
The shadow prices of resources equate the marginal value of the resources
consumed with the marginal benefit of the goods being produced.
Resources in excess supply have a shadow price (or marginal value) of zero.
The reduced cost of a product is the difference between its marginal profit
and the marginal value of the resources it consumes.
Products whose marginal profits are less than the marginal value of the goods
required for their production will not be produced in an optimal solution.