Document

advertisement

The Simplex Method

Updated 15 February 2009

Main Steps of the Simplex Method

1. Put the problem in Row-Zero Form.

2. Construct the Simplex tableau .

3. Obtain an initial basic feasible solution (BFS).

4. If the current BFS is optimal then go to step 9.

5. Choose a non-basic variable to enter the basis.

6. Use the ratio test to determine which basic variable must leave the basis.

7. Perform the pivot operation on the appropriate element of the tableau.

8. Go to Step 4.

9. Stop.

1

Original LP

Maximize 4.5 s.t. 30 x

1 x

1

+ 12 x

+ 4 x 2

2

6000

10

4 x x x

1

1

1

+ 8

+ 8

, x x

2 x

2

2

2600

2000

0

Step 1

LP in Row-0 Form

Maximize z s.t. z - 4.5 x

1

30 x

1

+ 12

- 4 x

2 x

2

+

= 0 x

3

= 6000

10

4 x x

1

1

+ 8

+ 8 x x

1

, x

2

, x

3 x

2

2

, x

+ x

4

+ x

5

4

, x

5

= 2600

= 2000

0

2

Steps 2 and 3 z

1 x

1

4 .

5 x

2

4 x

3

0 x

4

0 x

5

0

0 30 12 1 0 b

0

0 6000 basic

0

0

10

4

8

8

0

0

1

0

0

1

2600

2000 x

3 x

4 x

5 z

Initial BFS:

BV = { z , x

3

, x

4

, x

5

}, NBV = { x

1

, x

2

} z x

1

= 0,

= x

2 x

3

= 6,000,

= 0 x

4

= 2,600, x

5

= 2,000

3

Steps 4 and 5 z

1 x

1

4 .

5 x

2

4 x

3

0 x

4

0 x

5

0

0 30 12 1 0 b

0

0 6000 basic

0

0

10

4

8

8

0

0

1

0

0

1

2600

2000 x

3 x

4 x

5 z x

1 and x

2 are eligible to enter the basis.

Select x

1 to become a basic variable

4

Step 6

• How much can we increase x

1

?

• Constraint in Row 1:

30 x

1

+ 12 x

2

+ x

3

= 6000 implies x

3

• x

2

• x

3

= 6000 - 30 x

1

0 forces x

1

- 12 x

2

.

= 0 (it will stay non-basic)

200.

5

Step 6

• How much can we increase x

1

?

• Constraint in Row 2:

10 x

1

+ 8 x

2

+ x

4

= 2600 implies x

4

• x

2

• x

4

= 2600 - 10 x

1

0 forces x

1

- 8 x

2

= 0 (it will stay non-basic)

260.

6

Step 6

How much can we increase x

1

?

Constraint in Row 3:

4 x

1

+ 8 x

2

+ x

5

= 2000 implies x

5

• x

2

• x

5

= 2000 - 4 x

1

= 0 (it will stay non-basic)

0 forces

- 8 x

2 x

1

500.

7

Step 6

• From constraint 1, we see that we can increase x

1 up to 200, if simultaneously reduce x

3 to zero.

• From constraint 2, we see that we can increase x

1 up to 260, if we simultaneously reduce x

4 to zero.

• From constraint 3, we see that we can increase x

1 up to 500, if we simultaneously reduce x

5 to zero.

• Since x

3 is the limiting variable, we make it nonbasic as x

1 becomes basic.

8

Step 6: Ratio Test for x

1

Row 1:

30 x

1

30 x

1

+ 12

+ x

3 x

2

+ x

3

= 6000 =>

= 6000 => x

1

6000/30 = 200.

Row 2:

10 x

1

10 x

1

+ 8 x

+ x

4

2

+ x

4

= 2600 =>

= 2600 => x

1

2600/10 = 260.

Row 3:

4 x

1

4 x

1

+ 8 x

+ x

5

2

+ x

5

= 2000 =>

= 2000 => x

1

2000/4 = 500.

9

Step 6: Ratio Test for x

1 z

1 x

1

4 .

5 x

2

4 x

3

0 x

4

0 x

5

0

0 30 12 1 0 b

0

0 6000 basic

0

0

10

4

8

8

0

0

1

0

0

1

2600

2000 ratio z x

3 x

4 x

5

6000

30

200

2600

10

260

2000

4

500

The minimum ratio occurs in Row 1.

Thus, x

3 leaves the basis when x

1 enters.

10

Step 7: Pivot x

1 in and x

3 out z

1 x

1

4 .

5 x

2

4 x

3

0 x

4

0 x

5

0

0 30 12 1 0 b

0

0 6000 basic

0

0

10

4

8

8

0

0

1

0

0

1

2600

2000 x

3 x

4 x

5 z

Pivot on the x

1 x

1 basic and x

3 column of Row 1 to make non-basic.

First ERO: divide Row 1 by 30

11

Step 7: Pivot x

1 in and x

3 out

First ERO: divide Row 1 by 30 z

1 x

1

4 .

5 x

2

4

0 1 0 .

4 0 .

0333 x

3

0 x

4

0 x

5

0

0 0

0

0

10

4

8

8

0

0

1

0

0

1

0

200 b basic z

2600

2000 x

1 x

4 x

5

Second ERO: Add –10 times Row 1 to Row 2

12

Step 7: Pivot x

1 in and x

3 out

Second ERO: Add –10 times Row 1 to Row 2 z

1 x

1

4 .

5 x

2

4

0

0

1

0

0 .

4

4

0 .

0333

0 .

3333 x

3

0 x

4

0 x

5

0

0

1

0

0

0 4 8 0 0 1 b basic

0

200

600

2000 z x

1 x

4 x

5

Third ERO: Add –4 times Row 1 to Row 3

13

Step 7: Pivot x

1 in and x

3 out

Third ERO: Add –4 times Row 1 to Row 3 z

1 x

1

4 .

5 x

2

4

0

0

0

1

0

0

0

6

.

4

4

.

4

0 .

0333

0 .

3333

0 .

1333 x

3

0 x

4

0 x

5

0

0

1

0

0

0

1 b

0

200

600

1200 basic x

1 x

4 x

5 z

Fourth ERO: Add 4.5 times Row 1 to Row 0

14

Step 7: Pivot x

1 in and x

3 out

Fourth ERO: Add 4.5 times Row 1 to Row 0 z

1 x

1

0 x

2

2 .

2

0

0

0

1

0

0

0 x

3

.

15

0 .

4

4

6 .

4

0 .

0333

0 .

3333

0 .

1333 x

4

0

0

1

0 x

5

0

0

0

1 b

900

200

600

1200 basic z x

1 x

4 x

5

15

Steps 4 and 5 z

1 x

1

0 x

2

2 .

2

0

0

0

1

0

0

0 x

3

.

15

0 .

4

4

6 .

4

0 .

0333

0 .

3333

0 .

1333 x

4

0

0

1

0 x

5

0

0

0

1 b

900

200

600

1200 basic z x

1 x

4 x

5

BV = { z , x

1

, x

4

, x

5

}, NBV = {x

2

, x

3

} z = 900, x

1

Increasing

= 200, x

4 x

2

= 600, x

5

= 1200 may lead to an increase in z .

16

Step 6: Ratio Test for x

2 z

1

0

0

0 x

0

1

1

0

0

2

0

6

.

.

x

2

2

4

4

.

4

0 x

3

.

15

0 .

0333

0 .

3333

0 .

1333 x

4

0

0

1

0 x

5

0

0

0

1 b

900

200

600

1200 basic ratio z x x x

1

4

5

200

0 .

4

500

600

4

150

1200

6 .

4

187 .

5

The minimum ratio occurs in Row 2.

Thus, x

4 leaves the basis when x

2 enters.

17

Step 7: Pivot x

2 in and x

4

Out z

1

0

0

0 x

0

1

0

0

1 x

2

0

0

1

0 x

3

0 .

0333

0 .

0667

0 .

0833

0 .

4

0 .

55

0 .

1

0 .

x

4

25

1 .

6 x

5

0

0

0

1 b

1230

140

150

240 basic z x

1 x

2 x

5

BV = { z , x

1

, x

2

, x

5

}, NBV = { x

3

, x

4

} z = 1230, x

1

= 140, x

2

= 150, x

5

= 240

18

Steps 4 and 5 z

1

0

0

0 x

0

1

0

0

1 x

2

0

0

1

0 x

3

0 .

0333

0 .

0667

0 .

0833

0 .

4

0 .

55

0 .

1

0 .

x

4

25

1 .

6 x

5

0

0

0

1 b

1230

140

150

240 basic z x

1 x

2 x

5 x

3 is eligible to enter the basis

19

Step 6: Ratio Test for x

3 z

1

0

0

0 x

0

1

1

0

0 x

2

0 x

3

0 .

0333 0 .

x

4

55 x

5

0 b

1230 basic z ratio

0

1

0 x x

2

2

0

0 .

.

0667

0833

0 .

4

0

.

0

1

.

1

25

.

6

0

0

1

140

150

240 x x x

1

2

5

0 .

0833 x

3

150

0 .

25

0 .

0833 x

3 x

4

150

0 .

25 x

4

140

0 .

0667

2100

150

0 .

0833

 

1800

240

0 .

4

600

If x

3 enters the basis, then x

2 will increase as well.

20

Step 6: Ratio Test for x

3 z

1

0

0

0 x

0

1

1

0

0 x

2

0

0

1

0 x

3

0 .

0333

0 .

0667

0 .

0833

0 .

4

0 .

55

0 .

1

0 .

x

4

25

1 .

6 x

5

0

0

0

1 b

1230

140

150

240 basic ratio z x

1

140

0 .

0667

2100 x

2 x

5

240

0 .

4

600

If x

3 enters the basis, then x

5 will leave the basis.

21

Step 7: Pivot x

3 in and x

5 out z

1 x

1

0

0

0

0

1

0

0 x

2

0

0

1

0 x

3 x

4 x

5 b

0 0 .

4167

0

0

1

0 .

1667

0 .

0833

4

0 .

0833 1250

0 .

1667 100

0 .

2083

2 .

5

200

600 basic x z

3 x

1 x

2

22

Steps 4 and 8 z

1 x

1

0

0

0

0

1

0

0 x

2

0

0

1

0 x

3 x

4 x

5 b

0 0 .

4167

0

0

1

0 .

1667

0 .

0833

4

0 .

0833 1250

0 .

1667 100

0 .

2083

2 .

5

200

600 basic x z

3 x

1 x

2

BV = { z , x

1

, x

2

, x

3

}, NBV = { x

4

, x

5

} z = 1250, x

1

= 100, x

This an optimal BFS.

2

= 200, x

3

= 600

23

Download