390 likes | 906 Views
Sensitivity Analysis. How will a change in a coefficient of the objective function affect the optimal solution? How will a change in the right-hand side value for a constraint affect the optimal solution?. Solving Linear Equations.
E N D
Sensitivity Analysis • How will a change in a coefficient of the objective function affect the optimal solution? • How will a change in the right-hand side value for a constraint affect the optimal solution? Linear Programming
Solving Linear Equations • All operations that apply to linear equations also apply to linear inequalities with the following exceptions: • If you multiply or divide by a negative number it will switch the direction of the inequality. • If you invert an inequality it will also switch the direction of the inequality Linear Programming
Sherwood – Linear Equations Linear Programming
Sherwood – Graph Solution Line 1 5 4 3 Line 2 1 2 Linear Programming
Sherwood – Optimal Solution • Extreme Point 3 is optimal if: • Slope of Line 1 <= Slope of objective function <= Slope of Line 2 Linear Programming
Sherwood – Calculate Slope of Line 1 8x1 + 2x2 <= 160 2x2 = -8x1 + 160 x2 = -4x1 + 80 Slope of Intercept of Line 1 Line 1 on x2 axis Linear Programming
Sherwood – Calculate Slope of Line 2 4x1 + 3 x2 <= 120 3x2 = -4x1 + 120 x2 = -4/3x1 + 40 Slope of Intercept of Line 2 Line 2 on x2 axis Linear Programming
Sherwood – Optimal Solution • Extreme Point 3 is optimal if: • -4 <= Slope of objective function <= -4/3 Linear Programming
Calculating Slope-Intercept • General form of objective function • P = Cx1x1 + Cx2x2 • Slope-intercept for objective function • x2 = -(Cx1/Cx2) x1 + P/Cx2 Slope of Intercept of Obj. Function Obj. Function on x2 axis Linear Programming
Sherwood – Optimal Solution • Extreme Point 3 is optimal if: • -4 <= -(Cx1/Cx2) <= -4/3 Or • 4/3 <= (Cx1/Cx2) <= 4 Linear Programming
Sherwood – Compute the Range of Optimality • Extreme Point 3 is optimal if: • 4/3 <= (Cx1/Cx2) <= 4 • Compute range for Cx1, hold Cx2constant • 4/3 <= (Cx1/10) <= 4 Linear Programming
Sherwood – Compute the Range of Optimality • From the left-hand inequality, we have • 4/3 <= (Cx1/10) • Thus, • 40/3 <= Cx1 Linear Programming
Sherwood – Compute the Range of Optimality • From the right-hand inequality, we have • (Cx1/10) <= 4 • Thus, • Cx1 <= 40 Linear Programming
Sherwood – Compute the Range of Optimality • Summarizing these limits • 40/3 <= Cx1 <= 40 Linear Programming
Sherwood – Compute the Range of Optimality • Extreme Point 3 is optimal if: • 4/3 <= (Cx1/Cx2) <= 4 • Compute range for Cx2, hold Cx1constant • 4/3 <= (20/Cx2) <= 4 Linear Programming
Sherwood – Compute the Range of Optimality • From the inequality, we have • 4/3 <= (20/Cx2) <= 4 • Thus, • 4/60 <= (1/Cx2) <= 4/20 • 5 <= Cx2 <= 15 Linear Programming
Sherwood – Compute the Range of Optimality • Summarizing these limits • 40/3 <= Cx1 <= 40 • 5 <= Cx2 <= 15 Linear Programming
Sensitivity Analysis • How will a change in a coefficient of the objective function affect the optimal solution? • How will a change in the right-hand side value for a constraint affect the optimal solution? Linear Programming
Sherwood – Graph Solution Line 1 5 4 3 Line 2 1 2 Linear Programming
Sherwood – Change in the Right-hand Side • Constraint 1 – add 1 to right-hand side • 4x1 + 3x2 <= 121 • 8x1 + 2x2 <= 160 • Solve for x2 • 2(4x1 + 3x2 = 121) • -1(8x1 + 2x2 = 160) • 4x2 = 82 • x2 = 20.5 • Solve for x1 • 8x1 + 2(20.5)= 160 • x1 =14.875 Linear Programming
Sherwood – Change in the Right-hand Side • Solve objective function • z = 20(14.875) + 10(20.5) • z = 502.5 • Shadow Price • 502.5 – 500 = 2.5 • Thus profit increases at $2.50 per hour of labor added to assembly • Conversely, if we decrease labor for assembly by 1 hour the objective function will decrease by $2.50 Linear Programming
Sherwood – Range of Feasibility • Constraint 1 RHS = 120 • Allowable Increase = 24 • Allowable Decrease = 40 • Range of Feasibility • 80 <= Constraint 1 RHS <= 144 Linear Programming
Sherwood – Change in the Right-hand Side • Constraint 2 – add 1 to right-hand side • 4x1 + 3x2 <= 120 • 8x1 + 2x2 <= 161 • Solve for x2 • 2(4x1 + 3x2 = 120) • -1(8x1 + 2x2 = 161) • 4x2 = 79 • x2 = 19.75 • Solve for x1 • 4x1 + 3(19.75)= 120 • x1 =15.1875 Linear Programming
Sherwood – Change in the Right-hand Side • Solve objective function • z = 20(15.1875) + 10(19.75) • z = 501.25 • Shadow Price • 501.25 – 500 = 1.25 • Thus profit increases at $1.25 per hour of labor added to finishing • Conversely, if we decrease labor for finishing by 1 hour the objective function will decrease by $1.25 Linear Programming
Sherwood – Range of Feasibility • Constraint 2 RHS = 160 • Allowable Increase = 80 • Allowable Decrease = 48 • Range of Feasibility • 112 <= Constraint 2 RHS <= 240 Linear Programming
Sherwood – Range of Feasibility • Constraint 3 RHS • Slack = 12 • Shadow Price = 0 • Range of Feasibility • 20 <= Constraint 3 RHS <= Infinite Linear Programming
Non-Binding Constraints • There is more resource then needed (i.e. there is slack). • When you have a non-binding constraint the shadow price is zero • Also, the allowable increase will be 1E+30 (infinite) represents that no upper limit exists for the range of feasibility • The lower limit allowable decrease equals the amount of slack Linear Programming
Reduced Costs • For each decision variable, the absolute value of the reduced costs indicates how much the objective coefficient would have to improve before that variable could assume a positive value in the optimal solution. • If the decision variable is already positive in the optimal solution, its reduced costs variable is zero. Linear Programming
Sherwood - Slack Variables Max 20x1 + 10x2 + 0S1 + 0S2 + 0S3 s.t. 4x1 + 3x2 + 1S1 = 120 8x1 + 2x2 + 1S2 = 160 x2 + 1S3 = 32 x1, x2, S1 ,S2 ,S3 >= 0 Linear Programming
Sherwood – Slack Variables • For each ≤ constraint the difference between the RHS and LHS (RHS-LHS). It is the amount of resource left over. • Constraint 1; S1 = 0 hrs. • Constraint 2; S2 = 0 hrs. • Constraint 3; S3 = 12 Custom Linear Programming
Binding vs. Non-Binding Constraints • Constraints that have zero slack are considered binding constraints • Constraints that have slack or unused capacity available are non-binding. They have a shadow price of zero. This shows that additional units of this resource will not increase the value of the objective function Linear Programming
Summary • In summary, the right-hand-side ranges provide limits within which the shadow prices are applicable. For changes outsides the range, the problem must be resolved to find the new optimal solution and the new shadow price. The ranges of feasibility for the Sherwood problem are: • 80 <= Constraint 1 <= 144 • 112 <= Constraint 2 <= 240 • 20 <= Constraint 3 <= Infinite Linear Programming