Sensitivity Analysis Notes
Sensitivity Analysis Notes
Sensitivity Analysis
1.1 Introduction
Once the optimal solution of linear programming problem has been attained, it may be
desirable to study how the current solution changes when parameters of the problem
changes. If the parameters of the problem are changed in discrete manner, the study of
its effect on optimal solution changes is called sensitivity analysis or postoptimality
analysis.
𝑥𝑗 = 0 𝑗 = 1, 2, 3, … … . 𝑛
The discrete changes in parameters of LP problem include changes in the values of few
𝑏𝑖 or 𝑐𝑗 or 𝑎𝑖𝑗 or addition/deletion of some constraints/variables.
Example:
2𝑥1 − 𝑥2 + 3𝑥3 = 2
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
1
5 7
B) Discuss the effect of changing requirement vector from [ ] = [ ]
2 2
5 3
C) Discuss the effect of changing requirement vector from [ ] = [ ]
2 9
Solution: (Part A) The problem will be solved by Big M method. The standard form of problem
will be:
2𝑥1 − 𝑥2 + 3𝑥3 + 𝐴1 = 2
𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝐴1 ≥ 0
Since we have discussed the Big M method hence here only the initial and final simplex table is
presented skipping the middle label algorithms.
CONSTANT BASIC
COLUMN OBJECTIVE
𝒙1 𝒙2 𝒙3 𝒔1 A1 VARIABLE Quo.
COLUMN
COLUMN
cc
5 12 4 0 -M
OBJECTIVE ROW
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 A1
CONSTRAINT 1 1 2 1 1 0
5 𝑠1 0
CONSTRAINT 2 2 -1 3 0 1 2 𝐴1 -M
INDEX ROW
P1 P2 P3 P4 P5 P6
2
Final table with optimal feasible solution:
BASIC
CONSTANT OBJECTIVE
𝒙1 𝒙2 𝒙3 𝒔1 A1 VARIABLE Quo.
COLUMN COLUMN
COLUMN
cc
5 12 4 0 -M
OBJECTIVE ROW
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 A1
The elements of the final optimal feasible solution matrix have relationship with first basic
feasible solution matrix.
2 1
Let us define a basis matrix B= [ ] The elements of the basis matrix are the original
−1 2
column of the basic variables 𝑥2 and 𝑥1 .
2 1
B= [P2, P1] = [ ]
−1 2
|B|= determinant of basis matrix= 2×2-1× (-1) =5≠ 0
Thus 𝐵 −1 exists.
[𝐵 ⋮ 𝐼] = [𝐼 ⋮ 𝐵 −1 ]
Thus [𝐵 ⋮ 𝐼] =
2 1 1 0
[ ⋮ ]
−1 2 0 1
3
R2→2R2+ R1
2 1 1 0
[ ⋮ ]
0 5 1 2
R1→ 5R1-R2
10 0 4 −2
[ ⋮ ]
0 5 1 2
R1→ R1/10
R2→ R2 /5
1 0 2/5 −1/5
[ ⋮ ]
0 1 1/5 2/5
2 −1
5 5
B-1= [1 2 ]
5 5
Now any column of final simplex table can be obtained by multiplying the corresponding
column of initial table by B-1.
Thus
P7= B-1 P1 and so on.
Solution Part (B): The new value of the current basic variable are given by
Z=199/5
Since the basic variables have the non-negative values, the solution remains optimal and
feasible.
Solution Part (C): The new value of the current basic variable are given by
4
Thus x2=-3/5 and x1=21/5
Z=199/5
Since the basic variables have the negative values, the solution is infeasible and duel simplex
method may be used to clear infeasibility of problem.
BASIC
CONSTANT OBJECTIVE
𝒙1 𝒙2 𝒙3 𝒔1 A1 VARIABLE Quo.
COLUMN COLUMN
COLUMN
cc
5 12 4 0 -M
OBJECTIVE ROW
𝒙3
VARIABLE ROW 𝒙1 𝒙2 𝒔1 A1
RATIO 3
Since 𝑥2 is negative, the solution is infeasible. Since all the numbers in Index row are positive or
zero, the solution is optimum but infeasible.
Ratio= [–(Index row element/key row elements)] column with least positive ratio is selected as
key column.
Now by row operation, we make the key element as unity and other elements in key column as
0. The next simplex algorithm is:
5
CONSTANT BASIC
OBJECTIVE
𝒙1 𝒙2 𝒙3 𝒔1 A1 COLUMN VARIABLE Quo.
COLUMN
cc COLUMN
5 12 4 0 -M
OBJECTIVE ROW
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 A1
0 -5 1 -2 1
CONSTRAINT 1 3 𝑥3 4
CONSTRAINT 2 1 7 0 3 -1 0 𝑥1 5
RATIO
Since all the elements in index row are either positive or 0, the solution is optimal.
Z=12
Changes in cost coefficients of the objective function may takes place in three possible ways:
Example: A company wants to produce three products A, B and C. The unit profits on these
products are $ 4, $6, and $ 2 respectively. These products require two types of resources- man
power and material. The following LP model is formulated for determining the optimal product
mix:
6
Maximize 𝑍 = 4𝑥1 + 6𝑥2 + 2𝑥3
Subjected to: 𝑥1 + 𝑥2 + 𝑥3 ≤ 3
𝑥1 + 4𝑥2 + 7𝑥3 ≤ 9
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
a) Find the optimal product mix and corresponding profit to the company.
b) Find the ranges of values of non-basic variable coefficient c3 such that the current
optimal product mix remains optimal.
c) What happens if c3 is increased to $12? What is the new optimal product mix?
d) Find the ranges of basic variable coefficient c1 such that the current optimal product
mix remains optimal.
e) Find the effect of changing the objective function to 𝑍 = 2𝑥1 + 8𝑥2 + 4𝑥3
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 VARIABLE Cb Quo.
Constants
COLUMN
4 6 2 0 0 (c5)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 S2
0 6 10/3 2/3
INDEX ROW (Ij) 0 (I2)
(I1) (I3) (I4) (I5)
7
Solution b)
Thus c3= 2 in present solution. It is clear that if we reduce c3 further, the optimal solution will
not change. However, if we increase the c3, the solution will not be optimal beyond certain
value.
𝐼3 ≥ 0
Or (−1 × 4 + 2 × 6) − (𝑐3 ) ≥ 0
𝑐3 ≤ 8
Solution c)
If c3= 12,
𝐼3 = (−1 × 4 + 2 × 6) − (12) = −4
Since I3 is now negative hence the solution will not be optimal. Further iteration is needed for
the final optimal solution. Key row and key column has been selected accordingly.
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 Constants VARIABLE Cb Quo.
COLUMN
4 6 12 0 0
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4) (c5)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 S2
0 10/3 2/3
INDEX ROW (Ij) 0 (I2) -4(I3)
(I1) (I4) (I5)
8
The next algorithm after iteration is shown in Table below. Since all the elements in Index row
are ≥ 0, hence the solution is optimal
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 VARIABLE Cb Quo.
Constants
COLUMN
4 6 2 0 0
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4) (c5)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2
Solution d) Clearly, when c1 decreases below certain level, it may no longer remain profitable to
produce product A. On the other hand, if c1 increases beyond certain level, it may become so
profitable that it is most paying to produce only Product A. In either case, the optimal product
mix will change and hence, there is a lower as well as upper limit on c1 for which the optimal
product mix will not be affected.
Referring again the final simplex table, it can be seen that any variation in c 1 (and/or c2 also) will
not change I1 and I2 while I3, I4 and I5 will change. The solution will remain optimum as long as
(I3, I4 and I5) ≥0
𝐼3 ≥ 0 𝑜𝑟
(−1 × 𝑐1 + 2 × 6) − (2) ≥ 0
−𝑐1 ≥ −10 𝑜𝑟 𝑐1 ≤ 10
Similarly,
𝐼4 ≥ 0 𝑜𝑟
4 1
( × 𝑐1 + (− ) × 6) − (0) ≥ 0
3 3
9
3
𝑐1 ≥
2
𝐼5 ≥ 0 𝑜𝑟
1 1
(− × 𝑐1 + ( ) × 6) − (0) ≥ 0
3 3
𝑐1 ≤ 6
3
𝑇ℎ𝑢𝑠, ≤ 𝑐1 ≤ 6
2
Solution e) Now the new objective function is: 𝑍 = 2𝑥1 + 8𝑥2 + 4𝑥3
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 VARIABLE Cb Quo.
Constants
COLUMN
2 8 4 0 0 (c5)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 S2
0 10
INDEX ROW (Ij) 0 (I2) 0 (I4) 2 (I5)
(I1) (I3)
Thus optimal solution does not change by the change of objective function.
Example: A company wants to produce three products A, B and C. The unit profits on these
products are $ 4, $6, and $ 2 respectively. These products require two types of resources- man
power and material. The following LP model is formulated for determining the optimal product
mix:
10
Subjected to: 𝑥1 + 𝑥2 + 𝑥3 ≤ 3
𝑥1 + 4𝑥2 + 7𝑥3 ≤ 9
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Where 𝑥1 , 𝑥2 , 𝑥3 are the number of products A, B and C produced. Find optimal product mix.
Now suppose that the Research and Development department of the company has proposed a
fourth product D which requires 1 unit of manpower and 1 unit of material and earns unit profit
of $3 when sold in market. It is desirable to find whether it is profitable to produce product D.
Solution: After adding the product D, the new simplex problem will be:
Subjected to: 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 ≤ 3
𝑥1 + 4𝑥2 + 7𝑥3 + 𝑥4 ≤ 9
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
The final simplex Table of initial problem is modified with addition of new variable x4 as shown
below:
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 VARIABLE Cb Quo.
x4 Constants
COLUMN
4 6 2 3 (c4) 0 0 (c6)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c5)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 x4 𝒔1 S2
The column elements for x4 for final simplex table are obtained as:
11
𝑎14 1 1
[𝑎 ] = 𝐵 −1 [ ] Where [ ] is column of x4 in initial Simplex Table.
24 1 1
1 1
𝐵=[ ]
1 4
|B|= determinant of basis matrix= 2×4 -1×1 =7
[𝐵 ⋮ 𝐼] = [𝐼 ⋮ 𝐵 −1 ]
Thus [𝐵 ⋮ 𝐼] =
1 1 1 0
[ ⋮ ]
1 4 0 1
R2→R2- R1
1 1 1 0
[ ⋮ ]
0 3 −1 1
R1→ R1-(R2 /3)
1 0 4/3 −1/3
[ ⋮ ]
0 3 −1 1
R2→ R2 /3
1 0 4/3 −1/3
[ ⋮ ]
0 1 −1/3 1/3
4 −1
B-1= [ 3 3
1 ]
−1/3 3
Thus column elements are:
4 −1
𝑎14 1 1 1
[𝑎 ] = 𝐵 −1 [ ] = [ 3 3
1 ] [ ]= [ ]
24 1 −1/3 1 0
3
I4= 1
As I4 is positive, thus the optimum solution does not change after introduction of new variable.
12
1.2.4 Changes in the Coefficients of the Constraints
When the changes takes place in the constraint coefficient of non-basic variables, in the current
optimal solution, the feasibility of the solution is not affected. The only effect if any may be on
the optimality of the solution.
However, if constraint coefficients of basic variable get changed, the things become
complicated and it may better to solve the problem once again.
Example:
Subjected to:
3 𝑥1 + 40𝑥2 + 𝑥3 + 𝑥4 ≤ 1200
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒙𝟒 s1 𝒔𝟐
7 7
a) 𝑥1 column changes from [ ] to [ ]
3 5
13
7 5
b) 𝑥1 column changes from [ ] to [ ]
3 8
Solution a):
𝑥1 is non basic variable in the optimal solution. After changes in x1 column elements in initial
matrix, there is need to calculate new x1 column elements in final simplex Table.
𝑎11 7 7
[𝑎 ] = 𝐵 −1 [ ] Where [ ] is column of x1 in initial Simplex Table.
21 3 3
4 10
𝐵=[ ]
1 40
|B|= determinant of basis matrix= 150
[𝐵 ⋮ 𝐼] = [𝐼 ⋮ 𝐵 −1 ]
Thus [𝐵 ⋮ 𝐼] =
4 10 1 0
[ ⋮ ]
1 40 0 1
R2→R2- R1/4
4 10 1 0
[ ⋮ ]
0 150/4 −1/4 1
4 0 16/15 −4/15
[ ⋮ ]
0 150/4 −1/4 1
1 0 4/15 −1/15
[ ⋮ ]
0 1 −1/150 2/75
4 −1
B-1= [ 151 15
2]
− 150 75
Thus new column elements of x1 are:
14
4 −1
𝑎11 7 15 7 23/15
[𝑎 ] = 𝐵 −1 [ ] = [ 151 2 ] [5]= [ ]
21 5 − 150 13/150
75
Since the index row element is positive hence the original solution remains optimum.
Solution b):
Since the index row element is negative hence the original solution is not optimum now.
Now we start with original optimal solution with incorporating the changes due to variable 𝑥1
and will iterate towards optimal solution.
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒙𝟒 s1 𝒔𝟐
Now we will make the key element as unity by matrix row operations.
15
CONSTANT BASIC VARIABLE OBJECTIVE
𝒙1 𝒙2 𝒙3 𝒙𝟒 s1 𝒔𝟐 Quo.
COLUMN COLUMN COLUMN
cc
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒙𝟒 s1 𝒔𝟐
Since all the elements in Index row are 0 or positive, the Table gives the optimal solution with
Addition of new constraint may or may not affect the feasibility of current optimal solution. For
this, it is sufficient to check whether the new constraint is satisfied by current optimal solution
or not. If it is satisfied, the inclusion of the constraint has no effect on current optimal solution
i.e. it remains feasible as well as optimal. However, if the constraint is not satisfied, the current
optimal solution becomes infeasible and Duel Simplex method is applied to find the optimal
solution.
Example: A company wants to produce three products A, B and C. The unit profits on these
products are $ 4, $6, and $ 2 respectively. These products require two types of resources- man
power and material. The following LP model is formulated and the final optimal solution is
given in Table:
Subjected to: 𝑥1 + 𝑥2 + 𝑥3 ≤ 3
𝑥1 + 4𝑥2 + 7𝑥3 ≤ 9
16
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 VARIABLE Cb Quo.
Constants
COLUMN
4 6 2 0 0 (c5)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 S2
0 6 10/3 2/3
INDEX ROW (Ij) 0 (I2)
(I1) (I3) (I4) (I5)
a) If an administrative constraint is added to the problem then find its effect on optimal
solution. The product A, B and C requires 2, 3, and 2 hours of administrative services
while the total available administrative hours are 10.
b) If the total available administrative time is 4 hours, find the new optimal solution.
Solution:
17
Now we add the new constraint in the final simplex table using s3 as slack as well as basic
variable.
BASIC
𝒙1 𝒙2 𝒙3 𝒔1 s2 s3 VARIABLE Cb Quo.
Constants
COLUMN
4 6 2 0 0 (c5) 0(c6)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
CONSTRAINT 3 2 3 2 0 0 1 4 s3 0
0 6 10/3 2/3 0
INDEX ROW (Ij) 0 (I2)
(I1) (I3) (I4) (I5)
Since x1 and x2 are in basic solution, hence their corresponding coefficients in the basic
constraints must be made zero by matrix row operations.
BASIC VARIABLE
𝒙1 𝒙2 𝒙3 𝒔1 s2 Constants Cb
s3 COLUMN
4 6 2 0 0 (c5) 0(c6)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
0 6 10/3 2/3 0
INDEX ROW (Ij) 0 (I2)
(I1) (I3) (I4) (I5)
18
The current basic solution is optimal but infeasible as s3 has negative value. Thus dual simplex
method is applied to find new optimal solution.
BASIC VARIABLE
𝒙1 𝒙2 𝒙3 𝒔1 s2 Cb
s3 Constants COLUMN
4 6 2 0 0 (c5) 0(c6)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
0 6 10/3 2/3 0
INDEX ROW (Ij) 0 (I2)
(I1) (I3) (I4) (I5)
Ratio 1 2 2
Now we replace 𝑠3 by 𝑥3
BASIC VARIABLE
𝒙1 𝒙2 𝒙3 𝒔1 s2 Constants Cb
s3 COLUMN
4 6 2 0 0 (c5) 0(c6)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
0 0 5/3 1
INDEX ROW (Ij) 0 (I2) 1/3 (I5)
(I1) (I3) (I4)
19
The Table now gives the optimal product mix.
Deletion of a non-basic variable does not affect in any way to feasibility/optimality of current
solution. Deletion of a basic variable may affect optimality. For this, a heavy penalty –M (+M in
case of minimization problem) is assigned to variable under consideration.
Example:
A company wants to produce three products A, B and C. The unit profits on these products are
$ 4, $6, and $ 2 respectively. These products require two types of resources- man power and
material. The product A, B and C requires 2, 3, and 2 hours of administrative services while the
total available administrative hours are 4.The following LP model is formulated and the final
optimal solution is given in Table:
Subjected to: 𝑥1 + 𝑥2 + 𝑥3 ≤ 3
𝑥1 + 4𝑥2 + 7𝑥3 ≤ 9
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
BASIC VARIABLE
𝒙1 𝒙2 𝒙3 𝒔1 s2 Cb
s3 Constants COLUMN
4 6 2 0 0 (c5) 0(c6)
OBJECTIVE ROW (cj) (c1) (c2) (c3) (c4)
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
20
If the management decides not to produce the Product B, find the optimal solution to resulting
LP problem.
BASIC Quo.
𝒙1 𝒙2 𝒙3 𝒔1 s2 s3 VARIABLE Cb
Constants
COLUMN
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
Now we proceed with new basic variable set and will make the key element as unity and other
elements in key column as zero.
BASIC Quo.
𝒙1 𝒙2 𝒙3 𝒔1 s2 s3 VARIABLE Cb
Constants
COLUMN
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
21
Again proceeding in same way:
BASIC Quo.
𝒙1 𝒙2 𝒙3 𝒔1 s2 s3 VARIABLE Cb
Constants
COLUMN
VARIABLE ROW 𝒙1 𝒙2 𝒙3 𝒔1 s2 s3
Review Exercise:
𝑥1 + 2𝑥2 + 𝑥3 ≤ 26
𝑥1 + 𝑥2 + 𝑥3 ≤ 18
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
22
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
23