Simplex Method Meeting 5

21

description

Simplex Method Meeting 5. Course: D0744 - Deterministic Optimization Year: 2009. What to learn?. Artificial variables Big-M method. The Facts. To start, we need a canonical form - PowerPoint PPT Presentation

Transcript of Simplex Method Meeting 5

Page 1: Simplex Method Meeting 5
Page 2: Simplex Method Meeting 5

Simplex MethodMeeting 5

Course : D0744 - Deterministic OptimizationYear : 2009

Page 3: Simplex Method Meeting 5

Bina Nusantara University 3

What to learn?

• Artificial variables• Big-M method

Page 4: Simplex Method Meeting 5

Bina Nusantara University 4

The Facts

1. To start, we need a canonical form2. If we have a constraint with a

nonnegative right-hand side, it will contain an obvious basic variable (which?) after introducing a slack var.

3. If we have an equality constraint, it contains no obvious basic variable

4. If we have a constraint with a nonnegative right-hand side, it contains no obvious basic variable even after introducing a surplus var.

Page 5: Simplex Method Meeting 5

Bina Nusantara University 5

Compare!2x + 3y 5 2x + 3y + s = 5, s 0 (s basic)

2x + 3y = 5 ??????? Infeasible if x=y=0!

2x + 3y 5 2x + 3y - s = 5, s 0 (??????) Infeasible if

x=y=0!

??????????????????

Page 6: Simplex Method Meeting 5

Bina Nusantara University 6

One Equality???

2x + 3y = 5 2x + 3y + a = 5, a = 0 (I) (s basic, but it should be 0!)

How do we force a = 0? This is of course not feasible if x=y=0, as 0+0+0 5!

Page 7: Simplex Method Meeting 5

Bina Nusantara University 7

One Equality???

2x + 3y = 5 2x + 3y + a = 5, a = 0 (I) (a basic, but it should be 0!)

How do we force a = 0? This is of course not feasible if x=y=0, as 0+0+0 5

Idea: solve a first problem with Min {a | constraint (I) + a 0 + other constraints }!

Page 8: Simplex Method Meeting 5

Bina Nusantara University 8

Artificial Variables

Notice: In an equality constraint, the extra variable is called an artificial variable.

For instance, in 2x + 3y + a = 5, a = 0 (I)

a is an artificial variable.

Page 9: Simplex Method Meeting 5

Bina Nusantara University 9

One Inequality ???

2x + 3y 5 2x + 3y - s = 5, s 0 (I) s could be the basic variable, but it should be 0 and for x=y=0, it is -5 ! How do we force s 0?

?

Page 10: Simplex Method Meeting 5

Bina Nusantara University 10

2x + 3y 5 2x + 3y - s = 5, s 0 (I) s could be the basic variable, but it should be 0 and it is -5 for x=y=0! How do we force s 0? By making it 0!

how?

Page 11: Simplex Method Meeting 5

Bina Nusantara University 11

2x + 3y 5 2x + 3y - s = 5, s 0 (I) s could be basic, but it should be 0 and it is -5 for x=y=0! How do we force s 0? By making it 0! But we have to start with a canonical form… so treat is as an equality constraint!

2x + 3y - s + a = 5, s 0, a 0 and Min a

Page 12: Simplex Method Meeting 5

Bina Nusantara University 12

Page 13: Simplex Method Meeting 5

Bina Nusantara University 13

Artificial Variables

Notice: In a inequality constraint, the extra variable is called an artificial variable.

For instance, in 2x + 3y – s + a = 5, s 0, a

0 (I)a is an artificial variable.

In a sense, we allow temporarily a small amount of cheating, but in the end we cannot allow it!

Page 14: Simplex Method Meeting 5

Bina Nusantara University 14

What if we have many such = and constraints?

7x - 3y – s1 + a1 = 6, s1,a1 0 (I) 2x + 3y + a2 = 5, a2 0 (II)a1 and a2 are artificial variables, s1 is a surplus variable.One minimizes their sum:Min {a1+a2 | a1, a2 0, (I), (II), other constraints}i.e., one minimizes the total amount of cheating!

Page 15: Simplex Method Meeting 5

Bina Nusantara University 15

Then What?

We have two objectives:Get a “feasible” canonical formMaximize our original problem

Two methods:big M methodphase 1, then phase 2

Page 16: Simplex Method Meeting 5

Bina Nusantara University 16

Page 17: Simplex Method Meeting 5

Bina Nusantara University 17

Big-M Method

Combine both objectives :(1) Min i ai

(2) Max j cj xj

into a single one:(3) Max – M i ai + j cj xj

where M is a large number, larger than anything subtracted from it.If one minimizes j cj xj

then the combined objective function is Min M i ai + j cj xj

Page 18: Simplex Method Meeting 5

Bina Nusantara University 18

The Big M Method

The simplex method algorithm requires a starting bfs. Previous problems have found starting bfs by using the slack variables as our basic variables. If an LP have ≥ or = constraints, however, a starting bfs may not be readily apparent. In such a case, the Big M method may be used to solve the problem. Consider the following problem.

Page 19: Simplex Method Meeting 5

Bina Nusantara University 19

Example

Bevco manufactures an orange-flavored soft drink called Oranj by combining orange soda and orange juice. Each orange soda contains 0.5 oz of sugar and 1 mg of vitamin C. Each ounce of orange juice contains 0.25 oz of sugar and 3 mg of vitamin C. It costs Bevco 2¢ to produce an ounce of orange soda and 3¢ to produce an ounce of orange juice. Bevco’s marketing department has decided that each 10-oz bottle of Oranj must contain at least 30 mg of vitamin C and at most 4 oz of sugar. Use linear programming to determine how Bevco can meet the marketing department’s requirements at minimum cost.

Page 20: Simplex Method Meeting 5

Bina Nusantara University 20

Page 21: Simplex Method Meeting 5

Bina Nusantara University 21