Linear Programming-
Sensitivity Analysis
SCHOOL OF DATA SCIENCE AND FORECASTING
DEVI AHILYA VISHWAVIDYALAYA, INDORE
Sensitivity Analysis
Sensitivity analysis (or Post-optimality analysis) adds dynamic
dimension in LP optimum solution for investigating the impact of
changes in the model parameters (e.g. coefficients of objective and
constraints) and right-hand side values of the constraints.
Sensitivity analysis provides sensitivity of the optimal solution to the
changes made in the model. It can be used to answer some “what –if”
type questions about the problem.
Sensitivity analysis is important for management for taking decisions
in the dynamic environment with –
1. Changes in the coefficients of objective function (per unit price or cost)
2. Changes in the coefficients of constraints (per unit usage of the resources)
3. Changes in the availability of the resources.
Graphical Sensitivity Analysis
The following cases of the sensitivity analysis will be discussed based
on the graphical solution:
1. Changes in the coefficients of objective function (ranges of
optimality)
2. Changes in the right-hand side of the constraints (ranges of
feasibility)
3. Unit worth of the resources (dual prices)
Changes in the coefficients of objective function
• The general objective function in two variables for a LPP can be
written as Max. or Min. z = c1x1 + c2x2
• Changes in the coefficients c1 and c2 will change the slope of the z-line
and finally may change the optimal corner point.
• However, there is a range of variation for both c1 and c2 that will keep
the current optimum point unchanged.
• Our interest is to determine the range of optimality for the ratio c1/c2
or c2/c1 that will keep the current optimum solution unchanged.
• It gives a flexibility to the managers to change the price (or cost) per
unit up to a certain range without affecting optimality.
Changes in the coefficients of objective function-Example
Objective Function:
Maximize Z= 5X1 + 4X2
Constraints:
Raw Material M1:
6X1 + 4X2 ≤ 24 ….…...(1)
Raw Material M2:
X1 + 2X2 ≤ 6…….…....(2)
Market Demand:
-X1 + X2 ≤ 1 ……….…(3)
Market Demand:
X2 ≤ 2 ………….…….(4)
Non-Negativity Conditions:
X1, X2 ≥ 0 …………… (5, 6) Optimum Point is C where Z = 21, X1 = 3, X2 = 1.5
Changes in the coefficients of objective function-Example
If we change the objective function to
Max. z = c1x1 + c2x2, then the optimum
point C will remain unchanged as long
as the slope of z lies between the slope
of the binding constraints, namely,
6X1 + 4X2 ≤ 24 …. (1)
and X1 + 2X2 ≤ 6….(2)
This relationship can be expressed algebraically
as-
If c1 ≠ 0, then
If c2 ≠ 0, then
Optimum Point is C where Z = 21, X1 = 3, X2 = 1.5
Changes in the coefficients of objective function-Example
c1 ≠ 0 implies that z line is not horizontal.
c2 ≠ 0 implies that z line is not vertical.
The optimality range determined earlier does not permit the
objective function z = c1x1 + c2x2 to be horizontal or vertical.
If z = c1x1 + c2x2 coincides any of the binding constraint then
alternative optima will exist keeping C unchanged as
optimum point in both cases.
Under given conditions one can determine the optimal range
for one of the coefficients, given that other remains
unchanged.
Given that c2 = 4, the optimal range for c1 can be calculated
from by substituting c2 = 4, we have
2 ≤ c1 ≤ 6.
Similarly, given that c1 = 5, the optimal range for c2 can be
calculated from by substituting c1 = 5, we have Optimum Point is C where Z = 21, X1 = 3, X2 = 1.5
≤ c2 ≤ 10.
Changes in the availability of the resources
• In LP models, constraints, directly or indirectly, represent the usage of
limited resources.
• The values given at right-hand side represent limits on the availability
of the resources.
• A change in the right-hand side for a constraint may affect the feasible
region and perhaps cause a change in the optimum solution to the
problem.
• The range of feasibility is determined by finding the right-hand side
values such that the same two binding constraints remains binding.
• The change in the right-hand side will create a parallel line only.
Therefore, optimum solution point will slide along the line.
Changes in the availability of the resources -Example
Objective Function:
Maximize Z= 5X1 + 4X2 As availability of raw material M1 changes, keeping the
availability of other binding resource M2 as such, the optimum
Constraints: solution at point C will slide along the line segment DG. Any
Raw Material M1: change in M1 outside the range of this segment will render
point C infeasible.
6X1 + 4X2 ≤ 24 ….…...(1)
Raw Material M2:
X1 + 2X2 ≤ 6…….…....(2)
Market Demand:
-X1 + X2 ≤ 1 ……….…(3)
Market Demand:
X2 ≤ 2 ………….…….(4)
Non-Negativity Conditions:
X1, X2 ≥ 0 …………… (5, 6)
Changes in the availability of the resources -Example
As availability of raw material M1 changes, keeping
the availability of other binding resource M2 as
such (i.e. 6), the optimum solution at point C will
slide along the line segment DG. Any change in M1
outside the range of this segment will render point
C infeasible. Therefore, end points D (2,2) and G
(6,0) delineate the feasibility range for M1.
Amount for M1 at D = 6X1+4X2=6x2+4x2=20 tons
Amount for M1 at G = 6X1+4X2=6x6+4x0=36 tons
Given M2 = 6,
the feasibility range for M1 is 20 ≤ M1 ≤ 36
Changes in the availability of the resources -Example
Now consider raw material M2. As availability of
raw material M2 changes, keeping the availability
of other binding resource M1 as such (i.e. 24), the
optimum solution at point C will slide along the line
segment HB. Any change in M2 outside the range
of this segment will render point C infeasible.
Therefore, end points B(4,0) and H(8/3,2) delineate
the feasibility range for M2.
Amount for M2 at B = X1+2X2=4+2x0=4 tons
Amount for M2 at H = X1+2X2= 8/3 + 2x2=20/3 tons
Given M1 = 24,
the feasibility range for M2 is 4 ≤ M2 ≤ 20/3
Unit Worth of a Resource (Dual Price)
Unit worth of a resource can be determined as the rate of change in the
objective value that results from making changes in the availability of a
resource.
Let yi represents the worth per unit of resource i, then
Unit Worth of a Resource (Dual Price)
For resource M1: ,
The end points D (2,2) and G (6,0) delineate the feasibility range for M1. The feasibility
range for M1 is 20 ≤ M1 ≤ 36
Value of Z at D = 5X1+4X2=5x2+4x2=18 (thousand $)
Value of Z at G = 5X1+4X2=5x6+4x0=30 (thousand $)
Therefore,
= = 0.75
It shows that a one ton change in M1 in the range 20 ≤ M1 ≤ 36 will change the optimum
value of z by $0.75x1000 = $750.
Unit Worth of a Resource (Dual Price)
For resource M2: ,
The end points B(4,0) and H(8/3,2) delineate the feasibility range for M2. The
feasibility range for M2 is 4 ≤ M2 ≤ 20/3
Value of Z at B = 5X1+4X2=5x4+4x0=20 (thousand $)
Value of Z at H = 5X1+4X2=5x(8/3)+4x2 = 64/3 (thousand $)
Therefore,
= = 0.5
It shows that a one ton change in M2 in the range 4 ≤ M2 ≤ 20/3 will change the optimum
value of z by $0.5x1000 = $500.
Sensitivity Analysis
The sensitivity analysis investigates the change in the optimum solution resulting from
making changes in parameters of the LP model.
Condition resulting from making changes in the Recommended Action
parameters of LP model
Current solution remains optimal and feasible No further action is needed
Current solution becomes infeasible Use Dual Simplex method to recover feasibility
Current solution becomes non-optimal Use primal simplex method to recover optimality
Consider following LP primal and its dual problem:
LP Primal Dual
Maximize z = 3x1 + 2x2 + 5x3 Minimize w = 430y1 + 460y2 + 420y3
Subject to, Subject to,
x1 + 2x2 + x3 ≤ 430 y1 + 3y2 + y3 ≥ 3
3x1 + 2x3 ≤ 460 2y1 + 4y3 ≥ 2
x1 + 4x2 ≤ 420 x1,x2,x3 ≥ 0 y1 + 2y2 ≥ 5 y1,y2,y3 ≥ 0
Optimal Solution: Optimal Solution:
x1 = 0, x2 = 100, x3 = 230, z = 1350 y1 = 1, y2 = 2, y3 = 0, w = 1350
Sensitivity Analysis
The optimum tableau for the LP primal is given below:
Basic x1 x2 x3 x4 x5 x6 Solution
z 4 0 0 1 2 0 1350
x2 -1/4 1 0 1/2 -1/4 0 100
x3 3/2 0 1 0 1/2 0 230
x6 2 0 0 -2 1 1 20
The optimum tableau provides following information:
1. Value of the objective function
2. Values of the decision variables
3. The status of the resources – through the values of slack or surplus variables
4. The worth per unit (Dual Prices) of the resources
5. Required data to carryout sensitivity analysis on the optimal solution.
Changes Affecting Feasibility
The Feasibility of the current optimum solution may be affected by:
1. The right hand of the constraints is changed
2. A new constraint is added to the model.
In both cases, infeasibility occurs when at least one variable becomes negative.
Changes in the right hand side:
This change will affect only right-hand values of the table (including z value). Therefore, It requires re-
computing the right hand side of the tableau. It can be calculated as-
New right-hand side of tableau in iteration i = (inverse in iteration i) x (New right-hand
side of constraints)