You are on page 1of 5

6

Sensitivity analysis

A great attraction of linear programming models is that as well as being able to nd optimal solutions easily it is also easy to perform certain sensitivity analysis. We shall investigate what we can say when certain parts of the input data may change slightly.

6.1

Changes in right-hand side bi

Suppose that x and y are optimal solutions for an activity analysis LP and its dual. By the dualilty theorm, the optimal prot cT x saties
cT x = bT y = b1 y1 + b2 y2 + + bm ym .

Now suppose that we nd an extra unit of resource i, so that bi should be replaced by bi + 1. The constraints in the dual problem are not altered, so that y is still feasible there. If y is still optimal then the increase in return is yi (and is always at most yi ). Thus the shadow price yi is the marginal value of the ith resource, or more generally the marginal value of relaxing the ith constraint. Lets consider again the example in 4. Recall maximise 2x1 +4x2 subject to 3x1 +4x2 2x1 + x2 x1 +3x2 with initial tableau: x1 3 2 1 2 x2 4 1 3 4 x3 2 2 2 3 z1 1 0 0 0 z2 0 1 0 0 z3 0 60 0 40 1 80 0 0 +3x3 +2x3 +2x3 +2x3 x 60 40 80 0

and nal tableau: x1


1 3 5 6 5 3 11 6

x2 1 0 0 0

x3 z1 z2 1 0 1 3 3 1 2 1 6 3 0 2 1 3 3 0 5 2 6 3

z3 2 0 63 2 0 16 3 2 1 26 3 2 0 76 3

2 The optimal solution is x = (0, 6 2 , 16 3 ), and the optimal value is 76 2 . In addition, the 3 3 5 2 optimal dual solution is y = ( 6 , 3 , 0)T . Thus if b1 increases by 1, the optimal value 5 should increase by 6 .

If we add t(1, 0, 0)T to the right-hand side b, we know that the optimal value should 5 increase by 6 t, at least if t is small. But how big can t be? Clearly the optimal value does increase at this rate as long as the current optimal dual solution y = ( 5 , 2 , 0)T remains 6 3 optimal. This holds as long as the current basis remains feasible; in other words, as long as none of the current basic variables are forced negative, as can be seen by considering 34

the nal simplex tableau. Suppose that we insist on keeping the same basis, with vector xB = (x2 , x3 , z3 )T of basic variables. If b changes to b + th where h = (1, 0, 0)T , say, then we want t small enough so that (x2 , x3 , z3 )T remain non-negative. Based on the discussion in 4.3 we realise that if the initial constraint changes to 3x1 + 4x3 + 2x3 60 + t , we must have the new nal tableau x1 x2 x3 z1 z2 1 1 1 0 1 3 3 3 5 1 2 0 1 6 6 3 0 0 2 1 5 3 3 3 11 0 0 5 2 6 6 3 z3 2 0 63 2 0 16 3 2 1 26 3 2 0 76 3

1 t 3 1 t 6 2 t 3 5 t 6

Hence for 20 t 40 (in other words, 40 b1 100 ) the current basis remains non-negative (thus feasible) so the optimal dual solution does not change. The optimal 2 solution becomes x = (0, 6 2 + 1 t, 16 3 1 t), while the optimal value is 76 2 + 5 t. If we 3 3 6 3 6 wish to make t < 20 or t > 40 we may use the dual simplex method (see below) to continue the investigation.

6.2

Changes in objective function cj basic variable

Suppose that the coecient vector of the objective function c changes to c + th. If the current optimal solution x remains optimal, the optimal value will increase by thT x . Note that xB = (x2 , x3 , z3 )T in the previous example. Consider the case h = (0, 1, 0)T . The initial objective function now changes to maximise 2x1 + (4 + t)x2 + 3x3 , z3 2 0 63 2 0 16 3 2 1 26 3 2 0 76 3 we must have the new nal tableau x1 x2 x3 z1 z2 1 1 1 1 0 3 3 3 5 2 0 1 1 6 6 3 5 2 1 3 0 0 3 3 2 11 t 0 5 3 6 6

Perform row operations to express the last row in terms of non-basic variables, and obtain the new tableau x1 x2 x3 z1 z2 z3 2 1 1 1 1 0 3 0 63 3 3 5 1 2 2 0 1 6 0 16 3 6 3 1 2 5 0 0 2 3 1 26 3 3 3 t t 2 t 2 2 11 3 0 0 5 3 3 + 3 0 76 3 6 3 t 6 6 35

The current optimal solution will remain optimal if all the revised components of the 5 last row are all non-positive. Thus we see that for 2 t 2, the optimal solution is 2 2 2 still x = (0, 6 3 , 16 3 ), and the optimal value becomes 76 3 + 6 2 t. 3
5 If t < 2 we would need to introduce z1 into the basis and pivot again to nd the optimal solution. Similarly, if t > 2, z2 would be the entering variable for the next pivoting iteration.

6.3

Changes in objective function cj non-basic variable

The case for changes in the coecient of a non-basic variable is easier. Note that in the previous example x1 is non-basic. Thus consider h = (1, 0, 0)T , and the initial objective function now changes to maximise The new nal tableau becomes x1
1 3 5 6 5 3

(2 + t)x1 + 4x2 + 3x3 .

11 + t 6

x2 1 0 0 0

x3 z1 z2 1 0 1 3 3 1 2 1 6 3 0 2 1 3 3 5 0 6 2 3

z3 2 0 63 2 0 16 3 2 26 3 1 2 0 76 3

As long as t 11 , the current optimal solution will not change. If t > 11 we would 6 6 need to introduce x1 into the basis and pivot to nd the new optimal solution.

6.4

Introduction of a new activity / variable

2 Suppose, after obtaining the current optimal solution x = (0, 6 2 , 16 3 ), we discover that 3 the LP model did not consider all the attractive alternative activities. Considering a new activity requires introducing a new variable with the appropriate coecients into the objective function and constraints of the current model.

Consider adding +2x4 , +3x4 , and +x4 to the objective function, rst constraint, and third constraint, respectively, in our example, then the model becomes maximise 2x1 +4x2 subject to 3x1 +4x2 2x1 + x2 x1 +3x2 +3x3 +2x4 +2x3 +3x4 60 +2x3 40 +2x3 + x4 80 x 0

The convenient way to deal with this case is to pretend that the new variable x4 actually was in the original model with all its coecients equal to zero (so that they 36

remain zero in the nal simplex tableau) and that x4 is a non-basic variable in the current solution. If we change these zero coecients to their actual values for x4 , the initial tableau becomes x1 3 2 1 2 and the nal tableau becomes x1
1 3 5 6 5 3 11 6

x2 4 1 3 4

x3 2 2 2 3

x4 3 0 1 2

z1 1 0 0 0

z2 0 1 0 0

z3 0 60 0 40 1 80 0 0

x2 1 0 0 0

x3 x4 z1 z2 1 0 a14 1 3 3 2 1 a24 1 6 3 2 0 a34 3 1 3 5 0 d4 6 2 3

z3 2 0 63 2 0 16 3 2 1 26 3 2 0 76 3

where
a14 = a24 a34 d4 1 1 3 0+01 = 1 3 3 2 1 1 = 3+ 0+01 = 6 3 2 2 1 = 3 0 + 1 1 = 1 3 3 5 2 1 = 2 3 0+01 = 6 3 2

Since d4 is non-positive, this revised nal tableau is still optimal, and the optimal solu2 tion remains x = (0, 6 2 , 16 3 ). 3 Note that d4 is the key to see if the current optimal solution remains optimal. This suggests a very easy way to conduct sensitivity analysis for introducing a new variable. Simply checking the new dual constraint, we can immediately see if the optimal dual solution is still feasible or not. Recall that in this example the optimal dual solution 5 2 is y = ( 6 , 3 , 0)T . Substituting it into the new dual constraint, 3y1 + 1y3 2, we see that this inequality constraint holds. In the case where the new dual constraint is not satised, resulting in a positive d4 , the new variable x4 would need to be introduced into the basis and pivot.

6.5

Introduction of a new constraint

Suppose that, having solved this original LP problem, we realise that a new constraint has arisen since the model was formulated: x1 + x2 + 3x3 50. The current optimal solution may no longer be feasible. We may proceed as follows.

37

Introduce a slack variable z4 0 to produce x1 + x2 + 3x3 + z4 = 50 and add a new row just above the last row of the current nal tableau with these coecients. Now peform row operations to substitute out for the current basic variables x2 and x3 . We thus obtain x1 x2 x3 z1 z2 z3 z4 1 1 1 0 1 0 0 62 3 3 3 3 5 2 0 1 1 0 0 16 2 6 6 3 3 5 0 0 2 1 1 0 3 26 2 3 3 3 1 0 0 5 0 1 6 2 11 6 6 3 3 11 0 0 5 2 0 0 76 2 6 6 3 3 Note that the right-hand side of row 4 is now negative, indicating that this simplex tableau is not (primal) feasible since the non-negativity constraint for z4 is not satised 2 (z4 = 6 3 ). To solve this problem the dual simplex algorithm is required.

Dual Simplex algorithm

[not examinable]

This is essentially a disguised way of applying the simplex algorithm to the dual of a problem, and it is used to restore feasiblity. Suppose we have a simplex tableau which is optimal or dual feasible in that each component in the last row is non-positive; however, it is not primal feasible becasue some basic variables are negative. The dual simplex algorithm chooses a pivot element so that when we pivot we maintain these conditions and move towards primal feasiblity. First we choose as leaving variable a basic variable which is the most negative, and the corresponding row is the pivot row. The entering variable is determined by selecting the non-basic variable whose coecient in the last row reaches zero rst as an increasing multiple of the pivot row is added to the last row. This selection is made by checking the non-basic variables with negative coecients in the pivot row. The one with the smallest absolute value of the ratio of the coecient in the last row to the coecient in the pivot row is chosen to be the entering variable. Consider the simplex tableau we left above. The leaving variable is z4 , and in the 2 pivot row the non-basic variables with negative coecients are x1 and z2 . Since 5 < 1, z2 is the entering variable, and we pivot on a45 which is 5 . We obtain the following 3 tableau which is primal feasible and hence is optimal. x1
7 10 1 10 13 10 11 10 11 10

x2 1 0 0 0 0

x3 0 1 0 0 0

z1
3 10 1 10 7 10 1 10 9 10

z2 0 0 0 1 0

z3 0 0 1 0 0

z4 1 5
2 5 1 5 3 5 2 5

8 14 28 4 74

The new optimal solution is x = (0, 8, 14), and the optimal value is 74. 38

You might also like