4 Sensitivity Analysis: Ch83 Ep87 Ko87
4 Sensitivity Analysis: Ch83 Ep87 Ko87
Sensitivity Analysis
The subject of this chapter is the introduction of marginal values (shadow This chapter
prices and reduced costs) and sensitivity ranges which are tools used when
conducting a sensitivity analysis of a linear programming model. A sensitivity
analysis investigates the changes to the optimal solution of a model as the
result of changes in input data.
4.1 Introduction
The simplex algorithm gives extra information in addition to the optimal so- Marginal values
lution. The algorithm provides marginal values which give information on the
variability of the optimal solution to changes in the data. The marginal values
are divided into two groups:
shadow prices which are associated with constraints and their right-hand
side, and
reduced costs which are associated with the decision variables and their
bounds.
In addition to marginal values, the simplex algorithm can also provide sen- Sensitivity
sitivity range information. These ranges are defined in terms of two of the ranges
characteristics of the optimal solution, namely the optimal objective value and
the optimal basis. By considering the objective function as fixed at its optimal
value, sensitivity ranges can be calculated for both the decision variables and
the shadow prices. Similarly, it is possible to fix the optimal basis, and to cal-
culate the sensitivity ranges for both the coefficients in the objective function
and the right-hand sides of the constraints. All four types will be illustrated in
this chapter.
Although algorithms for integer programming also provide marginal values, Linear
the applicability of these figures is very limited, and therefore they will not be programming
used when examining the solution of an integer program. only
In this section all constraints are assumed to be in standard form. This means Constant
that all variable terms are on the left-hand side of the (in)equality operator and right-hand side
the right-hand side consists of a single constant. The following definition then
applies.
To improve the objective function (that is, decreases for a minimization prob- Constraint
lem and increases for a maximization problem), it is necessary to weaken a weakening
binding constraint. This is intuitive because relaxing is equivalent to enlarging
the feasible region. A “≤” constraint is weakened by increasing the right-hand
side and a “≥” constraint is weakened by decreasing the right-hand side. It
therefore follows that the signs of the shadow prices for binding inequality
constraints of the form “≤” and “≥” are opposite.
When your model includes equality constraints, such a constraint could be in- Equality
corporated into the LP by converting it into two separate inequality constraints. constraints
In this case, at most one of these will have a nonzero price. As discussed above,
the nature of the binding constraint can be inferred from the sign of its shadow
price. For example, consider a minimization problem with a negative shadow
price for an equality constraint. This indicates that the objective will decrease
Chapter 4. Sensitivity Analysis 43
(i.e. improve) with an increase in the right-hand side of the equality constraint.
Therefore, it is possible to conclude that it is the “≤” constraint (and not the
“≥” constraint) that is binding since it is relaxed by increasing the right-hand
side.
Table 4.1 presents the shadow prices associated with the constraints in the Potato chips
potato chips example from Chapter 2. model
The objective in the potato chips model is profit maximization with less than
or equal process requirement constraints. The above shadow prices can be
used to estimate the effects of changing the binding constraints. Specifically,
as discussed below, it is possible to deduce from the positive values of the
frying and packing constraints that there will be an increase in the overall
profit if these process times are increased.
If a binding constraint is tightened, the value of the objective will deteriorate Tightening
by the amount approximated by the shadow price. For the case of lowering the constraint
upper bound on the availability of the packer to 329 minutes, profit decreases
by $0.33 to $189.67. This shows that the shadow price gives the amount of
change in both directions.
Amount of
Mexican chips packing
(0,86.25)
(0,70)
frying
Amount of
plain chips
(0,0) (32.5,0) (82.5,0) (120,0)
In Figure 4.1, there is a graphical illustration of what happens when the pack- Picturing the
ing constraint is weakened. The corresponding line shifts to the right, thus process
enlarging the feasible region. Consequently, the dashed line segment repre-
senting the linear objective function can also shift to the right, yielding a more
profitable optimal solution. Notice that if the constraint is weakened much
further, it will no longer be binding. The optimal solution will be on the corner
where the frying line and the plain chips axis intersect (120,0). This demon-
strates that the predictive power of shadow prices in some instances only ap-
plies to limited changes in the data.
In general, the conclusions drawn by analyzing shadow prices are only true for Shadow price
small changes in data. In addition, they are only valid if one change is made at limitations
a time. The effects of changing more data at once cannot be predicted.
In the two decision variable example to date, there have only been two bind- Degeneracy
ing constraints. However, if there were three or more constraints binding at
the optimal solution, weakening one requirement may not have the effect sug-
gested by the shadow prices. Figure 4.2 depicts this situation, where the bold
lines can be interpreted as three constraints that intersect at the optimal so-
lution. This condition is referred to as degeneracy and can be detected when
one or more of the variables (decision and/or slack variables) in the basis are
at one of their bounds. In this example, one of the three slack variables will
be in the basis at their bound of zero. In the presence of degeneracy, shadow
Chapter 4. Sensitivity Analysis 45
1 2 3
Amount of
plain chips
(0,0)
In general, the information provided by shadow prices should only be used as Conclusion
an indication of the potential for improvement to the optimal objective func-
tion value. However, there are some circumstances where a slightly stronger
conclusion can be drawn. Specifically, if there are shadow prices that are large
relative to others, then it is possible that the optimal solution is overly sen-
sitive to changes in the corresponding data. Particular care should be taken
when this data is not known exactly. Under these conditions, it might be wise
to use methods specifically designed for handling uncertainty in data, or to
run a set of experiments investigating the exact effect on the (optimal) solu-
tion with particular data modifications.
A decision variable has a marginal value, referred to as its reduced cost, Definition
which is defined as the rate of change of the objective function for a one
unit increase in the bound of this variable. If a nonbasic variable has
a positive reduced cost, the objective function will increase with a one
unit increase in the binding bound. The objective function will decrease
if a nonbasic variable has a negative reduced cost. The reduced cost of
a basic variable is zero since its bounds are nonbinding and therefore
do not constrain the optimal solution.
Chapter 4. Sensitivity Analysis 46
By definition, a nonbasic variable is at one of its bounds. Moving it off the Improving the
bound when the solution is optimal, is detrimental to the objective function objective
value. A nonbasic variable will improve the objective function value when its
binding bound is relaxed. Alternatively, the incentive to include it in the basis
can be increased by adjusting its cost coefficient. The next two paragraphs
explain how reduced cost information can be used to modify the problem to
change the basis.
A nonbasic variable is at either its upper or lower bound. The reduced cost Bound
gives the possible improvement in the objective function if its bound is re- relaxation
laxed. Relax means decreasing the bound of a variable at its lower bound or
increasing the bound of a variable at its upper bound. In both cases the size
of the feasible region is increased.
The objective function value is the summation of the product of each variable Objective
by its objective cost coefficient. Therefore, by adjusting the objective cost coefficient
coefficient of a nonbasic variable it is possible to make it active in the optimal
solution. The reduced cost represents the amount by which the cost coefficient
of the variable must be lowered. A variable with a positive reduced cost will
become active if its cost coefficient is lowered, while the cost coefficient of a
variable with a negative reduced cost must be increased.
Table 4.2 gives the reduced costs associated with the optimal solution of the Potato chips
potato chips model. In this problem the decision variables are the quantity of model
both types of chips to be included in the optimal production plan. The reduced
costs of both chip types are zero. This is expected since neither chip type is
at a bound (upper or lower) in the optimal solution. It is possible to make one
variable nonbasic (at a bound) by modifying the data.
A modification to the potato chips model which results in a nonzero reduced The modified
cost, is to lower the net profit contribution of Mexican chips from 1.50 to 0.50 potato chips
$/kg. Solving the model gives the optimal production plan in Table 4.3, where model
Mexican chips production is now nonbasic and at its lower bound of zero. As a
result, there is a reduced cost associated with the production of Mexican chips.
The profit has dropped from $190 to $165, which is the best achievable with
these profit contributions.
Chapter 4. Sensitivity Analysis 47
In Table 4.3, the zero reduced cost of plain chips production reflects that it Interpretation
is basic. The nonzero reduced cost for Mexican chips indicates that it is at a
bound (lower). Its negative reduced cost indicates that the objective function
value will decrease should the quantity of Mexican chips be increased by one
unit. Given that it is a maximization problem, this is unattractive and hence is
consistent with the decision to place the variable at its lower bound.
The optimal Mexican chips production is at its lower bound because it is more Adjusting
attractive to produce plain chips. However, by adjusting its objective cost objective
coefficient it is possible for Mexican chips to become active in the optimal coefficient
solution. From Table 4.3, and using the fact that the potato chips model is a
maximization model, it can be concluded that if the profit contribution from
Mexican chips is increased by at least 0.5 $/kg, then Mexican chips will become
basic.
Changing coefficients in the objective can be regarded as changing the slope Picturing the
of the objective function. In Figure 4.3, profit lines corresponding to different process
profit contributions from Mexican chips are given. It can easily be seen that the
slope of the objective determines which corner solution is optimal. Reduced
costs give the minimal change in a coefficient of the objective such that the
optimal solution shifts from a corner on one of the axes to another corner
of the feasible region (possibly on one or more of the other axes). Note that
the slope of line (2) is parallel to the slope of the constraint on packing, thus
yielding multiple optimal solutions.
One might conclude that a model never needs to be solved on the computer Conclusion
more than once since all variations can be derived from the reduced costs and
shadow prices. However, often it is useful to conduct some further sensitivity
analysis. In general, shadow prices and reduced costs are only valid in a limited
sense, but that they are useful when their values are large relative to others.
Their exact range of validity is not known a priori and their values need not
be unique. It is a result of this limitation that the study of sensitivity ranges
becomes useful.
Chapter 4. Sensitivity Analysis 48
Amount of
Mexican chips
3 2 1
Amount of
plain chips
(0,0)
Optimal decision variables and shadow prices are not always unique. In this This section
section the range of values of optimal decision variables and optimal shadow
prices for the potato chips model is examined. In Aimms there are in-built
facilities to request such range information.
Amount of
Mexican chips
1 2 3
[50.0, 70.0]
Amount of
plain chips
(0,0) [32.5, 57.5]
Figure 4.4 illustrates the sensitivity ranges for decision variables if the three Decision
bold lines are interpreted as different objective contours. It is clear that for variable ranges
contour (1) there is a range of values for the amount of plain chips ([32.5, 57.5]
kg) and, a corresponding range for the amount of Mexican chips ([50.0, 70.0]
kg) that can yield the same objective value. Contour (3) also exhibits this be-
havior but the ranges are different. For objective contour (2), there is a unique
optimal decision.
The bold lines in Figure 4.4 were initially interpreted as constraints that inter- Shadow price
sect at the optimal solution. In this case, the shadow prices are not unique ranges
and the situation is referred to as a case of degeneracy. The potato chip prob-
lem to date does not have a constraint corresponding to line (2) but a new
constraint can easily be added for illustrative purposes only. This constraint
limits the objective value to be less than its optimal value. Thus, the contours
in Figure 4.4 can also be interpreted as follows:
1. frying constraint,
2. new constraint limiting the optimal value, and
3. packing constraint.
Examine the shadow prices for values of the bounds in a very small neigh- Examining their
borhood about their nominal values. This helps to see that there are multiple values
solutions for the shadow prices. If constraint (2) in Figure 4.4 is binding with
shadow price equal to 1.0 $/min, then the shadow prices on constraints (1)
and (3) will necessarily be zero. By relaxing constraint (2) a very small amount,
it becomes non-binding. Its shadow price will go to zero, and as this happens,
constraints (1) and (3) become binding with positive prices equal to the opti-
mal values from Table 4.1. This means that in this special case there is a range
of shadow prices for all three constraints where the optimal objective value
remains constant.
The optimal basis does not always remain constant with changes in input data. This section
In this section the ranges of values of objective function coefficients and right-
hand sides of the original potato chips model are examined with the require-
ment that the optimal basis does not change. In Aimms there are in-built facil-
ities to request such range information.
Chapter 4. Sensitivity Analysis 50
Changing one or more coefficients in the objective has the effect of changing Ranges of
the slope of the objective contours. This can be illustrated by interpreting the objective
bold lines in Figure 4.4 as the result of coefficients
Note that the optimal basis for the nominal profits is still optimal for the other
two objectives. Therefore, the range of objective coefficient values defined by
contours (1) and (3) represent the amount of plain chips for which the optimal
basis remains constant. Outside this range, there would be a change in the
optimal basis (movement to a different extreme point).
Amount of
Mexican chips packing
Amount of
plain chips
(0,0)
The potato chip model uses less than or equal constraints, but the following Ranges of
analysis also holds for greater than or equal constraints. The nominal solution right-hand sides
of the potato chip problem has the packing and frying constraints binding.
These binding constraints represent a basis for the shadow prices. By changing
the right-hand side on the packing constraint, it will shift as can be seen in
Figure 4.5.
The right-hand side can shift up to 480.0 minutes, where it would become Examining their
redundant with the lower bound of zero on the amount of Mexican chips. The values
solution is then degenerate, and there are multiple shadow price solutions.
This can also be interpreted as a change in the basis for the shadow prices. The
right-hand side can shift down to 270.0 minutes, where it becomes redundant
with the slicing constraint, and another change in the shadow price basis can
occur. Through this exercise, it has been shown that the right-hand side on
Chapter 4. Sensitivity Analysis 51
the packing constraint has a range of [270.0, 480.0] minutes over which the
shadow price basis does not change. Any extension of this range will force a
change in the binding constraints at the optimal solution. Changing the right-
hand side of non-binding constraints can make them become binding. The
non-binding constraints in the potato chip problem are the slicing constraint
and the two non-negativity constraints on the decision variables.
4.6 Summary
In this chapter, the concepts of marginal values and ranges have been ex-
plained using the optimal solution of the potato chips model. The use of
both shadow prices and reduced costs in sensitivity analysis has been demon-
strated. Sensitivity ranges have been introduced to provide validity ranges for
the optimal objective function value and optimal basis. Although there is some
benefit in predicting the effect of changes in data, it has been shown that these
indicators do have their limits. Repeated solving of the model provides the
best method of sensitivity analysis, and the Aimms modeling system has some
powerful facilities to support this type of sensitivity analysis.