Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 12 Chapter 7 Duality and Sensitivity in Linear Programming 7.1 Objective values usually can be interpreted as either minimize cost or maximize.

Similar presentations


Presentation on theme: "1 Lecture 12 Chapter 7 Duality and Sensitivity in Linear Programming 7.1 Objective values usually can be interpreted as either minimize cost or maximize."— Presentation transcript:

1 1 Lecture 12 Chapter 7 Duality and Sensitivity in Linear Programming 7.1 Objective values usually can be interpreted as either minimize cost or maximize benefit. 7.3 Page 301 < constraints usually restrict the supply of some commodity 7.4 Page 301 > constraints usually require satisfaction of a demand of something

2 2 Activities 7.4 Page 302 Decision variables usually imply the selection of the level of some activity. Max 13x 1 +24x 2 +5x 3 +50x 4 (1) s.t.x 1 +3x 2 > 89(2) -3x 3 -5x 4 < -60(3) 10x 1 +6x 2 +8x 3 +2x 4 < 608(4) x 1, x 2, x 3, x 4 > 0(5) Since (3) has RHS type constraint.

3 3 Activities Max 13x 1 +24x 2 +5x 3 +50x 4 (1) s.t.x 1 +3x 2 > 89(2) 3x 3 +5x 4 > 60(6) 10x 1 +6x 2 +8x 3 +2x 4 < 608(4) x 1, x 2, x 3, x 4 > 0(5) 1.There are 4 activities. 2.How much do we undertake? (x 1, x 2, x 3, x 4 ) 3.There are demands for 2 commodities – const (2) & (6) 4.There is a restriction on the supply of some raw material – const (4)

4 4 Relaxation What would we do to relax constraint (2) a little? x 1 +3x 2 > 89(2) Goes to x 1 +3x 2 > 80 What would we do to relax constraint (4) a little? 10x 1 +6x 2 +8x 3 +2x 4 < 608(4) Goes to 10x 1 +6x 2 +8x 3 +2x 4 < 610

5 5 Relaxed Constraints If we relax a constraint, then the optimal objective value either remains the same or improves!!!!!!!!!!! If we are minimizing, then optimal cost either remains the same or is reduced. Why?

6 6 Tightening And Relaxing Tightening constraints reduces the feasible region. Relaxing constraints increases the feasible region. Relaxing Tightening

7 7 Relaxed & Tightened Max ______ OriginalRelaxedTightened Obj ValueObj Value Obj Value = A= B > A= C < A

8 8 Big Model On Page 305 Min ____ With x 1 < 75 Solve for various RHS using x 1 < RHS 75 slope = - infinity slope = - 4.98 slope = - 3.38 slope = 0 Opt Obj value

9 9 Big Model On Page 305 Min _____ With 0.12x 1 + 0.011x 2 + 1.0x 6 > 10 (RHS) Solve for various RHS slope=0 slope=8.75 slope=36.73 slope=50.11 slope=infinity

10 10 Summary Const TypeRHS Increase RHS Decrease Supply (<)RelaxTighten Demand (>)TightenRelax 7.12 Page 308 Adding constraints tightens. Dropping constraints relaxes

11 11 Adding & Dropping Columns 7.17 page 315 Adding columns to a min problem results in an optimal value < the value before the addition Dropping columns of a min problem results in an optimal objective > the value before the drop.

12 12 The Dual Problem – Page 325 PrimalDual Max cxMin bv s.t.Ax c x > 0v > 0 I call this form of the primal and dual the standard form.

13 13 Example 1 PrimalDual Max 5x 1 + 6x 2 Min 3v 1 + 7v 2 s.t.x 1 + 2x 2 5(x 1 ) -3x 1 + 4x 2 6 (x 2 ) x 1, x 2 > 0 v 1, v 2 > 0 In the primal there is a dual variable for each constraint. In the dual, there is a primal variable for each constraint.

14 14 Example 2 Suppose that you are given the primal in the following form and asked to give the dual: Min 3w 1 + 7w 2 s. t. w 1 – 3w 2 > 5 2w 1 + 4w 2 > 6 w 1, w 2 > 0 The 1 st step is to place this problem in standard form.

15 15 Primal In Standard Form Max –3w 1 –7w 2 s.t. -w 1 + 3w 2 < -5 (x 1 ) -2w 1 – 4w 2 < -6 (x 2 ) w 1, w 2 > 0 Dual is Min –5x 1 – 6x 2 Max 5x 1 + 6x 2 s.t.-x 1 – 2x 2 > -3 ors.t. x 1 + 2x 2 < 3 3x 1 – 4x 2 > -7-3x 1 + 4x 2 < 7 x 1, x 2 > 0x 1, x 2 > 0 This is standard form with dual var x 1 & x 2

16 16 Dual Of Dual Is Primal Note from the previous slide that the dual of the dual problem is the primal. How do you find the dual of any problem? Use Table 7.1 on page 327.

17 17 Example 3 Exercise 7-12 Part A P 366 Min 17x 1 + 29x 2 + 0x 3 + 1x 4 s.t.2x 1 + 3x 2 + 2x 3 + 3x 4 < 40 4x 1 + 4x 2 + 0x 3 + 1x 4 > 10 0x 1 + 0x 2 – 3x 3 – x 4 = 0 x 1, …, x 4 > 0 Max 40v 1 + 10v 2 s.t. 2v 1 + 4v 2 < 17 3v 1 + 4v 2 < 29 2v 1 - 3v 3 < 0 3v 1 + v 2 - v 3 < 1 v 1 0, v 3 unrestricted

18 18 The Primal var x1 >= 0; var x2 >= 0; var x3 >= 0; var x4 >= 0; minimize OBJ: 17*x1+29*x2+x4; subject to C1: 2*x1+3*x2+2*x3+3*x4 <= 40; subject to C2: 4*x1 + 4*x2 + x4 >= 10; subject to C3: -3*x3 - x4 = 0; solve;

19 19 The Dual var v1 = 0; var v3; maximize OBJ: 40*v1 + 10*v2; subject to C1: 2*v1 + 4*v2 <= 17; subject to C2: 3*v1 + 4*v2 <= 29; subject to C3: 2*v1 - 3*v3 <= 0; subject to C4: 3*v1 + v2 - v3 <= 1; solve;

20 20 The Solutions AMPL Version 20020516 Win32 ampl: model a:p.txt; CPLEX 8.0.0: optimal solution; objective 42.5 1 dual simplex iterations (0 in phase I) ampl: reset; ampl: model a:d.txt; CPLEX 8.0.0: optimal solution; objective 42.5 1 dual simplex iterations (1 in phase I) ampl:

21 21 What do the dual variables mean? 7.20 Page 316 The dual variables (1 per constraint) give the change in the objective value per unit change in the RHS. PrimalDual Variable 0.3x 1 + 0.4x 2 < 2v 1 = 10 Implies that the estimated change in the objective value per unit increase in the 2 is 10. That is one unit (2 to 3) is expected to improve the objective function by 10.

22 22 This Is An Estimate Only 2 3 slope = 10 2 3 Can not be achieved due to slope change

23 23 Optimal Objective Values Match Primal{max cx: Ax 0} Dual{min bv: vA > c, v > 0} Let x * solve the primal and v * solve the dual. Then cx * = bv *.

24 24 Example 4 Max x 1 + 2x 2 s. t. 2x 1 + x 2 < 5 x 1 + 3x 2 > 5 x 1, x 2 > 0 Opt = (0,5) obj value = 10

25 25 Example 4 Dual Max x 1 + 2x 2 min 5v 1 – 5v 2 s. t. 2x 1 + x 2 1 -x 1 - 3x 2 2 x 1, x 2 > 0v 1, v 2 > 0 Opt = (2,0) Obj = 10

26 26 Complementary Slackness 7.26 Primal ConstraintDual Variable ax < b(v) Or ax + s = b(v) Complementary Slackness Says (s)(v) = 0 ----------------------------------------------------- If s > 0, then v = 0. If v > 0, then s = 0. Either the constraint is active or v = 0.

27 27 7.27 On Page 323 Dual ConstraintPrimal Variable va > c(x) Or va – s = c(x) Complementary Slackness Says (s)(x) = 0

28 28 Table 7.1 – Primal max cx PrimalDual ax > bv < 0 ax 0 ax = bv unrestricted x j > 0va j > c j x j < 0va j < c j x j unrestrictedva j = c j

29 29 The Dual & The Primal 7.30 Page 328 The dual of the dual is the primal. 7.31 Primal min{cx:_______} Dual max{vb: ______} Let X be feasible for the Primal Let V be feasible for the Dual Then cX > Vb

30 30 The Dual & The Primal 7.32 If either the Primal or Dual has an optimal solution, then both do and the objective functions are the same at optimality! optimal cx * = v * b Primal min{cx:___} Dual max{vb:___}

31 31 The Dual & The Primal 7.33 Let x * = B -1 b be an optimum for the Primal. Then v * = c B B -1 is an optimum for the Dual. Solving either the Primal or the Dual produces an optimum for the other problem!


Download ppt "1 Lecture 12 Chapter 7 Duality and Sensitivity in Linear Programming 7.1 Objective values usually can be interpreted as either minimize cost or maximize."

Similar presentations


Ads by Google