1 / 91

Sensitivity analysis

Sensitivity analysis. LI Xiao-lei. A graphical introduction to sensitivity analysis. Sensitivity analysis is concerned with how changes in an LP’s parameters affect the LP’s optimal solution. A graphical introduction to sensitivity analysis. The Giapetto problem max z=3x 1 +2x 2

Download Presentation

Sensitivity analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sensitivity analysis LI Xiao-lei

  2. A graphical introduction to sensitivity analysis • Sensitivity analysis is concerned with how changes in an LP’s parameters affect the LP’s optimal solution.

  3. A graphical introduction to sensitivity analysis • The Giapetto problem max z=3x1+2x2 s.t. 2x1 + x2≤100 (finishing constraint) x1 + x2≤80 (carpentry constraint) x1 ≤40 (demand constraint) x1 , x2 ≥0 Where x1=number of soldiers produced per week x2=number of trains produced per week

  4. A graphical introduction to sensitivity analysis The optimal solution is z=180, x1=20, x2=60

  5. Graphical analysis of the effect of a change in an objective function coefficient • Let c1 be the contribution to profit by each soldier. For what values of c1 does the current basis remain optimal? • At present, c1=3 and the profit line has the form 3x1+2x2=constant, or x2=-3x1/2 + constant/2.

  6. Figure 1 A B D C E

  7. Graphical analysis of the effect of a change in an objective function coefficient • If a change in c1 cause the profit lines to be flatter than the carpentry constraint, the optimal solution will change from point B to a new optimal solution (point A). The slope of each profit line is –c1/2 The profit line will be flatter than the carpentry constraint if –c1/2>-1, or c1<2, and the new optimal solution will be (0,80), point A.

  8. Graphical analysis of the effect of a change in an objective function coefficient • If the profit line s are steeper than the finishing constraint, the optimal solution will change from point B to point C. The slope of the finishing constraint is -2. If –c1/2<-2, or c1>4, and the new optimal solution will be (40,20).

  9. Graphical analysis of the effect of a change in an objective function coefficient • In summary, if all other parameters remain unchanged, the current basis remains optimal for 2≤c1≤4. and Giapetto should still manufacture 20 soldiers and 60 trains. • But Giapetto’s profit will change. For instance, if c1=4, Giapetto’s profit will now be 4(20)+2(60)=$200 instead of $180.

  10. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • Whether a change in the right-hand side of a constraint will make the current basis no longer optimal? • Let b1 the number of available finishing hours. Currently, b1=100.

  11. Figure 2 A B D C

  12. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • A change in b1 shifts the finishing constraint parallel to its current position. • The current optimal solution is where the carpentry and finishing constraints are binding. Then as long as the point where the finishing and carpentry constraints are binding remains feasible, the optimal solution will still occur where these constraints intersect.

  13. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • From figure 2, for 80≤b1≤120, the current basis remains optimal. • With the changing of b1, the values of the decision variables and the objective function value change. • For example, if 80≤b1≤100, the optimal solution will change from point B to some point on the line segment AB. Similarly, if 100≤b1≤120, the optimal solution will change from point B to some point on the line segment BD.

  14. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • To determine how a change in the right-hand side of a constraint changes the values of the decision variables. Let b1=number of available finishing hours. If we change b1 to 100+Δ, the current basis remains optimal for -20≤Δ≤20. Note: as b1 changes, the optimal solution to the LP is still the point where the finishing-hour and carpentry-hour constraints are binding.

  15. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • Thus, we can find the new values of the decision variables by solving 2x1+x2=100+Δ and x1+x2=80 This yields x1=20+Δ and x2=60-Δ Thus, a increase in the number of available finishing hours results in an increase in the number of soldiers produced and a decrease in the number of trains produced.

  16. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • Let b2=the number of available carpentry hours If we change b2 to 80+Δ, the current basis remains optimal for -20≤Δ≤20. Note: as b2 changes, the optimal solution to the LP is still the point where the finishing-hour and carpentry-hour constraints are binding.

  17. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution Thus, if b2=80+ Δ, the optimal solution to the LP is the solution to 2x1+x2=100 and x1+x2=80+ Δ This yields x1=20-Δ and x2=60+2Δ. It shows that an increase in the amount of available carpentry hours decrease the number of soldiers produced and increases the number of trains produced.

  18. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution • Let b3=the demand for soldiers. If b3 is changed to 40+Δ, the current basis remains optimal for Δ≥-20. for Δ in this range, the optimal solution to the LP will still occur where the finishing and carpentry constrains are binding. Thus, the optimal solution to the LP is the solution to 2x1+x2=100 and x1+x2=80 This yields x1=20 and x2=60

  19. Graphical analysis of the effect of a change in a right-hand side on the LP’s optimal solution Note: In a constraint with positive slack( or positive excess) in an LP’s optimal solution, if we change the right-hand side of the constraint to a value in the range where the current basis remains optimal, the optimal solution to the LP is unchanged.

  20. Shadow prices • We define the shadow price for the ith constraint of an LP to be the amount by which the optimal z-value is improved if the right-hand side of the ith constraint is increased by 1. • This definition applies only if the change in the right-hand side of constraint i leaves the current basis optimal.

  21. Shadow prices • For example, for the Δchanging in the finishing hours, the optimal solution is x1=20+Δ and x2=60-Δ. Then the optimal z-value will equal 3x1+2x2=3(20 +Δ) +2(60-Δ) =180+ Δ. Thus, as long as the current basis remains optimal, a unit increase in the number of available finishing hours will increase the optimal z-value by $1.so the shadow price of the first constraint is $1.

  22. Shadow prices • For the second constraint, if Δchanging in the finishing hours, the optimal solution is x1=20-Δ and x2=60+2Δ. Then the optimal z-value will equal 3x1+2x2=3(20 -Δ) +2(60+2Δ) =180+ Δ. Thus, as long as the current basis remains optimal, a unit increase in the number of available finishing hours will increase the optimal z-value by $1.so the shadow price of the second constraint is $1.

  23. Shadow prices • For the third constraint, the optimal values of the decision variables remain unchanged, as long as the current basis remains optimal. Then the optimal z-value will also remain unchanged, which shows that the shadow price of the third constraint is $0. • It turns out that whenever the slack variable or excess variable for a constraint is positive in an LP’s optimal solution, the constraint will have a zero shadow price.

  24. Shadow prices • Each unit by which constraint i’s right-hand side is increased will increase the optimal z-value( for a max problem) by the shadow price. • Suppose we increase the rhs of the ith constraint of an LP by Δbi , thus, the new optimal z-value is given by (new optimal z-value)=(old optimal z-value) +(constraint i’s shadow price)Δbi For a minimization problem, (new optimal z-value)=(old optimal z-value) -(constraint i’s shadow price)Δbi

  25. Importance of sensitivity analysis • If a parameter changes, sensitivity analysis often makes it unnecessary to solve the problem again. • A knowledge of sensitivity analysis often enables the analyst to determine from the original solution how changes in an LP’s parameters change the optimal solution.

  26. Some important formulas • Assume a max LP problem with m constraints and n variables. Although some of these variables may be slack, excess, or artificial ones, we choose to label them x1,x2,…,xn. max z=c1x1+c2x2+…+cnxn s.t. a11x1+a12x2+…+a1nxn=b1 a21x1+a22x2+…+a2nxn=b2 (1) : : : : am1x1+am2x2+…+amnxn=bm xi≥0 (i=1,2,…,n)

  27. Some important formulas • For the Dakota problem, max z=60x1+30x2+20x3+0s1+0s2+0s3 s.t. 8x1+ 6x2+ x3+ s1 =48(lumber) 4x1+ 2x2+1.5x3+ s2 =20 (finishing) (1’) 2x1+1.5x2+0.5x3+ s3=8 (carpentry) x1,x2,x3,s1,s2,s3≥0

  28. Some important formulas • Let BVibe the basic variable for row i of the optimal tableau. Also define BV={BV1, BV2 , … , BVm} to be the set of basic variables in the optimal tableau, and define the m ×1 vector xBv=[xBv1,xBv2 , …,xBvm]T • We also define NBV=the set of nonbasic variables in the optimal tableau xNBv=(n-m) ×1 vector listing the nonbasic variables.

  29. Some important formulas • The optimal tableau for the LP 1’ z + 5x2 +10s2+10s3=280 - 2x2 + s1 +2 s2 - 8s3=24 - 2x2+ x3+ 2s2 - 4s3 =8 x1+1.25x2 -0.5s2+1.5s3=2 For this optimal tableau, BV1=s1, BV2=x3, and BV3=x1, then xBV=[s1,x3,x1]’ We may choose NBV={x2,s2,s3}, then xNBV=[x2,s2,s3]’

  30. Some important formulas • DEFINATION cBV is the 1×m row vector [cBV1 cBV2 … cBVm]. Thus, the elements of cBV are the objective function coefficients for the optimal tableau’s basic variables. For the Dakota problem, BV={s1,x3,x1}, then form (1’) we find that cBV=[0 20 60].

  31. Some important formulas • DEFINATION cNBV is the 1×(n-m) row vector whose elements are the coefficients of the nonbasic variables( in the order of NBV). If we choose to list the nonbasic variables for the Dakota problem in the order NBV={x2,s2,s3}, then form (1’) we find that cNBV=[30 0 0].

  32. Some important formulas • DEFINATION The m×m matrix B is the matrix whose jth column is the column for BVj in (1). For the Dakota problem, the first column of B is the s1 column in (1’); the second, the x3 column; and the third, the x1 column. Thus,

  33. Some important formulas • DEFINATION aj is the column (in the constraints) for the variable xj in (1). For example, in the Dakota problem,

  34. Some important formulas • DEFINATION N is the m×(n-m) matrix whose columns are the columns for the nonbasic variables (in the NBV order) in (1). For the Dakota problem, we write NBV={x2,s2,s3}, then

  35. Some important formulas • DEFINATION The m×1 column vector b is the right-hand side of the constraints in (1). For the Dakota problem,

  36. Matrix notation • (1) may be written as (3)

  37. Matrix notation • The Dakota problem can be written as

  38. Matrix notation • Multiplying the constraints in (3) through by B-1, we obtain or (4) In (4),BVi occurs with a coefficient of 1 in the ith constraint and a zero coefficient in each other constraint. Thus, BV is the set of the basic variables for (4), and (4) yields the constraints for the optimal tableau.

  39. Matrix notation • For the Dakota problem, Then, Of course, these are the constraints for the optimal tableau.

  40. Matrix notation • From (4), we see that the column of a nonbasic variable xjin the constraints of the optimal tableau is given by B-1(column for xj in (1) )=B-1aj The following two equations summarize the preceding discussion: Column for xj in optimal tableau’s constraints=B-1aj (5) Right-hand side of optimal tableau’s constraints=B-1b (6)

  41. Matrix notation • How to express row 0 of the optimal tableau in terms of BV? We multiply the constraints through by the vector cBVB-1: (7) And rewrite the original objective function as, (8) Adding (7) to (8), we can eliminate the optimal tableau’s basic variables, (9)

  42. Matrix notation • From (9), the coefficient of xj in row 0 is cBVB-1(column of N for xj)- (coefficient for xj in cNBV)=cBVB-1aj-cj the right hand side of row 0 is cBVB-1b • To summarize, we let be the coefficient of xjin the optimal tableau’s row 0. then we have shown that (10) and right-hand side of optimal tableau’s row 0=cBVB-1b (11)

  43. Matrix notation • To illustrate, we determine row 0 of the Dakota problem’s optimal tableau. Then cBVB-1=[0 10 10], from (10) we find that the coefficients of the nonbasic variables in row 0 are

  44. Matrix notation and Of course, the optimal tableau’s basic variables (x1,x3,and s1) will have zero coefficients in row 0.

  45. Matrix notation • From (11), the right-hand side of row 0 is • Putting it all together, we see that row 0 is z+5x2+10s2+10s3=280

  46. Matrix notation • Simplifying formula (10) for slack, excess, and artificial variables If xj is the slack variable si, the coefficient of si in the objective function is 0, and the column for si in the original tableau has 1 in row I and 0 in all other rows. Then (10) yields Coefficient of si in optimal row 0 = ith element of cBVB-1-0 =ith element of cBVB-1 (10’)

  47. Matrix notation • Similarly, if xj is the excess variable ei, the coefficient of eiin the objective function is 0 and the column for ei in the original tableau has -1 in row i and 0 in all other rows. Then (10) reduces to Coefficient of ei in optimal row 0 =-( ith element of cBVB-1)-0 =-(ith element of cBVB-1) (10’’)

  48. Matrix notation • Finally, if xj is an artificial variable ai, the objective function coefficient of ai( for a max problem) is –M and the original column for ai has 1 in row i and 0 in all other rows. Then (10) reduces to Coefficient of ai in optimal row 0 =( ith element of cBVB-1)-(-M) =(ith element of cBVB-1)+(M) (10’’’)

  49. Summary of formulas for computing the optimal tableau from the initial LP Column for xj in optimal tableau’s constraints=B-1aj (5) Right-hand side of optimal tableau’s constraints=B-1b (6) Coefficient of si in optimal row 0=ith element of cBVB-1 (10’) Coefficient of ei in optimal row 0=-(ith element of cBVB-1) (10’’) Coefficient of ai in optimal row 0=-(ith element of cBVB-1)+(M) (10’’’) right-hand side of optimal tableau’s row 0=cBVB-1b (11) We must first find B-1 because it is necessary in order to compute all parts of the optimal tableau.

  50. Example 1 Solution • After adding slack variables s1 and s2, we obtain: max z=x1+4x2 s.t. x1+2x2+s1 =6 2x1+ x2 +s2=8

More Related