# Operations Research/Sensitivity analysis

Jump to: navigation, search

Sensitivity Analysis deals with finding out the amount by which we can change the input data for the output of our linear programming model to remain comparatively unchanged. This helps us in determining the sensitivity of the data we supply for the problem. If a small change in the input (for example in the change in the availability of some raw material) produces a large change in the optimal solution for some model, and a corresponding small change in the input for some other model doesn't affect its optimal solution as much, we can conclude that the second problem is more robust then the first. The second model is less sensitive to the changes in the input data.

We will consider the case of sensitivity of the optimum solution to changes in the availability of the resources. (Right hand side of the constraints.)

If in any linear programming problem there are n variables and m constraints we can think as the right hand sides as being the representatives of the amount of resources. For example, consider our old chemical company model:

Maximize z = ${\displaystyle 5x_{1}+4x_{2}}$

subject to,

${\displaystyle 6x_{1}+4x_{2}\leq 24}$,

${\displaystyle x_{1}+2x_{2}\leq 6}$,

${\displaystyle x_{2}-x_{1}\leq 1}$,

${\displaystyle x_{2}\leq 2}$,

${\displaystyle x_{1},x_{2}\geq 0}$.

The right hand sides represented various resources: the amount of raw materials 1 and 2, the market limit, and the daily demand. Now if these right hand sides were changed the whole problem would change. Suppose we want to know is the worth of any particular resource. More precisely, we want to know how much is the amount of the first raw material being 24 units available really important. If we increase the amount from 24 to 25 our optimal value changes to 21.75, whereas previously it was 21. So a unit increase in the amount of the first resource changes the optimal value (which is the total profit) by 0.75. This can be therefore thought of as the unit worth of the first resource. The technical term for this is the first resources' shadow price.

## Determination of shadow prices

To determine the shadow prices for the resources individually by increasing them one by one and solving the associated linear models is extremely inefficent. Let us examine another way of calculating the shadow prices.

Consider the following linear system:

Maximize z = ${\displaystyle 3x_{1}+2x_{2}+5x_{3}}$

subject to,

${\displaystyle x_{1}+2x_{2}+x_{3}\leq 430}$,

${\displaystyle 3x_{1}+2x_{3}\leq 460}$,

${\displaystyle x_{1}+4x_{2}\leq 420}$,

${\displaystyle x_{1},x_{2},x_{3}\geq 0}$.

The optimal simplex table with slack variables ${\displaystyle x_{4},x_{5},x_{6}}$ is:

Basic ${\displaystyle x_{1}}$ ${\displaystyle x_{2}}$ ${\displaystyle x_{3}}$ ${\displaystyle x_{4}}$ ${\displaystyle x_{5}}$ ${\displaystyle x_{6}}$ BFS
z 4 0 0 1 2 0 1350
${\displaystyle x_{2}}$ ${\displaystyle {\frac {-1}{4}}}$ 1 0 ${\displaystyle {\frac {1}{2}}}$ ${\displaystyle {\frac {-1}{4}}}$ 0 100
${\displaystyle x_{3}}$ ${\displaystyle {\frac {3}{2}}}$ 0 1 0 ${\displaystyle {\frac {1}{2}}}$ 0 230
${\displaystyle x_{6}}$ 2 0 0 -2 1 1 20

Now to find out the shadow prices write the above model's standard form as follows:

${\displaystyle x_{1}+2x_{2}+x_{3}=430-x_{4}}$,

${\displaystyle 3x_{1}+2x_{3}=460-x_{5}}$,

${\displaystyle x_{1}+4x_{2}=420-x_{6}}$.

If resource 1 is increased by one unit it means that the first slack variable is decreased by one unit so that the equality between the left and the right hand sides remains unchanged. A similar thing holds for all other resources as well.

From the optimal simplex table we have the following constraint:

${\displaystyle z+4x_{1}+x_{4}+2x_{5}+0x_{6}=1350}$.

This can be rewritten as:

${\displaystyle z=1350-4x_{1}+1(-x_{4})+2(-x_{5})+0(-x_{6})=1350}$.

Given that a decrease in the value of a slack variable is equivalent to an increase in its resource, we get

${\displaystyle z=1350-4x_{1}}$+1(increase in resource 1)+2(increase in resource 2)+0(increase in resource 3)=1350

Thus we can see that:

• A one unit increase in resource 1 increases z by 1
• A one unit increase in resource 2 increases z by 2
• A one unit increase in resource 3 increases z by 0

Thus the shadow prices are 1, 2 and 0 respectively.