Sensitivity analysis The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis: Changing the coefficient of a nonbasic variable In the original optimal solution (the current solution), all the nonbasic variables equal to 0. So if the coefficients of a nonbasic variable was changed, all the constraints will still be satisfied. The problem is whether the current solution is still optimal. This is the same question as whether the dual solution is still feasible. Since only one constraint has been changed, this should be easy to check. Example 1 Consider this situation: A furniture company makes desks, tables and chairs. Resource Desk Table Chair Available Lumber (ft 2 ) 6 1 4 Finishing hours 4 2 1.5 20 Carpentry hours 2 1.5 0.5 Profit 60 30 20 Let x 1 be the number of desks produced; x 2 be the number of tables produced; x 3 be the number of chairs produced: Max z =60x 1 +30x 2 +20x 3 x 1 +6x 2 + x 3 4 4x 1 +2x 2 +1.5x 3 20 2x 1 +1.5x 2 +0.5x 3 Last table The dual problem is 1 0 5 0 0 10 10 20 x 4 0 0 2 0 1 2 24 x 3 0 0 2 1 0 2 4 x 1 0 1 1.25 0 0 0.5 1.5 2 Min y 0 =4y 1 +20y 2 +y 3 (1) y 1 +4y 2 +2y 3 60 6y 1 +2y 2 +1.5y 3 30 y 1 +1.5y 2 +0.5y 3 20 y 1,y 2,y 3 0 1
Suppose that the profit of a new type of table is $40 and it takes 2.5 hours to finish. x 2, the number of table to be produced is a nonbasic variable in our optimal solution. The new problem is Max z =60x 1 + 40 x 2 +20x 3 The dual problem changes to x 1 +6x 2 + x 3 4 4x 1 + 2.5 x 2 +1.5x 3 20 2x 1 +1.5x 2 +0.5x 3 Min y 0 =4x 1 +20x 2 +x 3 y 1 +4y 2 +2y 3 60 6y 1 + 2.5 y 2 +1.5y 3 40 (2) y 1 +1.5y 2 +0.5y 3 20 The complementary solution of the current optimal solution is (0, 10, 10, 0, 5, 0). Sowehave y 1 =0,y 2 =10,y 3 =10. They still satisfy (2). The current solution is still optimal by the strong duality theorem. Suppose that the new table makes $45 profit. Then (2) becomes 6y 1 + 2.5 y 2 +1.5y 3 45 which is not satisfied by y 1 =0,y 2 =10,y 3 =10. The current solution is not optimal any more. To find the new optimal solution, we apply reoptimization techniques. In this case, we can apply the simplex method starting with the current basic feasible solution. Adding a new variable If a new variable is introduced, i.e. a new activity is being considered, we can first treat it as a nonbasic variable and see if that still gives us the optimal solution by using duality. In the previous example (the original version), suppose that they are also considering making computer tables. The resource requirements and profit are The new primal problem: Resource Computer Table Lumber (ft 2 ) 4 Finishing hours 2 Carpentry hours 1 Profit 25 Max z =60x 1 +30x 2 +20x 3 +25x 4 2
The new dual problem: x 1 +6x 2 + x 3 +4x 4 4 4x 1 +2x 2 +1.5x 3 +2x 4 20 2x 1 +1.5x 2 +0.5x 3 + x 4 Min y 0 =4y 1 +20y 2 +y 3 (3) y 1 +4y 2 +2y 3 60 6y 1 +2y 2 +1.5y 3 30 y 1 +1.5y 2 +0.5y 3 20 4y 1 +2y 2 + y 3 25 (4) Compare (3) with (1) we see that the only difference is the new constraint (4). y 1 =0,y 2 = 10,y 3 =10satisfy (4). The current solution is still optimal. If the profit of a computer table is $35, then the current solution is not optimal any more. We can apply the simplex method starting with the current basic feasible solution. The general situation Max z = cx changes to Ax b x 0 Max z = cx Ax b x 0 Our strategy is: Start with those new parameters and do exactly the operations as before that lead to the final table. Then we check the result. We do not have to actually do the operations. All those operations are recorded in the final table: t T = y A c y y b S A S S b If we have started with A, b and c, the last table would be y A c y y b S A S S b Depending on the changes, this table may or may not be in the proper form. 3
b b Example 2 Consider our old example: Max z =60x 1 +30x 2 +20x 3 x 1 +6x 2 + x 3 4 4x 1 +2x 2 +1.5x 3 20 2x 1 +1.5x 2 +0.5x 3 We have The final table is We have A = 6 1 4 2 1.5, b = 4 20 2 1.5 0.5 c = 60 30 20 1 0 5 0 0 10 10 20 x 4 0 0 2 0 1 2 24 x 3 0 0 2 1 0 2 4 x 1 0 1 1.25 0 0 0.5 1.5 2 y = 0 10 10 S = 1 2 0 2 4 0 0.5 1.5 Suppose that b = ThenewlasttablewouldbethesameexcepttheRHSis y b = 0 10 10 4 22 = 300 S b = 1 2 0 2 4 4 22 = 2 12 0 0.5 1.5 1 4 22 4
The current solution is still optimal. If b = 4 30 y b = 0 10 10 4 30 S b = 1 2 0 2 4 0 0.5 1.5 =30 4 30 = 44 2 3 The current solution is not optimal (for it is not feasible). We can find the allowable range to stay feasible for each component of b. Suppose that b 1 b = 20 S b = 1 2 0 2 4 b 1 20 = b 1 24 0 0.5 1.5 2 For that solution to be feasible (then optimal) we need b 1 24. If we allow only the second component of b to change, b = 4 b 2 1 2 4 16 + 2b 2 S b = 0 2 4 b 2 = 2b 2 32 0 0.5 1.5. 5b 2 +12 We need b 2, b 2 16, b 2 24 The range is 16 b 2 24. Similarly we can calculate the allowable range to stay feasible for the third component of b is 22 b 3 3 11. Wecanusethesametechniquetofind the allowable range to stay optimal for c. So c 1 60, c 2 35, c 3 20. c = c 1 c 2 c 3 y A c = 0 10 10 6 1 4 2 1.5 c 1 c 2 c 3 2 1.5 0.5 = 60 c 1 35 c 2 20 c 3 5
Every thing is changed: The table now becomes S A = A = 7 1 3 2 1.5, b = 50 25 3 2 0.5 c = 60 32 1 1 2 0 2 4 0 0.5 1.5 7 1 3 2 1.5 3 2 0.5 11 4 0 = 6 4 1 3 2 0 y A c = 0 10 10 7 1 3 2 1.5 3 2 0.5 = 0 2 S b = 1 2 0 2 4 0 0.5 1.5 y b = 0 10 10 50 25 50 25 60 32 1 = 36 1 0. 5 =330 1 0 2 0 10 10 330 x 4 0 11 4 0 1 2 36 x 3 0 6 4 1 0 2 4 1 x 1 0 3 2 0 0 0.5 1.5 0.5 This table is not proper. First we make the column of x 1 right: 1 0 0 0 12 296 x 4 0 0 34 1 0 1 5 207 3 6 2 6 x 3 0 0 0 1 0 1 1 17 2 x 1 0 1 0 0 1 1 3 6 2 1 6 There is still a negative number on the RHS. Multiply the last row with 1: 1 0 0 0 12 296 x 4 0 0 34 1 0 1 5 207 3 6 2 6 x 3 0 0 0 1 0 1 1 17 x 1 0 1 2 1 0 0 1 1 3 6 2 6 6
x 1 can not be a basic variable. The only one can be a basic variable in this row is x 5. Let x 1 be the leaving basic variable and x 5 the entering basic variable. We change the table into the proper form: That gives us the new optimal solution The dual simplex method 1 4 40 0 0 0 36 2 x 4 0 1 32 0 1 0 2 103 3 3 x 3 0 6 4 1 0 0 2 16 x 5 0 6 4 0 0 1 3 1 x 1 =0,x 2 =0,x 3 =16. Initially, the row 0 are all positive but the right hand side maybe negative. (If both of them are positive, the solution is optimal.) 1. Pick one row that has a negative right hand side (say row i). The corresponding basic variable is the leaving basic variable. 2. To find the entering basic variable: for every negative numbers a ij in row i, calculate the ratio The number in the top row and jth column. a ij The one with the smallest ratio (but not 0) is the entering basic variable. 3. The entry at the row of the leaving basic variable and the column of the entering basic variable is the pivot. Multiply the pivot row by 1. Use the pivot to change the table into the proper form. 4. If there is no more negative number at the right hand side, the current solution is optimal; otherwise continue. In step 2, if there is no negative number, then the row represents the equation a i1 x 1 + a i2 x 2 + + a in x n = b i Here all a ij 0 but b i < 0. Sincex j 0 for all j, there is no solution. There is no feasible solution for this LP model. In each step, the dual solution is always feasible but suboptimal (while the solution to the primal problem is not feasible but superoptimal). We make the value of the objective function better for the dual problem after every iteration. This is doing the simplex method on the dual problem but using the table of the primal problem. Example 3 (page 265) Consider this problem: Max z = 4y 1 12y 2 1y 3 7
y 1 +3y 3 3 2y 2 +2y 3 5 y 1,y 2,y 3 0 Change the functional constraint to the form: The simplex table is y 1 3y 3 3 2y 2 y 3 5 z y 1 y 2 y 3 y 4 y 5 1 4 12 1 0 0 0 y 4 0 1 0 3 1 0 3 y 5 0 0 2 2 0 1 5 z y 1 y 2 y 3 y 4 y 5 1 4 0 6 0 6 30 y 4 0 1 0 3 1 0 3 y 2 0 0 1 1 0 0.5 2.5 z y 1 y 2 y 3 y 4 y 5 1 2 0 0 2 6 36 y 3 0 1 0 1 1 0 1 3 3 y 2 0 1 1 1 0 0.5 1.5 3 3 That gives us the optimal solution.