MATH529 Fundamentals of Optimization Fundamentals of Constrained - - PowerPoint PPT Presentation

math529 fundamentals of optimization fundamentals of
SMART_READER_LITE
LIVE PREVIEW

MATH529 Fundamentals of Optimization Fundamentals of Constrained - - PowerPoint PPT Presentation

MATH529 Fundamentals of Optimization Fundamentals of Constrained Optimization V: Linear Programming and the Simplex Method Marco A. Montes de Oca Mathematical Sciences, University of Delaware, USA 1 / 61 Methods for Constrained


slide-1
SLIDE 1

MATH529 – Fundamentals of Optimization Fundamentals of Constrained Optimization V: Linear Programming and the Simplex Method

Marco A. Montes de Oca

Mathematical Sciences, University of Delaware, USA

1 / 61

slide-2
SLIDE 2

Methods for Constrained Optimization

Optimization Algorithms exploit the structure of the problem: Linear Programs: Simplex Method, Interior-point Method, . . . Nonlinear Programs: Sequential Quadratic Programming, Penalty Methods, . . .

2 / 61

slide-3
SLIDE 3

Linear Programming

Definition A linear program is one with linear objective function and linear constraints, which may include equality and inequality constraints. Example: min − 4x1 + 2x2 − 2x3 + 13x4, subject to x1 + x2 ≥ 3, x1 − x3 + x4 = 3, x1, x2, x3, x4 ≥ 0

3 / 61

slide-4
SLIDE 4

Linear Programming

Appeal: It is often easier (and more appropriate) to model problems as linear programs KKT conditions are valid The feasible set is a polytope (a convex, connected, set with flat, polygonal faces). The solution is found at extreme points, thus reducing the search space to specific regions of the feasible set. A local optimum will also be a global optimum.

4 / 61

slide-5
SLIDE 5

Linear Programming: Toward a solution method

Interior, boundary, extreme points:

Not in the set No line between points belonging to the set

5 / 61

slide-6
SLIDE 6

Linear Programming: Toward a solution method

Supporting hyperplanes: F H A supporting hyperplane H has one or more points in common with a convex set F, but F lies completely one one side of H.

6 / 61

slide-7
SLIDE 7

Linear Programming: Toward a solution method

Theorem 1: Given u, a boundary point of a closed convex set, there is at least one supporting hyperplane at u. Theorem 2: For a closed convex set bounded from below, there is at least one extreme point in every supporting hyperplane. Since in linear programming the objective function is linear, the hyperplane corresponding to the optimal value of the function will be a supporting hyperplane of the feasible set.

7 / 61

slide-8
SLIDE 8

Linear Programming: Toward a solution method

Theorem 1: Given u, a boundary point of a closed convex set, there is at least one supporting hyperplane at u. Theorem 2: For a closed convex set bounded from below, there is at least one extreme point in every supporting hyperplane. Since in linear programming the objective function is linear, the hyperplane corresponding to the optimal value of the function will be a supporting hyperplane of the feasible set. We can therefore pay attention only to extreme points!

8 / 61

slide-9
SLIDE 9

Linear Programming: Toward a solution method

Example: max 40x + 30y subject to: x + 2y ≤ 24 0 ≤ x ≤ 16 0 ≤ y ≤ 8

9 / 61

slide-10
SLIDE 10

Linear Programming: Toward a solution method

y x

10 / 61

slide-11
SLIDE 11

Linear Programming: Toward a solution method

Dummy variables: Slacks and Surpluses: y x

11 / 61

slide-12
SLIDE 12

Linear Programming: Toward a solution method

Dummy variables: Slacks and Surpluses: y x With the inexact satisfaction of a constraint, there is a slack

  • r surplus related to one or more constraints.

12 / 61

slide-13
SLIDE 13

Linear Programming: Toward a solution method

Step 1: Transforming the program: max p = 40x + 30y + 0s1 + 0s2 + 0s3 + 0s4 + 0s5 subject to: x + 2y + s1 = 24 x + s2 = 16 y + s3 = 8 x − s4 = 0 ∗ y − s5 = 0 ∗ x, y, s1, s2, s3, s4, s5 ≥ 0 *For surpluses, we add −si, with si ≥ 0.

13 / 61

slide-14
SLIDE 14

Linear Programming: Toward a solution method

Step 1: Transforming the program: max p = 40x + 30y subject to: x + 2y + s1 = 24 x + s2 = 16 y + s3 = 8 x, y, s1, s2, s3 ≥ 0

14 / 61

slide-15
SLIDE 15

Linear Programming: Toward a solution method

Step 2: Generating extreme points:   1 2 1 1 1 1 1         x y s1 s2 s3       =   24 16 8  

15 / 61

slide-16
SLIDE 16

Linear Programming: Toward a solution method

Step 2: Generating extreme points:   1 2 1 1 1 1 1         x y s1 s2 s3       =   24 16 8   Let x = y = 0, then   1 1 1     s1 s2 s3   =   24 16 8   That is s1 = 24, s2 = 16, and s3 = 8.

16 / 61

slide-17
SLIDE 17

Linear Programming: Toward a solution method

y x

17 / 61

slide-18
SLIDE 18

Linear Programming: Toward a solution method

Step 2: Generating extreme points:   1 2 1 1 1 1 1         x y s1 s2 s3       =   24 16 8   Let x = s1 = 0, then   2 1 1 1     y s2 s3   =   24 16 8   That is y = 12, s2 = 16, and s3 = −4. (Violates nonnegativity restrictions!)

18 / 61

slide-19
SLIDE 19

Linear Programming: Toward a solution method

Step 2: Generating extreme points:   1 2 1 1 1 1 1         x y s1 s2 s3       =   24 16 8   Let x = s2 = 0, then   2 1 1 1     y s1 s3   =   24 16 8   Invalid system!

19 / 61

slide-20
SLIDE 20

Linear Programming: Toward a solution method

Step 2: Generating extreme points:   1 2 1 1 1 1 1         x y s1 s2 s3       =   24 16 8   Let x = s3 = 0, then   2 1 1 1     y s1 s2   =   24 16 8   That is y = 8, s2 = 16, and s3 = 8.

20 / 61

slide-21
SLIDE 21

Linear Programming: Toward a solution method

y x

21 / 61

slide-22
SLIDE 22

Linear Programming: Toward a solution method

Step 2: Generating extreme points:   1 2 1 1 1 1 1         x y s1 s2 s3       =   24 16 8   Let s1 = s3 = 0, then   1 2 1 1 1     x y s2   =   24 16 8   That is x = 8, y = 8, and s2 = 8.

22 / 61

slide-23
SLIDE 23

Linear Programming: Toward a solution method

y x

23 / 61

slide-24
SLIDE 24

Linear Programming: Toward a solution method

We now have a method to systematically generate extreme points. But there are a few remaining questions: How to select which columns to eliminate so that we generate as few extreme points as possible? How can we use the objective function to guide the search? How to avoid generating invalid moves?

24 / 61

slide-25
SLIDE 25

The Simplex Method

25 / 61

slide-26
SLIDE 26

George B. Dantzig

26 / 61

slide-27
SLIDE 27

The idea behind the Simplex Method

27 / 61

slide-28
SLIDE 28

The Simplex Method

Simplex tableau: p x y s1 s2 s3 Constant 1

  • 40
  • 30

1 2 1 24 1 1 16 1 1 8 Basis at (0,0):     s1 s2 s3 1 1 1    

28 / 61

slide-29
SLIDE 29

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. p x y s1 s2 s3 Constant 1

  • 40
  • 30

1 2 1 24 1 1 16 1 1 8

29 / 61

slide-30
SLIDE 30

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. Choose the column associated with the negative entry with the largest abs. value p x y s1 s2 s3 Constant 1

  • 40
  • 30

1 2 1 24 1 1 16 1 1 8

30 / 61

slide-31
SLIDE 31

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. If we choose to replace s1: p x y s1 s2 s3 Constant 1

  • 40
  • 30

40R2 + R1 1 2 1 24 1 1 16 R2 − R3 1 1 8

31 / 61

slide-32
SLIDE 32

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. If we choose to replace s1: p x y s1 s2 s3 Constant 1 50 40 960 1 2 1 24 2 1

  • 1

8 1 1 8 New basis:     x s2 s3 1 −1 1     Thus x = 24, y = 0, s1 = 0, s2 = −8, s3 = 8

32 / 61

slide-33
SLIDE 33

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. If we choose to replace s1: p x y s1 s2 s3 Constant 1 50 40 960 1 2 1 24 2 1

  • 1

8 1 1 8 New basis:     x s2 s3 1 −1 1     Thus x = 24, y = 0, s1 = 0, s2 = −8, s3 = 8 Invalid move!

33 / 61

slide-34
SLIDE 34

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. If we choose to replace s2: p x y s1 s2 s3 Constant 1

  • 40
  • 30

40R3 + R1 1 2 1 24 R2 − R3 1 1 16 1 1 8

34 / 61

slide-35
SLIDE 35

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. If we choose to replace s2: p x y s1 s2 s3 Constant 1

  • 30

40 640 2 1

  • 1

8 1 1 16 1 1 8 New basis:     s1 x s3 1 1 1     Thus x = 16, y = 0, s1 = 8, s2 = 0, s3 = 8

35 / 61

slide-36
SLIDE 36

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. So how do we choose the pivot element? Pick the positive elements in the pivot column, Divide the constant column by these elements, Select the element corresponding to the smallest quotient as pivot element

36 / 61

slide-37
SLIDE 37

The Simplex Method

Pivoting: Choose the pivot column, then the pivot element. p x y s1 s2 s3 Constant 1

  • 40
  • 30

1 2 1 24 24/1 1 1 16 16/1 1 1 8

37 / 61

slide-38
SLIDE 38

The Simplex Method

A second move: p x y s1 s2 s3 Constant 1

  • 30

40 640 2 1

  • 1

8 1 1 16 1 1 8

38 / 61

slide-39
SLIDE 39

The Simplex Method

A second move: p x y s1 s2 s3 Constant 1

  • 30

40 640 2 1

  • 1

8 1 1 16 1 1 8

39 / 61

slide-40
SLIDE 40

The Simplex Method

A second move: p x y s1 s2 s3 Constant 1

  • 30

40 640 30R2/2 + R1 2 1

  • 1

8 R2/2 1 1 16 1 1 8 R4 − R2/2

40 / 61

slide-41
SLIDE 41

The Simplex Method

A second move: p x y s1 s2 s3 Constant 1 15 25 760 1 1/2

  • 1/2

4 1 1 16

  • 1/2

1/2 1 4 New basis:     y x s3 1 1 1     Thus x = 16, y = 4, s1 = 0, s2 = 0, s3 = 8

41 / 61

slide-42
SLIDE 42

The Simplex Method

A second move: p x y s1 s2 s3 Constant 1 15 25 760 1 1/2

  • 1/2

4 1 1 16

  • 1/2

1/2 1 4 New basis:     y x s3 1 1 1     Thus x = 16, y = 4, s1 = 0, s2 = 0, s3 = 8 Since there are no more negative entries in the first row, we have reached the optimal solution

42 / 61

slide-43
SLIDE 43

A minimization problem

min x + 4y subject to: x + 2y ≥ 8 3x + 2y ≥ 12 x ≥ 0 y ≥ 0

43 / 61

slide-44
SLIDE 44

Graphical view y x

C1 C2 (0,6) (2,3) (8,0)

44 / 61

slide-45
SLIDE 45

Step 1: Transformation

min x + 4y subject to: x + 2y − s1 = 8 3x + 2y − s2 = 12 x ≥ 0 y ≥ 0 s1, s2 ≥ 0

45 / 61

slide-46
SLIDE 46

Step 2: Matrix Form

1 2 −1 3 2 −1

   x y s1 s2     = 8 12

  • If x = y = 0, then s1 = −8, and s2 = −12, which violates the

nonnegativity restrictions on s1, s2.

46 / 61

slide-47
SLIDE 47

Step 1: Transformation

Add artificial variables a1, a2 min x + 4y + 1000a1 + 1000a2 subject to: x + 2y − s1 + a1 = 8 3x + 2y − s2 + a2 = 12 x ≥ 0 y ≥ 0 s1, s2 ≥ 0 a1, a2 ≥ 0

47 / 61

slide-48
SLIDE 48

Step 2: Matrix Form

1 2 −1 1 3 2 −1 1

       x y s1 s2 a1 a2         = 8 12

  • If x = y = s1 = s2 = 0, then a1 = 8, and a2 = 12, which gives us

an easy starting point.

48 / 61

slide-49
SLIDE 49

Step 3: Simplex Tableau

Simplex tableau: p x y s1 s2 a1 a2 Constant 1

  • 1
  • 4
  • 1000
  • 1000

1 2

  • 1

1 8 3 2

  • 1

1 12

49 / 61

slide-50
SLIDE 50

Step 3: Simplex Tableau

Simplex tableau: p x y s1 s2 a1 a2 Constant 1

  • 1
  • 4
  • 1000
  • 1000

1000(R2 + R3) + R1 1 2

  • 1

1 8 3 2

  • 1

1 12

50 / 61

slide-51
SLIDE 51

Step 3: Simplex Tableau

Simplex tableau: p x y s1 s2 a1 a2 Constant 1 3999 3996

  • 1000
  • 1000

20000 1 2

  • 1

1 8 3 2

  • 1

1 12

51 / 61

slide-52
SLIDE 52

Step 4: Pivoting

For minimization, choose the column associated with largest positive element in R1. p x y s1 s2 a1 a2 Constant 1 3999 3996

  • 1000
  • 1000

20000 1 2

  • 1

1 8 3 2

  • 1

1 12

52 / 61

slide-53
SLIDE 53

Step 4: Pivoting

For minimization, choose the column associated with largest positive element in R1. p x y s1 s2 a1 a2 Constant 1 3999 3996

  • 1000
  • 1000

20000 1 2

  • 1

1 8 3 2

  • 1

1 12

53 / 61

slide-54
SLIDE 54

Step 5: Basis Update

p x y s1 s2 a1 a2 Constant 1 3999 3996

  • 1000
  • 1000

20000 R1 − 3999R3/3 1 2

  • 1

1 8 R2 − R3/3 3 2

  • 1

1 12 R3/3

54 / 61

slide-55
SLIDE 55

Step 5: Basis Update

p x y s1 s2 a1 a2 Constant 1 1330

  • 1000

333

  • 1333

4004 4/3

  • 1

1/3 1

  • 1/3

4 1 2/3

  • 1/3

1/3 4 New basis:   a1 x 1 1   Thus x = 4, y = 0, s1 = 0, s2 = 0, a1 = 4, a2 = 0

55 / 61

slide-56
SLIDE 56

Step 4: Pivoting

p x y s1 s2 a1 a2 Constant 1 1330

  • 1000

333

  • 1333

4004 4/3

  • 1

1/3 1

  • 1/3

4 1 2/3

  • 1/3

1/3 4

56 / 61

slide-57
SLIDE 57

Step 4: Pivoting

p x y s1 s2 a1 a2 Constant 1 1330

  • 1000

333

  • 1333

4004 4/3

  • 1

1/3 1

  • 1/3

4 1 2/3

  • 1/3

1/3 4

57 / 61

slide-58
SLIDE 58

Step 5: Basis Update

p x y s1 s2 a1 a2 Constant 1 1330

  • 1000

333

  • 1333

4004 R1 − 1330(3R2/4) 4/3

  • 1

1/3 1

  • 1/3

4 3R2/4 1 2/3

  • 1/3

1/3 4 R3 − 2/3(3R2/4)

58 / 61

slide-59
SLIDE 59

Step 5: Basis Update

p x y s1 s2 a1 a2 Constant 1

  • 5/2

1/2

  • 1995/2
  • 2001/2

14 1

  • 3/4

1/4 3/4

  • 1/4

3 1

  • 1/2
  • 1/2
  • 1/2
  • 1/6

2 New basis:   y x 1 1   Thus x = 2, y = 3, s1 = 0, s2 = 0, a1 = 0, a2 = 0

59 / 61

slide-60
SLIDE 60

Graphical view y x

C1 C2 (0,6) (2,3) (8,0)

60 / 61

slide-61
SLIDE 61

Finish the example

61 / 61