0% found this document useful (0 votes)
73 views20 pages

W5 - Sensitivity Analysis

Sensitivity analysis examines how changes to an LP's parameters affect its optimal solution. There are six types of changes that may impact the optimal solution: 1) changing an objective function coefficient of a non-basic variable, 2) changing an objective function coefficient of a basic variable, 3) changing the right-hand side of a constraint, 4) changing coefficients of a non-basic variable in the objective function and constraints, 5) adding a new variable or activity, and 6) adding a new constraint. Graphical sensitivity analysis can show how the optimal solution changes if an objective function coefficient or right-hand side changes.

Uploaded by

adammarthen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views20 pages

W5 - Sensitivity Analysis

Sensitivity analysis examines how changes to an LP's parameters affect its optimal solution. There are six types of changes that may impact the optimal solution: 1) changing an objective function coefficient of a non-basic variable, 2) changing an objective function coefficient of a basic variable, 3) changing the right-hand side of a constraint, 4) changing coefficients of a non-basic variable in the objective function and constraints, 5) adding a new variable or activity, and 6) adding a new constraint. Graphical sensitivity analysis can show how the optimal solution changes if an objective function coefficient or right-hand side changes.

Uploaded by

adammarthen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Sensitivity Analysis

Teuku Naraski Zahari, S.T., M.T.


Sensitivity Analysis (1/2)
Sensitivity analysis is concerned with how changes in an LP’s parameters
affect the LP’s optimal solution.
There are six types of changes in an LP’s parameters that may change
the optimal solution:
1. Changing the objective function coefficient of a NBV
2. Changing the objective function coefficient of a BV
3. Changing the RHS of a constraint
4. Changing the coefficients of a NBV in objective function and
constratint
5. Adding a new variable or activity
6. Adding a new constraint
Sensitivity Analysis (2/2)
Consider the previous Giapetto Problem
max 𝑧 = 3𝑥1 + 2𝑥2
s.t.
2𝑥1 + 𝑥2 ≤ 100 (finishing constraint)
𝑥1 + 𝑥2 ≤ 80 (carpentry constraint)
𝑥1 ≤ 40 (constraint on soldier toy demand)
𝑥1 , 𝑥2 ≥ 0 (sign restriction)
The optimal solution is 𝑧 = 180, 𝑥1 = 20, 𝑥2 = 60 with 𝑥1 , 𝑥2 , and 𝑠3 as basic
variables.
What will happened if:
• there are changes in any of the problem’s objective function coefficients, or
• there are changes in any of the RHS of the constraints?
Graphical Sensitivity Analysis:
The Effect of a Change in an Objective Function Coefficient
(1/2)
• Let 𝑐1 be the contribution of profit for 𝑥1
(soldier toy). Finishing Constraint,
slope=-2
• At present, 𝑐1 = 3 and the isoprofit line has
the form 3𝑥1 + 2𝑥2 = 𝑧 and has a slope of
3 A Demand Constraint
− 2. The current optimal point is at point B.
• If 𝑐1 changed so that the slope of the B
isoprofit line is flatter than the carpentry Isoprofit Line,
𝑧 = 180, slope= −3/2
constraint, the optimal point will shift to
point A.
o Because the slope of the carpentry Carpentry Constraint,
constraint is −1, then the isoprofit line will C Slope = -1
𝑐
have a slope of − 1 > −1 or 𝑐1 < 2 and the
2
current basis will no longer be optimal.
E D
o The optimal solution will be 𝑥1 = 0, 𝑥2 = 80
Graphical Sensitivity Analysis:
The Effect of a Change in an Objective Function Coefficient
(2/2)
• On the other hand, if If 𝑐1 changed so that
the slope of the isoprofit line is steeper than Finishing Constraint,
slope=-2
the finishing constraint, the optimal point
will shift to point C.
o Because the slope of the finishing constraint A Demand Constraint
is −2, then the isoprofit line will have a slope
𝑐
of − 21 < −2 or 𝑐1 > 4 and the current basis B
Isoprofit Line,
will no longer be optimal. 𝑧 = 180, slope= −3/2
o The optimal solution will be 𝑥1 = 40, 𝑥2 = 20.
• Hence, the basis remains optimal when 2 ≤
Carpentry Constraint,
𝑐1 ≤ 4. C Slope = -1
• When 𝑐1 varies between this range,
Giapetto will still need to produce soldier
toys and train toys even though the profit E D
will be varied.
Graphical Sensitivity Analysis:
The Effect of a Change in a Right-Hand Side of The
Constraints (1/2)
• Let 𝑏1 be available finishing hour
New Finishing Constraint
(constraint 1)
• If we change the value of 𝑏1 , then as long
as the point where the finishing and
A
carpentry constraints are binding remains Demand Constraint

feasible, the optimal solution will still occur


where these constraints intersect. B
New Isoprofit Line
• For example, if 𝑏1 = 120, point C will shift to
C’. When 𝑏1 > 120, the current basis will no C’
longer be optimal. Similarly, when 𝑏1 < 80,
Carpentry Constraint,
the current basis will no longer be optimal C
also.
• Hence, the basis will remain the same for
80 ≤ 𝑏1 ≤ 120. E D
Graphical Sensitivity Analysis:
The Effect of a Change in a Right-Hand Side of The
Constraints (2/2)
• We can calculate how much the decision
variables will change when 𝑏1 , 𝑏2 , … , 𝑏𝑚 New Finishing Constraint
changes.
• For example, let ∆1 be the change of 𝑏1 . If
𝑏1 becomes 100 + ∆1 , then We can A Demand Constraint
calculate how much the decision variables
by solving B
2𝑥1 + 𝑥2 = 100 + ∆1 New Isoprofit Line

𝑥1 + 𝑥2 = 80
C’
• Solving the equations will yield 𝑥1 = 20 + ∆1 Carpentry Constraint
and 𝑥2 = 60 − ∆1 . C
o Increasing the available finishing time will
increase the number of soldier toys
produced and decreases the number of
train toys produced. E D
Expressing an LP’s Optimal Tableau in
Terms of Its Parameters (1/6)
Suppose we have found an optimal solution a LP problem. Let 𝐱 𝐵𝑉 and
𝐱 𝑁𝐵𝑉 be an 𝑚 × 1 vector containing basic variables and non-basic
variables in the optimal tableau respectively,
𝑥𝐵𝑉1 𝑥𝑁𝐵𝑉1
𝑥𝐵𝑉2 𝑥𝑁𝐵𝑉2
𝐱 𝐵𝑉 = ⋮ , 𝐱 𝑁𝐵𝑉 = ⋮
𝑥𝐵𝑉𝑚 𝑥𝑁𝐵𝑉𝑚

Also let 𝐜𝐵𝑉 be an 1 × 𝑚 vector containing the coefficients of the basic


variables and 𝐜𝑁𝐵𝑉 be an 1 × (𝑛 − 𝑚) vector containing the coefficients
of the non-basic variables in the objective function,
𝐜𝐵𝑉 = 𝑐𝐵𝑉1 𝑐𝐵𝑉2 ⋯ 𝑐𝐵𝑉𝑚 , 𝐜𝑁𝐵𝑉 = 𝑐𝑁𝐵𝑉1 𝑐𝑁𝐵𝑉2 ⋯ 𝑐𝑁𝐵𝑉(𝑛−𝑚)
Expressing an LP’s Optimal Tableau in
Terms of Its Parameters (2/6)
Also let 𝐁 be an 𝑚 × 𝑚 matrix whose jth column is the constraints
coefficient basic variable in column j, and 𝐍 be an 𝑚 × (𝑛 − 𝑚) matrix
whose columns are the constraints coefficient for the non-basic
variables.
Finally let 𝐚𝒋 be an 𝑚 × 1 vector containing the constraints coefficient for
variable 𝑥𝑗 and 𝐛 be an 𝑚 × 1 vector containing the RHS of the
constraints.
Then, a LP can be written in the form
max 𝑧 = 𝐜𝐵𝑉 𝐱 𝐵𝑉 + 𝐜𝑁𝐵𝑉 𝐱 𝑵𝐵𝑉
s.t.
𝐁𝐱 𝐵𝑉 + 𝐍𝐱 𝑵𝐵𝑉 = 𝐛
𝐱 𝐵𝑉 , 𝐱 𝑁𝐵𝑉 ≥ 0
Expressing an LP’s Optimal Tableau in
Terms of Its Parameters (3/6)
Using the Dakota Problem in previous lecture (omitting the 4 th constraint),
max 𝑧 = 60𝑥1 + 30𝑥2 + 20𝑥3
s.t. 8𝑥1 + 6𝑥2 + 𝑥3 ≤ 48 (lumber constraint)

4𝑥1 + 2𝑥2 + 1.5𝑥3 ≤ 20 (finishing constraint)


2𝑥1 + 1.5𝑥2 + 0.5𝑥3 ≤ 8 (carpentry constraint)
𝑥1, 𝑥2, 𝑥3 ≥ 0
The optimal tableau for the Dakota problem was
𝑧 +5𝑥2 +10𝑠2 +10𝑠3 = 280
−2𝑥2 −𝑠1 +2𝑠2 −8𝑠3 = 24
−2𝑥2 +𝑥3 +2𝑠2 −4𝑠3 = 8
𝑥1 +1.25𝑥2 −0.5𝑠2 +1.5𝑠3 = 2
Expressing an LP’s Optimal Tableau in
Terms of Its Parameters (4/6)
Note that 𝐵𝑉 = {𝑠1 , 𝑥3 , 𝑥1 } and 𝑁𝐵𝑉 = {𝑥2 , 𝑠2 , 𝑠3 }. The optimal BFS is 𝑧 = 280, 𝑠1 =
24, 𝑥3 = 8, 𝑥1 = 2, 𝑥2 = 0, 𝑠2 = 0, 𝑠3 = 0.
We can rewrite the LP as
𝑠1 𝑥2
max 𝑧 = 0 20 60 𝑥3 + 30 0 0 𝑠2
𝑥1 𝑠3
s.t.
1 1 8 𝑠1 6 0 0 𝑥2 𝑠1
0 1.5 4 𝑥3 + 2 1 0 𝑠2 = 𝑥3
0 0.5 2 𝑥1 1.5 0 1 𝑠3 𝑥1
𝑠1 𝑥2
𝑥3 , 𝑠2 ≥0
𝑥1 𝑠3
Expressing an LP’s Optimal Tableau in
Terms of Its Parameters (5/6)
1. Expressing the Constraints in Any Tableau in Terms of 𝐁−𝟏 and the Original
LP
• Multiplying the constraints by B −1 , we obtain
𝐁 −1 𝐁𝐱𝐵𝑉 + 𝐁 −1 𝐍𝐱𝑵𝐵𝑉 = 𝐁 −1 𝐛
Or
𝐱𝐵𝑉 + 𝐁−1 𝐍𝐱𝑵𝐵𝑉 = 𝐁−1 𝐛
• Note that the 𝑖th basic variable has a coefficient of 1 in the 𝑖th
constraint and zero coefficient in each other constraint, indicating that
the above formula yields the constraints for the optimal tableau.
• The constraints coefficient for variable 𝑥𝑗 in the optimal tableau is 𝐁−1 𝐚𝒋
• The RHS of the constraints in the optimal tableau is 𝐁−1 𝐛
• Using the Gauss-Jordan method, we can obtain 𝐁−1 .
Expressing an LP’s Optimal Tableau in
Terms of Its Parameters (6/6)
2. Determining the Optimal Tableau’s Row 0 in Terms of the Initial LP
• Multiplying the constraints by 𝐜𝐵𝑉 𝐁−1 , we obtain
𝐜𝐵𝑉 𝐱 𝐵𝑉 + 𝐜𝐵𝑉 𝐁−1 𝐍𝐱 𝑵𝐵𝑉 = 𝐜𝐵𝑉 𝐁 −1 𝐛
And rewrite the objective function
𝑧 − 𝐜𝐵𝑉 𝐱 𝐵𝑉 − 𝐜𝑵𝐵𝑉 𝐱 𝑵𝐵𝑉 = 0
Adding both equations yields
𝑧 − (𝐜𝐵𝑉 𝐁−1 𝐍 − 𝐜𝑵𝐵𝑉 )𝐱 𝑵𝐵𝑉 = 𝐜𝐵𝑉 𝐁−1 𝐛

• The coefficients of 𝑥𝑗 in row 0 of the optimal tableau is then


𝑐ഥ𝑗 = 𝐜𝐵𝑉 𝐁−1 𝐚𝑗 − 𝑐𝑗
We can also use this formula for slack, excess, and artificial variables.
• The RHS in row 0 of the optimal tableau is 𝐜𝐵𝑉 𝐁−1 𝐛
Changing the Objective Function
Coefficient of a Nonbasic Variable
• The only non-basic decision variable in the Dakota problem is 𝑥2 with
coefficient in the objective function 𝑐2 = 30. Because 𝑥2 is a non-basic
variable, 𝐜𝐵𝑉 has not changed. Thus, BV will remain optimal if 𝑐ഥ2 > 0, and BV
will be suboptimal if 𝑐ഥ2 < 0.
• Suppose now 𝑐2 = 30 + ∆, then
6
𝑐ഥ2 = 0 10 10 2 − 30 + ∆ = 5 − ∆
1.5
• Thus, 𝑐ഥ2 > 0 will hold, and BV will remain optimal, if 5 − ∆ ≥ 0, or ∆ ≤ 5. This
means that if the price of tables is decreased or increased by $5 or less, BV
remains optimal. Thus, for 𝑐2 = $30 + $5 = $35, BV remains optimal.
• If ∆ > 5, the BV will not be optimal, and we need restart the Simplex Algorithm
again to find the optimal solution.
Changing the Objective Function
Coefficient of a Basic Variable (1/2)
Suppose that 𝑐1 is changed to 60 + ∆, changing 𝐜𝐵𝑉 [0 20 60] to [0 20 (60 +
∆)]. Because 𝑠1 , 𝑥3 , and 𝑥1 are basic variables, their coefficients in row 0
must still be 0.
The coefficient of each non-basic variable in the new row 0 is as follows:
1 2 −8 6
𝑐ഥ2 = 𝐜𝐵𝑉 𝐁−1 𝐚2 − 𝑐2 = 0 20 60 + ∆ 0 2 −4 2 − 30 = 5 + 1.25∆
0 −0.5 1.5 1.5
1 2 −8 0
𝑠ഥ2 = 𝐜𝐵𝑉 𝐁−1 𝐚5 − 𝑠2 = 0 20 60 + ∆ 0 2 −4 1 − 0 = 10 − 0.25∆
0 −0.5 1.5 0
1 2 −8 0
𝑠ഥ3 = 𝐜𝐵𝑉 𝐁−1 𝐚6 − 𝑠3 = 0 20 60 + ∆ 0 2 −4 0 − 0 = 10 + 1.5∆
0 −0.5 1.5 1
Changing the Objective Function
Coefficient of a Basic Variable (2/2)
BV will remain optimal if and only if all the following hold:
5 + 1.25∆≥ 0
10 − 0.5∆≥ 0
10 + 1.5∆≥ 0
or
−4 ≤ ∆≤ 20
or
56 ≤ 𝑐1 ≤ 80
Changing the Right-Hand Side of a
Constraint (1/3)
Changing the RHS of a constraint will have affect on two
things:
1. Effect on the Current Basis
2. Effect on the Decision Variables and Objective Function

The current basis remains optimal if the right-hand side of


each constraint in the tableau remains non-negative.
If the right-hand side of any constraint is negative, then the
current basis is infeasible, and a new optimal solution must be
found
Changing the Right-Hand Side of a
Constraint (2/3)
1. Effect on the Current Basis
Suppose we change the RHS of the 2nd constraint 𝑏2 from 20 to 20 + ∆,
then the right-hand side of the constraints in the optimal tableau will
become
1 2 −8 48 24 + 2∆
𝐁−1 𝐛 = 0 2 −4 20 + ∆ = 8 + 2∆
0 −0.5 1.5 8 2 − 0.5∆
For the current basis to remain optimal, we require that the right-hand
side of each constraint in the optimal tableau remain nonnegative,
this means all the following should hold
5 + 1.25∆≥ 0, 8 + 2∆≥ 0, 2 − 0.5∆≥ 0
Or
−4 ≤ ∆≤ 4, 16 ≤ 𝑏2 ≤ 24
Changing the Right-Hand Side of a
Constraint (3/3)
2. Effect on the Decision Variables and Objective Function
Recall that the values of the basic variables in the optimal solution are
given by 𝐁 −1 𝐛 and the optimal z-value is given by 𝐜𝐵𝑉 𝐁−1 𝐛. Hence,
changing 𝐛 will change the values of the basic variables and the
optimal z-value.
Suppose now 22 finishing hours are available (𝑏2 = 22),
𝑠3 1 2 −8 48 28
𝑥3 = 𝐁 −1 𝐛 = 0 2 −4 22 = 12
𝑥1 0 −0.5 1.5 8 1
Then Dakota must produce 12 chairs and 1 desk. And the new 𝑧-value
is now
48
𝐜𝐵𝑉 𝐁−1𝐛 = 0 10 10 22 = 300
8
Changes in an LP’s parameters
In summary, in a maximization problem

You might also like