Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENGM 631 Optimization Ch. 4: Solving Linear Programs: The Simplex Method.

Similar presentations


Presentation on theme: "ENGM 631 Optimization Ch. 4: Solving Linear Programs: The Simplex Method."— Presentation transcript:

1 ENGM 631 Optimization Ch. 4: Solving Linear Programs: The Simplex Method

2 4.1 Alt Model; K-Corp Max Z = 3X1 + 5X2 s.t. X1 < 8 X2 < 6
where Z = profit (in $1,000,000’s)

3 4.1 Alt Some Terminology Constraint Boundaries X2 < 6 X1 < 8
8 6 4 2 Constraint Boundaries X2 < 6 X1 < 8 Feasible Region 3X1 + 4 X2 < 8 X2 > 0 X1 > 0

4 4.1 Alt Some Terminology Corner Point Feasible Sol. (CPF) Infeasible
8 6 4 2 (0,9) Corner Point Feasible Sol. (CPF) Infeasible (0,6) (8,6) (4,6) (8,3) (12,0) (8,0) (0,0)

5 4.1 Alt CPF Property For any LP problem with n decision
variables, two CPF solutions are adjacent if they share n-1 constraint boundaries (edge). 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0)

6 4.1 Relation: CPF & Optimal
The best CPF solution must be an optimal solution. 8 6 4 2 (0,6) (4,6) Optimality Test If a CPF has no adjacent CPF solutions that are better, then it must be an optimal solution. (8,3) (8,0) (0,0)

7 4.1 Alt Relation: CPF & Optimal
Optimality Test If a CPF has no adjacent CPF solutions that are better, then it must be an optimal solution. 8 6 4 2 (0,6) (4,6) Z = 30 Z = 42 (8,3) Z = 39 Z = 0 Z = 24 (8,0) (0,0)

8 4.1 Alt Relation: CPF & Optimal
Optimality Test Z4,6 is only CPF with Z > all adjacent points 8 6 4 2 (0,6) (4,6) Z = 30 < Z = 42 > (8,3) < Z = 39 < Z = 0 < Z = 24 (8,0) (0,0)

9 4.1 Alt Algorithm Initialization Start with (0,0) Optimality test
Adjacent solutions better 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30

10 4.1 Alt Algorithm Initialization Start with (0,0) Optimality test
Adjacent solutions better Iteration 1. Move to adjacent (0,6) move along edge X1 = 0 stop at constraint x2 = 6 solve for intersection (0,6) Test for optimality 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30 Z = 42

11 4.1 Alt Algorithm Iteration 1. Move to adjacent (0,6)
move along edge X1 = 0 stop at constraint x2 = 6 solve for intersection (0,6) Test for optimality Iteration 2. Move to adjacent (4,6) move along edge X2 = 6 stop at constraint 3X1+ 4X2 = 36 solve for intersection (4,6) 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30 Z = 42

12 4.1 Alt Algorithm Iteration 1. Move to adjacent (0,6)
move along edge X1 = 0 stop at constraint x2 = 6 solve for intersection (0,6) Test for optimality Iteration 2. Move to adjacent (4,6) move along edge X2 = 6 stop at constraint 3X1+ 4X2 = 36 solve for intersection (4,6) 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30 Z = 42 Z = 39

13 4.1 Alt Algorithm Iteration 2. Move to adjacent (4,6)
move along edge X2 = 6 stop at constraint 3X1+ 4X2 = 36 solve for intersection (4,6) Test for optimality Optimal Solution (4,6), Z = 42 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30 Z = 42 Z = 39

14 4.1 Solution Concepts 1. Simplex focuses solely on CPF solutions
2. Simplex is iterative algorithm Initialization Optimality Test Iteration Optimal Stop yes no

15 4.1 Solution Concepts 3. Whenever possible, initialization chooses the origin to be the initial CPF eliminates the need for algebraic solution 4. Given CPF solution, it is quicker to compute adjacent CPF solutions than about other CPF solutions. always chooses an adjacent CPF 5. Simplex examines each edge emanating from current CPF solution. identifies rate of improvement in Z by moving along each edge

16 4.1 Solution Concepts 6. A positive rate of improvement in Z along an edge indicates an adjacent CPF is better. A negative rate implies an adjacent CPF is worse. Optimality test checks whether any edge gives a positive rate of improvement. If none do, the solution is optimal.

17 4.2 Standard Form for LP Max Z c X s t a b = + £ × ³ . , n m mn 1 2 11
12 21 22 . ,

18 4.2 Model; K-Corp Max Z = 3X1 + 5X2 s.t. X1 < 8 X2 < 6

19 4.2 Alt Slack Variables Consider X1 < 8
Slack variable X3 is how much below 8, X1 is X3 = 8 - X1 X X3 = 8

20 4.2 Alt Augmented Form Max Z = 3X1 + 5X2 s.t. X1 + X3 = 8 X2 + X4 = 6
Xj > 0, j = 1, 2, 3, 4, 5

21 4.2 Alt Terminology Augmented Solution is a solution for the original variables augmented by corresponding values of the slack variables. Basic Solution is an augmented corner-point solution Basic Feasible Solution is an augmented CPF solution

22 4.2 Alt Properties Basic Solution
each variable identified as basic or nonbasic number of basic variables = number of functional constraints (rows) number of nonbasic = number variables - number of constraints nonbasic variables = 0 basic variables ↔ simultaneous solution of system of functional constraints in augmented form

23 4.3 Alt Algebra of Simplex Max Z = 3X1 + 5X2 s.t. X1 + X3 = 8
3X1 + 4X2 + X5 = 36 Xj > 0, j = 1, 2, 3, 4, 5

24 4.3 Alt Algebra of Simplex Z - 3X1 - 5X2 = 0 X1 + X3 = 8 X2 + X4 = 6
8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0

25 4.3 Alt Algebra of Simplex Z - 3X1 - 5X2 = 0 X1 + X3 = 8 X2 + X4 = 6
Initialization X = (0,0,8,6,36) 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X3, X4, X5 are basic

26 4.3 Alt Algebra of Simplex Which direction? Z = 3X1 + 5X2
Along X for each unit of X1 Along X for each unit of X2 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0

27 4.3 Alt Algebra of Simplex How Far? X1 + X3 = 8 X2 + X4 = 6
X3 = 8 - X1 > no limit on X2 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X = (0,0,8,6,36)

28 4.3 Alt Algebra of Simplex How Far? X3 = 8 - X1 > 0 no limit on X2
X4 = 6 - X2 > 0 X2 < 6 X5 = X2 > 0 X2 < 9 Min X2 = 6 Minimum ratio test 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X = (0,0,8,6,36)

29 4.3 Alt Algebra of Simplex New Basic Feasible If X2 = 6, X4 = 0
Z - 3X1 - 5X2 = 0 X X3 = 8 X X4 = 6 3X1 + 4X2 + X5 = 36 Need to find new values for X1, X3 & X5 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X = (0,6,?,0,?)

30 4.3 Alt Algebra of Simplex New Basic Feasible Find new value for X1
Z - 3X1 - 5X2 = 0 X X4 = 6 5X X4 = 30 Z - 3X X4 = 30 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X = (0,6,?,0,?) +

31 4.3 Alt Algebra of Simplex New Basic Feasible X2 + X4 = 6
3X1 + 4X2 + X5 = 36 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X = (0,6,?,0,?)

32 4.3 Alt Algebra of Simplex New Basic Feasible 3X1 - 4X4 + X5 = 12
8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 X = (0,6,?,0,?)

33 4.3 Alt Algebra of Simplex New Basic (Augmented) Z - 3X1 + 5X4 = 30
3X X4 + X5 = 12 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30 X = (0,6,8,0,12) Z = 30

34 4.4 Alt Simplex Method (Tableau)
Recall, Standard Form Z - 3X1 - 5X2 = 0 X1 + X3 = 8 X2 + X4 = 6 3X1 + 4X X5 = 36

35 4.4 Alt Simplex Method (Tableau)
Tableau Form Basic Coefficient of: Variable Eq. Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8 3 X 2 1 1 6 4 X 3 3 4 1 36 5

36 4.4 Alt Simplex Method Determine Pivot Column (largest neg. in eq. 0)
Basic Coefficient of: Variable Eq. Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8 3 X 2 1 1 6 4 X 5 3 3 4 1 36

37 4.4 Alt Simplex Method Select Pivot Row (min ratio test) Basic
Coefficient of: Variable Eq. Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8/0 = big 3 X 2 1 1 6/1 = 6 4 X 5 3 3 4 1 36/4 = 9

38 4.4 Alt Simplex Method Select Pivot Row (min ratio test) Basic
Coefficient of: Variable Eq. Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8/0 = big 3 X 2 1 1 6/1 = 6 4 X 3 3 4 1 36/4 = 9 5

39 4.4 Alt Simplex Method Pivot Row Operation (divide/mult. by pivot element) Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36

40 4.4 Alt Simplex Method Elementary Row Operation (mult. eq. 2 by 5, add to eq. 0) Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30

41 4.4 Alt Simplex Method Elementary Row Operation (mult. eq. 2 by 4, sub from eq. 3) Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 -4 12

42 4.4 Alt Simplex Method Elementary Row Operation (mult. eq. 2 by 0, sub from eq. 1) Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 -4 12

43 4.4 Alt Compare to Algebraic Sol.
Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 -4 12 New Basic (Augmented) Z - 3X X4 = 30 X X3 = 8 X X4 = 6 3X X4 + X5 = 12

44 4.4 Alt Compare to Graphical
Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 -4 12 8 6 4 2 (0,6) (4,6) (8,3) (8,0) (0,0) Z = 0 Z = 30

45 4.4 Alt Simplex Method Iteration 2 Basic Coefficient of: Variable Eq.
Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 -4 12

46 4.4 Alt Simplex Method Iteration 2 Basic Coefficient of: Variable Eq.
Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 8/1 = 8 6/0 = big -4 12/3 = 4

47 4.4 Alt Simplex Method Iteration 2 Basic Coefficient of: Variable Eq.
Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8 3 X 2 1 1 6 4 X 3 3 4 1 36 5 Z 1 -3 5 30 X 1 1 1 8/1 = 8 3 X 2 1 1 6/0 = big 2 X 3 3 -4 1 12/3 = 4 5 Z 1 X 1 3 X 2 2 X 3 1 -4/3 1/3 4 1

48 4.4 Alt Simplex Method Iteration 2 Basic Coefficient of: Variable Eq.
Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8 3 X 2 1 1 6 4 X 3 3 4 1 36 5 Z 1 -3 5 30 X 1 1 1 8/1 = 8 3 X 2 1 1 6/0 = big 2 X 3 3 -4 1 12/3 = 4 5 Z 1 1 1 42 X 1 3 X 2 2 X 3 1 -4/3 1/3 4 1

49 4.4 Alt Simplex Method Iteration 2 Basic Coefficient of: Variable Eq.
Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 8/1 = 8 6/0 = big -4 12/3 = 4 42 4/3 -1/3 -4/3 1/3

50 4.4 Alt Simplex Method Iteration 2 Basic Coefficient of: Variable Eq.
Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 8/1 = 8 6/0 = big -4 12/3 = 4 42 4/3 -1/3 -4/3 1/3

51 Iteration 2 Z = 30 Z = 42 Z = 0 8 6 4 2 2 4 6 8 10 12 Basic
8 6 4 2 Z = 0 Z = 30 Z = 42 Iteration 2 Basic Coefficient of: Variable Eq. Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -5 X 1 1 1 8 3 X 2 1 1 6 4 X 3 3 4 1 36 5 Z 1 -3 5 30 X 1 1 1 8/1 = 8 3 X 2 1 1 6/0 = big 2 X 3 3 -4 1 12/3 = 4 5 Z 1 1 1 42 X 1 1 4/3 -1/3 4 3 X 2 1 1 6 2 X 3 1 -4/3 1/3 4 1

52 4.4 Alt Simplex Method Test for Optimality (all coefficients in (0) > 0) Basic Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 8/1 = 8 6/0 = big -4 12/3 = 4 42 4/3 -1/3 -4/3 1/3

53 4.5 Alt Tie for Entering Suppose Max Z = 3X1 + 3X2 s.t. X1 < 8

54 4.5 Alt Tie for Entering Ties are broken arbitrarily Basic
Coefficient of: Variable Eq. Z X X X X X RHS 1 2 3 4 5 Z 1 -3 -3 X 1 1 1 8 3 X 2 1 1 6 4 X 3 3 4 1 36 5 Ties are broken arbitrarily

55 4.5 Alt Tie for Leaving (degeneracy)
Variable Eq. Z X X X X X 1 2 3 4 5 RHS Z 1 -3 -5 X 1 1 1 8 3 X 2 1 1 6/1 = 6 4 X 3 3 4 1 24/4 = 6 5 Z 1 -3 5 30

56 4.5 Alt Multiple Optima Suppose Max Z = 3X1 + 4X2 s.t. X1 < 8

57 4.5 Alt Multiple-Optima Basic Coefficient of: Variable Eq. Z X X X X X
1 2 3 4 5 RHS Z 1 -3 -4 X 1 1 1 8 3 X 2 1 1 6 4 X 3 3 4 1 36 5

58 4.5 Alt Multiple-Optima Basic Coefficient of: Variable Eq. Z X RHS -3
1 2 3 4 5 RHS -3 -4 8 6 36 24 12

59 4.5 Alt Multiple-Optima Basic Coefficient of: Variable Eq. Z X RHS -3
1 2 3 4 5 RHS -3 -4 8 6 36 24 12

60 4.5 Alt Multiple-Optima Basic Coefficient of: Variable Eq. Z X RHS -3
1 2 3 4 5 RHS -3 -4 8 6 36 24 12 4/3 -1/3 -4/3 1/3

61 4.5 Alt Multiple-Optima Optimal: X1 = 4, X2 = 6, X3=2 Basic
Coefficient of: Variable Eq. Z X 1 2 3 4 5 RHS -3 -4 8 6 36 24 12 4/3 -1/3 -4/3 1/3 Optimal: X1 = 4, X2 = 6, X3=2

62 4.5 Alt Optimal Solution Suppose, Z = 3X1 + 4X2 (4,6) (8,3)
8 6 4 2 (4,6) (8,3) 3X1 + 4X2 < 36

63 4.5 Alt Multiple-Optima Basic Coefficient of: Variable Eq. Z X RHS -3
1 2 3 4 5 RHS -3 -4 8 6 36 24 12 4/3 -1/3 -4/3 1/3

64 4.5 Alt Multiple-Optima Basic Coefficient of: Variable Eq. Z X X X X X
RHS 1 2 3 4 5 Z 1 -3 -4 X 1 1 1 8 3 X 2 1 1 6 4 X 5 3 3 4 1 36 Z 1 -3 4 24 X 1 1 1 8 3 X 2 1 1 6 2 X 3 3 -4 1 12 5 Z 1 1 36 X 1 1 4/3 -1/3 4 3 X 2 1 1 6 2 X 1 3 1 -4/3 1/3 4 Z 1 1 36 X 1 3/4 1 -1/4 3 4 X 2 1 -3/4 1/4 3 2 X 3 1 1 8 1

65 4.5 Alt Optimal Solution Suppose, Z = 3X1 + 4X2 (4,6) Multiple Optima
8 6 4 2 (4,6) Multiple Optima (8,3) 3X1 + 4X2 < 36

66 4.7Alt Shadow Prices Recall, for K-Corp Max Z = 3X1 + 5X2 X1 < 8
s.t. X1 < 8 X2 < 6 3X1 + 4X2 < 36 X1, X2 > 0

67 4.7Alt Shadow Prices Recall, for K-Corp Max Z = 3X1 + 5X2 X1 < 8
s.t. X1 < 8 X2 < 6 3X1 + 4X2 < X1, X2 > 0 Question: What would happen if we could increase assembly capacity by 1,000 hours?

68 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 X2 < 6 X1 < 8
8 6 4 2 Max Z = 3X1 + 5X2 X2 < 6 X1 < 8 3X1 + 4X2 < 37

69 4.7Alt Shadow Prices Max Z = 3X1 + 5X2
8 6 4 2 3X1 + 4X2 < 37 X2 < 6 X1 < 8 The optimal solution changes, but the optimal basis may not. Suppose, the basis remains optimal, what is the new solution?

70 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 = 3(4.33) + 5(6) = 43
8 6 4 2 3X1 + 4X2 < 37 Max Z = 3X1 + 5X2 = 3(4.33) + 5(6) = 43 (4.33, 6) 3X1 + 4 X2 = 37 X2 = 6 X1 = 4.33

71 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 = 43 Each unit increase in
constraint 3 yields an increase in Z by 1 unit. (Shadow Price) 8 6 4 2 3X1 + 4X2 < 37 (4.33, 6)

72 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 Consider an increase in b2
8 6 4 2 3X1 + 4X2 < 36 X2 < 6 X1 < 8

73 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 = 3(8/3) + 5(7) = 43
8 6 4 2 (8/3, 7) 3X1 + 4X2 = 36 X2 = 7 X1 = 8/3

74 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 = 43 Shadow price for b2
8 6 4 2 (8/3, 7) Max Z = 3X1 + 5X2 = 43 Shadow price for b2 equals 1 3X1 + 4X2 = 36 X2 = 7 X1 = 8/3

75 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 Consider an increase in b1
8 6 4 2 X2 < 6 X1 < 9 3X1 + 4X2 < 36

76 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 Consider an increase in b1
8 6 4 2 X2 < 6 X1 < 9 3X1 + 4X2 < 36

77 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 An increase in b1 does
not change optimal basis. 8 6 4 2 X1 < 9

78 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 An increase in b1 does
not change optimal basis. Profit, Z, does not increase. 8 6 4 2 X1 < 9

79 4.7Alt Shadow Prices Max Z = 3X1 + 5X2 An increase in b1 does
not change optimal basis. Shadow Price for b1 = 0 8 6 4 2 X1 < 9

80 4.7Alt Shadow Prices Summary Max Z = 3X1 + 5X2 X1 < 8 y1* = 0
s.t. X1 < y1* = 0 X2 < 6 y2* = 1 3X1 + 4X2 < 36 y3* = 1 X1, X2 > 0

81 4.7Alt Shadow Prices Basic Coefficient of: Variable Eq. Z X RHS -3 -5
1 2 3 4 5 RHS -3 -5 8 6 36 30 8/1 = 8 6/0 = big -4 12/3 = 4 42 4/3 -1/3 -4/3 1/3

82 4.7Alt Shadow Prices y1* = 0 y2* = 1 y3* = 1 Basic Coefficient of:
Variable Eq. Z X 1 2 3 4 5 RHS -3 -5 8 6 36 30 8/1 = 8 6/0 = big -4 12/3 = 4 42 4/3 -1/3 -4/3 1/3 y1* = 0 y2* = 1 y3* = 1

83 4.7Alt Changes in cj Parameters
8 6 4 2 Z = 3X1 + 5X2 = 42 (4,6)

84 4.7Alt Changes in cj Parameters
8 6 4 2 Z = 3X1 + 5X2 Suppose c1 drops to 0. (4,6)

85 4.7Alt Changes in cj Parameters
8 6 4 2 Z = 3X1 + 5X2 Now, suppose c1 goes to 3 3/4. (4,6)

86 4.7Alt Changes in cj Parameters
8 6 4 2 (4,6) Z = 3X1 + 5X2 If, 0 < c1 < 33/4, Optimal remains at (4,6)

87 4.7Alt Changes in cj Parameters
8 6 4 2 Z = 3X1 + 5X2 Suppose c2 drops to 4. (4,6)

88 4.7Alt Changes in cj Parameters
8 6 4 2 Z = 3X1 + 5X2 Now, suppose c2 goes to . (4,6)

89 4.7Alt Changes in cj Parameters
8 6 4 2 (4,6) Z = 3X1 + 5X2 If, 4 < c2 < , Optimal remains at (4,6)

90 4.7Alt Allowable Changes to RHS
Recall, for K-Corp Max Z = 3X1 + 5X2 s.t. X1 < 8 X2 < 6 3X1 + 4X2 < 36 X1, X2 > 0 Question: How far can b1, b2, b3, deviate from current values before optimal basis changes?

91 4.7Alt Sensitivity Summary
Max Z = 3X1 + 5X2 s.t. X1 < < b1 < 12 y1*=0 X2 < < b2 < 9 y2*=1 3X1 + 4X2 < < b3 < 48 y3*=1 X1, X2 > 0 0 < c1 < 3 3/4, 4 < c2 < 


Download ppt "ENGM 631 Optimization Ch. 4: Solving Linear Programs: The Simplex Method."

Similar presentations


Ads by Google