Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Sensitivity Analysis

This tutorial covers the following subjects:

• Sensitivity in the RHS of constraints


• Sensitivity in the coefficients of the objective function

Consider the following example:

Sugarco can manufacture three types of candy bars. Each candy bar consists completely of
sugar and chocolate. The compositions of each type of candy bar and the profit earned from
each candy bar are shown in the table below.

Types Amount of sugar (ounces) Amount of chocolate (ounces) Profit(cents)


1 1 2 3
2 1 3 7
3 1 1 5

Fifty oz of sugar and 100 oz of chocolate are available. Let xi be the number of Type i candy
bars manufactured. Sugarco should solve the following LP:

Max Z = 3x1+ 7x2+ 5x3


s.t. x1+ x2+x3≤ 50 (Sugar constraint)
s. 2x1+ 3x2+ x3≤ 100 (Chocolate constraint)
x1 , x2 , x3 ≥ 0
The optimal tableau is as shown below:

CB Basis x1 x2 x3 s1 s2 Value
5 x3 1/2 0 1 3/2 -1/2 25
7 x2 1/2 1 0 -1/2 1/2 25

𝐶 -3 0 0 -4 -1 Z=300
A. Reduced costs and shadow prices:

CB Basis x1 x2 x3 s1 s2 Value
5 x3 1/2 0 1 3/2 -1/2 25
7 x2 1/2 1 0 -1/2 1/2 25
𝐶 -3 0 0 -4 -1 Z=300
-1*Reduced cost of -1*Reduced cost -1*Reduced cost -1*shadow price of -1*shadow price of
product 1 of product 2 of product 3 resource 1 resource 2

A shadow price represent how much 1 unit of a resource is worth for Sugarco .It is the
minimum price for which they will be willing to give up 1 unit of said resource. Making the 3
types of chocolate bars and selling them for $3, $7 and $5 per unit respectively will generate
as much profits as selling their available resources for $4 per 1 unit of sugar and $1 per 1 unit
of chocolate. This also implies that Sugarco will be willing to pay at most $4 for an additional
unit of sugar and $1 for an additional unit of chocolate since that’s how much these resources
are worth.

Reduced costs represent the deficit for decision variables x1, x2 and x3 to become basic. They
represent the amount by which the profit of the corresponding product is lacking in order for
that product to become profitable.

This constraint implies that the sum of money to be paid to buy the resources needed to make
1 unit of the first type of candy bars should be at least equal to $3. According to the simplex
tableau, the reduced cost of product1 is 3. This means that the difference between how much
the resources needed are worth and the profit made by selling 1 unit of the product is $3 (it is
obvious that making this product is thus non-profitable, to achieve break-even or positive
profit, we have to sell the product for an amount equal to or larger than the worth of the
resources we use to make it). If a product with a reduced cost > 0 enters the basis it will cause
the total profit to drop by an amount equal to its reduced cost).

Question#1: What is the minimum profit rate for Type 1 in order for this product to be
included in the production plan?

→ The reduced cost of x1 is equal to 3, we should increase the profit rate of type 1 by at least
$3 to be able to include it in the production plan, and thus its profit should be at least $6
(original profit rate+ reduced cost)

Question#2: If you have the choice between obtaining 1 unit of sugar or 3 units of
chocolate at the same cost what would you decide?

→ Both s1 and s2 are non-basic which means both resources are depleted. Resource 1 (sugar)
has a shadow price equal to 4 and resource 2 (chocolate) has a shadow price equal to 1. One
additional unit of sugar is worth $4, while 3 additional units of chocolate are worth $1*3=$3,
thus it is more profitable to acquire one additional unit of sugar rather than 3 units of
chocolate if offered for the exact same price.
Question#3: What is the maximum amount of money you would be willing to pay for an
additional unit of sugar?

→ 1 unit of sugar is worth $4 (it will increase my profit by $4), so the maximum amount I am
willing to pay for an additional unit is $4

Question#4: If you are offered additional units of chocolate for a price of $2/unit would
you accept?

→ No, the maximum amount I would pay is $1, buying additional units for $2/unit is not
profitable

B. Sensitivity in the RHS of a constraint


Question#1: Study the effect of changes in the availability of sugar

→ This question is about the sensitivity in the RHS (right hand side) of a constraint, note
that the sugar availability constraint is a binding constraint as the associated slack variable
is non-basic (s1=0)

What this question is trying to say is: by how many units can we increase/decrease the
availability of sugar without any impact on the feasibility and hence the optimality of the
optimal basis

Preserving the optimality of the optimal basis means that even though the values would
change, nothing will leave/enter the basis

Answer: let ∆1: the change in the RHS of constraint 1 (change in the availability of sugar)

The constraint becomes: x1+ x2+x3≤ 50+∆1

A change in the RHS of a constraint will only affect the corresponding column in the simplex
tableau ( the corresponding slack variable column)

The parameter ∆1 and the variable s1 have identical coefficients in the standard form and will
continue to have identical coefficients through all simplex iterations until the optimal tableau

For the optimal basis to remain feasible and hence optimal all the RHS values must remain ≥ 0
S1 RHS

3/2 25

-1/2 25

3 3 2 50
25 + 2 ∆1 ≥ 0 ∆1 ≥ −25 ∆1 ≥ −25 ∗ 3 ∆1 ≥ − 50
2
{ 1 → { 1 →{ →{ 3 ➔ − ≤ ∆1 ≤ 50
3
25 − 2 ∆1 ≥ 0 − 2 ∆1 ≥ −25 −∆1 ≥ −25 ∗ 2 ∆1 ≤ 50

→ As long as we do not decrease the availability of sugar by more than 50/3 (16.67) units or increase
by more than 50 units the optimal basis remains optimal

P.S: If we happen to have a non-binding constraint (the corresponding slack variable is basic a.k.a
different from zero), the optimal basis remains feasible and optimal as long as the availability
(RHS) of the non-binding constraint is not reduced by an amount beyond its optimal RHS value.

Question#2: In what interval would the sugar availability vary within without the need to re-
optimize the problem (the feasibility range of constraint 1) ?
50 50 100
− ≤ ∆1 ≤ 50 → 50 − ≤ 𝑅𝐻𝑆1 ≤ 50 + 50 → ≤ 𝑅𝐻𝑆1 ≤ 100
3 3 3

Question#3: What is the impact of increasing the availability of sugar by 40 units?

→ ∆1 = 40 ,this increase is within the feasibility range of constraint 1, thus the basis remains
optimal however the RHS values including the Z value will change

S1 3
RHS 25 + 2 ∗ 40 = 85
3/2 25 { 25 − 1 ∗ 40 = 5 → 𝑥3 = 85 , 𝑥2 = 5 𝑎𝑛𝑑 𝑍 = 460
2
-1/2 25 300 + 4 ∗ 40 = 460
Zj= 4 Z=300

Question#4: What is the impact of increasing the availability of sugar by 60 units?

→ ∆1 = 60 , this increase is not within the range of feasibility of the constraint, the basis will
change, we have to re-optimize the LP (here we are not asked to re-optimize)

C. Sensitivity in the coefficients of the objective function:


Question#5: Study the effect of changes in the profit rate of product 1 → 𝑥1 is a non-basic
variable, thus only its corresponding 𝐶 value changes
Let: ∆𝑝1 : change in the profit rate of product 1

𝐶 value of 𝑥1 is equal to -3, for the optimal basis to remain feasible and optimal, the new
𝑐 − 𝑏𝑎𝑟 value (after including ∆𝑝1 ) must remain ≤ 0

−3 + ∆𝑝1 ≤ 0 → ∆𝑝1 ≤ 3 → As long as the profit rate of product 1 does not increase beyond
$6 , the optimality is preserved.

→ As long as we do not increase the profit rate of product 1 by more than $3, the optimal
basis remains optimal

Note that if we increase the profit rate by exactly $3 which is the shadow price of x1 , we will
have multiple solutions , as x1, a non-basic variable will have a 𝐶 = 0 , so even though the
optimal basis remains optimal ,we no longer have 1 finite solution , we would have multiple
solutions.

Question#6 : Study the effect of changes in the profit rate of product 2

→ 𝑥2 is a basic variable , thus the 𝐶 values of all non-basic variables will be impacted

Let: ∆𝑝2 : change in the profit rate of product 2

𝑁𝑒𝑤 (𝐶 ) = 𝑜𝑙𝑑 (𝐶) − 𝑅𝑜𝑤(𝑥2 ) ∗ ∆𝑝2

For the basis to remain optimal, the 𝑁𝑒𝑤 𝐶 of the non-basic variables must remain ≤ 0

7 x2 1/2 1 0 -1/2 1/2 25

cj − zj -3 0 0 -4 -1 Z=300

1
𝑁𝑒𝑤𝑐̅ (𝑥1 ) = −3 − ∆𝑝2 ≤ 0 ∆𝑝2 ≥ −6
2
1
𝑁𝑒𝑤𝑐̅ (𝑠1 ) = −4 + 2 ∆𝑝2 ≤ 0 → { ∆𝑝2 ≤ 8
1 ∆𝑝2 ≥ −2
𝑁𝑒𝑤𝑐̅ (𝑠2 ) = −1 − 2 ∆𝑝2 ≤ 0
{
→ −2 ≤ ∆𝑝2 ≤ 8

As long as the variation in the profit rate of product 2 is within the interval, the optimal basis
remains optimal

The profit rate of product 2 must be in this interval → 5 ≤ profit rate of product 2 ≤ 10 for
the optimal basis to remain unchanged.

You might also like