You are on page 1of 8

Lecture 2: Linear Programming Sensitivity Analysis Computer Solutions

LP problems involving 1000s of variables and 1000s of


Computer solutions to Linear Programming constraints are now routinely solved with computer
Introduction to Sensitivity Analysis packages.
Graphical Sensitivity Analysis Linear programming solvers are now part of many
spreadsheet packages, such as Microsoft Excel.
Sensitivity Analysis: Computer Solution
Leading commercial packages include CPLEX, LINGO,
Simultaneous Changes and 100% Rule MOSEK, Xpress-MP, and Premium Solver for Excel.
The Management Scientist, a package developed by the
Reading list: authors of your textbook, has an LP module.
Par Inc Maximization of profit Pg 115 we will discuss the following output:
The Bluegrass Farms Problem Pg 118 objective function value
The electronic communication problem Pg 123 values of the decision variables
reduced costs
slack and surplus

Formulation of LP model in Management Scientist Computer Solutions of Par Incs Problem

Par Incs
Maxi-
misation
of profit

1. The maximum profit is $7668.


2. Par need to produce 540 standard and 252 deluxe golf bags.
M&D 3. Reduce Cost indicates how much the Objective Function (O.F.)
Chemical coefficient of each decision variables have to improve to before the
s variable can assume a positive value in the optimal solution.
Mini- 4. C&D and Finishing constraints are binding constraints which have no
misation slack.
of cost 3
5. There are slacks of 120 hours for sewing and 18 hours for Inspection &
packaging.
Computer Solutions of M&D Chemicals Problem Introduction to Sensitivity Analysis
Sensitivity analysis (or post-optimality analysis) is
used to determine how the optimal solution is
affected by changes, within specified ranges, in:
the objective function coefficients
the right-hand side (RHS) values
Sensitivity analysis is important to a manager who
must operate in a dynamic environment with
1. The minimum cost is $800 imprecise estimates of the coefficients.
2. M&D need to produce 250 & 100 gallons of Product A & B Sensitivity analysis allows a manager to ask certain
respectively. what-if questions about the problem.
3. Both variables A & B are positive, so reduced costs are 0.
4. Total production hrs (C2) and Processing time (C3) are binding. All
production hours and processing times are used up.
5. Seen from the non binding constraint 1, there is a surplus of 125
gallons of Product A.

Objective Function Coefficients Range of Optimality (Ref: Sect 3.2)


Let us consider how changes in the objective function Line B: coincides with the finishing constraint
coefficients might affect the optimal solution. line 1S + 2/3D = 708) Slope=?

The range of optimality for each coefficient provides


the range of values over which the current solution
O.F. line P=CsS+CdD, Slope=?
will remain optimal.
Managers should focus on those objective
coefficients that have a narrow range of optimality
Line A: coincides with the C&D
and coefficients near the endpoints of the range. Feasible Region
line (7/10)S + 1D = 630 Slope=?

Slide 8
Range of Optimality Range of Optimality

Vertical slope => one side limit Simultaneous Change


Line B: coincides with the The ranges of optimality found
finishing constraint line 6.3 CS 13.5, while CD = ________
1S + 2/3D = 708) Slope=?
and 6.67 CD 14.29 while CS = ________
OF. 18S + 9D which kept the optimal solution at S=_______ and D= ________.
The ranges are applicable when one parameter changes at a time.

If Cs and CD change simultaneously, then we need to evaluate


whether -3/2 -Cs /CD -7/10
E.g. If the profit of standard bag and deluxe bag are found to be $13
and $8, do we still keep the production at 540 std bag and 252
deluxe bag?
New Optimal Solution
Ans:

Question: Then, how to find the optimal solution?


Slide 11
Changes on RHS of Constraints:
E.g. If additional 10 hours is available to Cutting & Dyeing Dual Price
The new Constraint is: Dual Price: The improvement in the value of the optimal solution
How will it affect : per unit increase in the RHS of the constraint.
a. the constraint line? Hence, positive dual price => improvement of O.F. (increase
b. the feasible region? O.F. value in ____________ problem, decrease O.F. value in
c. The optimal solution? ____________ problem)
The maximum profit? Negative dual price => worsen O.F value (e.g. ________
Increase in profit = profit or __________ cost)
Dual price = Change in O.F/change in RHS
Question: Can the value of dual price be applicable over a long
range of change of the RHS of constraint? Why?
Ans:

Slide 13 Slide 14

Range of Feasibility Relevant Cost and Sunk Cost


The range of feasibility is the range over which the dual price is A resource cost is a relevant cost if the amount paid for it
applicable. is dependent upon the amount of the resource used by
As the RHS increases, other constraints will become binding and the decision variables.
limit the change in the value of the objective function.
Relevant costs are reflected in the objective function
Example: Dual Price for a minimisation problem coefficients (i.e. considered in the derivation of the
A company wants to find the minimum of total cost of a product. If coefficients) .
the current total cost under optimal solution is $700, and the dual A resource cost is a sunk cost if it must be paid
price for a constraint, quantity of chemical X, is -$10 per kg. What is regardless of the amount of the resource actually used
the total cost if X is: a) increased by 5 kg? b) decreased by 3kg? by the decision variables.
(assume changes are within range of feasibility)
Sunk resource costs are not reflected in the objective
Ans: Dual price = change in OF/change in constraint
function coefficients (Hence, the sunk costs are not
=> Change in cost = dual price x change in constraint
affected by the outcome of the LP. Whatever is the
optimal solution, the cost would have been incurred).
Slide 15
Cautionary Note on the Interpretation of Dual Prices Sensitivity Analysis: Dual Price
If the Resource cost is sunk
The dual price is the maximum amount you should be
willing to pay for one additional unit of the resource.
If the Resource cost is relevant
The dual price is the maximum premium over the The dual price for Sewing (C2) and Inspecting& packaging (C4)
normal cost that you should be willing to pay for one =0 because these are ___________________.
unit of the resource (since the basic cost is already Cutting &Dyeing (C1) and Finishing (C3) has dual price because
considered when you derive the O.F, any additional these are ___________________.
amount are in excess of the basic cost). The dual price for Cutting & dyeing is $4.37 => One additional hr
to C&D increases profit by $4.37
The dual price for Finshing is $6.94 => One additional hr to
Finishing increases profit by $6.94
If Par has hire one additional staff, where shall this person be
deployed? Ans:____________ Slide 18

Sensitivity Analysis: Sunk Vs Relevant Cost Range of Optimality

If labor cost is sunk cost, what is the maximum rate you are The current optimal solution is S=540, D=252, subject to the four
willing to pay the additional staff? constraints and profits of std bag, Cs= $10 and deluxe bag, CD=$9
Ans: This solution remains unchanged if $6.3 Cs $13.4 while CD=$9
or $6.67 CD $14.29 while CS=$10
Is current Cs near to the boundaries?
If labor cost is relevant cost, what is the maximum rate you are
willing to pay the additional staff? Is Cs range of feasibility narrow?
Ans: This means that a slight change in Cs value (due to new circumstance
or error in calculation) will/will not shift the optimal solution.
What is the consequence of changing optimal solution?
Does the profit change even if the optimal solution is unchanged?
Slide 19
Same analysis applies to CD
Range of Feasibility Sensitivity Analysis: Simultaneous Change
[A] Range of Optimality and 100% Rule
The 100% rule states that simultaneously changing the Objective
Function coefficients will not change the Optimal Solution if:
The sum of the percentages of the change divided by the max.
allowable change for each coefficient does not exceed 100%
The dual prices for C&D is $4.37
This dual price is applicable if the available C&D time is between However, the 100% rule does NOT say that the optimal solution
495.6 hrs to 682.4 hrs. Every one hrs increase from 630 hr will change if the sum of the percentage changes exceeds 100%.
increases the profit by $4.37 until the C&D reaches 682 hrs.
When the 100% rule is not satisfied, we must re-solve the problem
Beyond that C&D may become a ________________.
to determine the effect on the optimal solution.
Note: Changes and max allowable changes are measured from
The dual prices for Finishing is $6.94
the current coefficients. We only apply absolute (i.e. positive) %
This dual price is applicable if the available Finishing time is for the 100% rule.
between 580 hrs to 900 hrs. Every one hrs decrease from 708 hr
22
decreases the profit by $6.94 until the Finishing reaches 580 hrs.

Example: Par finds that the profits were wrongly computed. Instead of Sensitivity Analysis: Simultaneous Change
$10 & $9 for std & deluxe bags, they are supposed to be $11.50 &
8.25. Does the simultaneous changes affect the optimal solution? [B] Range of Feasibility and 100% Rule
Solution: One way is to use -1.5 -Cs /CD -0.7 which was derived earlier. The 100% rule states that simultaneously changing the Right
We have -11.5/8.25 = -1.39 which is within the range. Hence the optimal Hand Side values will not change the Dual Price if:
solution remains unchanged. The sum of the percentages of the change divided by the
But suppose we do not have the earlier detailed analysis or the problem is maximum allowable change for each RHS value does not
more complicated, we will use 100% to determine whether the optimal exceed 100%
solution has change. From computer solution:
Max Cs= 13.50 => Max allowable increase for Cs= 13.50-10= 3.50
However, the 100% rule does NOT say that the Dual Price will
Increase in Cs= 11.50-10= 1.50 change if the sum of the percentage changes exceeds 100% (a
% change in Cs = 1.50/3.50 = 42.86% necessary but not sufficient condition).
Min CD= => Max allowable decrease in CD = When the 100% rule is not satisfied, we must re-solve the
Decrease in CD = problem to determine the effect on the dual price.
% change in CD =
Total % change = which is *above/below 100%
Therefore the changes *do/do not affect the optimal solution of S=540 &
D=252. Hence there is *need/no need to change the production settings. 24
Example: Par has 20 additional hours for C&D time and 100 Sensitivity Analysis for M&D Chemical
additional hour of finishing time. How much will the profit be
improved?
Dual price = for
Solution: We will use 100% to determine whether the dual prices are
applicable. From computer solution:
The allowance increase of RHS of C&D=
Increase in RHS of C&D= 20 Range of Optimality:
% change in RHS of C&D = 20/ = %
The allowance increase of RHS of Finishing=
Increase in RHS of Finishing= 100
% change in RHS of Finishing = 100/ = % Range of Feasibility:
Total % change = = which is *above/below
100%
Therefore the simultaneous changes *do/do not affect the Dual Price.
The increased in profit = 20 ( ) + 100 ( )=$

Question:
LP Model with more than 2 variables What is the maximum profit
Example: If Par Inc decides to add a lightweight model bag and achievable?
Ans: $
derived the following LP model for maximising the profit:
How many deluxe bags Par
need to produce to achieve
Max 10S + 9D + 12.85L the max profit?
s.t. 0.7S + 1D + 0.8L 630 Cutting & dyeing Ans:
0.5S + 0.83333D + 1L 630 Sewing
1S + 0.66667D + 1L 708 Finishing Reduced Costs of $1.15
means this amount must
0.1S + 0.25D + 0.25L 135 Inspection & packaging
add to the current
S,D,L 0 coefficient of D so that the
D value in optimal solution
will be positive.
Solve the problem using MS
So profit (i.e. coefficient of
D must be at least
$9+$1.15= $10.15 before D
can be par of the optimal
Slide 27 solution. (Ref Pg 116)Slide 28
Class Activity: Olympic Bike Co.
Olympic Bike is introducing two new lightweight
bicycle frames, the Deluxe and the Professional, to be
made from special aluminum and steel alloys. The
anticipated unit profits are $10 for the Deluxe
and $15 for the Professional.
The number of pounds of each alloy needed per frame is
summarized below
A supplier delivers 100 pounds of the aluminum alloy and
80 pounds of the steel alloy weekly.
Aluminum Alloy Steel Alloy
Deluxe 2 3
Professional 4 2

How many Deluxe and Professional frames should


Olympic produce each week?
Slide 30

Activity questions
1. Formulate the LP Model
Use the MS output and answer the following questions:
2. What is the Objective Function value and the optimal solution?
3. Suppose the profit on deluxe frames is increased to $20. Is the
above solution still optimal? What is the value of the objective
function when this unit profit is increased to $20?
4. If the unit profit on deluxe frames were $6 instead of $10, would the
optimal solution change?
5. If simultaneously the profit on Deluxe frames was raised to $16 and
the profit on Professional frames was raised to $17, would the
current solution be optimal?
6. Given that aluminum is a sunk cost, what is the maximum amount
the company should pay for 50 extra pounds of aluminum?
7. If aluminum were a relevant cost, and it costs $4 per pound initially,
what is the maximum amount the company should pay for 50
extra pounds of aluminum?

You might also like