the simplex method updated 15 february 2009. main steps of the simplex method 1.put the problem in...

24
The Simplex Method Updated 15 February 2009

Upload: rodney-parrish

Post on 31-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

The Simplex Method

Updated 15 February 2009

Main Steps of the Simplex Method1. 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.

2

Step 1

LP in Row-0 FormMaximize zs.t. z - 4.5 x1 - 4 x2 = 0

30 x1 + 12 x2 + x3 = 6000  10 x1 + 8 x2 + x4 = 2600

4 x1 + 8 x2 + x5 = 2000 x1, x2, x3, x4, x5 0

Original LPMaximize 4.5 x1 + 4 x2s.t. 30 x1 + 12 x2 6000  10 x1 + 8 x2 2600

4 x1 + 8 x2 2000 x1, x2 0

3

Steps 2 and 3

Initial BFS:BV = {z, x3, x4, x5}, NBV = {x1, x2}z = 0, x3 = 6,000, x4 = 2,600, x5 = 2,000x1 = x2 = 0

4

5

4

3

54321

2000100840

26000108100

600000112300

000045.41

basic

x

x

x

z

bxxxxxz

Steps 4 and 5

x1 and x2 are eligible to enter the basis.

Select x1 to become a basic variable

5

5

4

3

54321

2000100840

26000108100

600000112300

000045.41

basic

x

x

x

z

bxxxxxz

Step 6

• How much can we increase x1?

• Constraint in Row 1:30 x1 + 12 x2 + x3 = 6000

implies

x3 = 6000 - 30 x1 - 12 x2.

• x2 = 0 (it will stay non-basic)

• x3 0 forces x1 200.

6

Step 6

• How much can we increase x1?

• Constraint in Row 2:10 x1 + 8 x2 + x4 = 2600

implies

x4 = 2600 - 10 x1 - 8 x2

• x2 = 0 (it will stay non-basic)

• x4 0 forces x1 260.

7

Step 6

• How much can we increase x1?

• Constraint in Row 3:4 x1 + 8 x2 + x5= 2000

implies

x5 = 2000 - 4 x1 - 8 x2

• x2 = 0 (it will stay non-basic)

• x5 0 forces x1 500.

8

Step 6• From constraint 1, we see that we can increase x1

up to 200, if simultaneously reduce x3 to zero.• From constraint 2, we see that we can increase x1

up to 260, if we simultaneously reduce x4 to zero.• From constraint 3, we see that we can increase x1

up to 500, if we simultaneously reduce x5 to zero.• Since x3 is the limiting variable, we make it non-

basic as x1 becomes basic.

9

Step 6: Ratio Test for x1

Row 1: 30 x1 + 12 x2 + x3 = 6000 =>

30 x1 + x3 = 6000 => x1 6000/30 = 200.

Row 2: 10 x1 + 8 x2 + x4 = 2600 =>

10 x1 + x4 = 2600 => x1 2600/10 = 260.

Row 3: 4 x1 + 8 x2 + x5 = 2000 =>

4 x1 + x5 = 2000 => x1 2000/4 = 500.

10

Step 6: Ratio Test for x1

The minimum ratio occurs in Row 1.Thus, x3 leaves the basis when x1 enters.

11

500420002000100840

26010260026000108100

200306000600000112300

000045.41

ratiobasic

5

4

3

54321

x

x

x

z

bxxxxxz

Step 7: Pivot x1 in and x3 out

Pivot on the x1 column of Row 1 to makex1 basic and x3 non-basic.

12

5

4

3

54321

2000100840

26000108100

600000112300

000045.41

basic

x

x

x

z

bxxxxxz

First ERO: divide Row 1 by 30

Step 7: Pivot x1 in and x3 out

First ERO: divide Row 1 by 30

13

5

4

1

54321

2000100840

26000108100

200000333.04.010

000045.41

basic

x

x

x

z

bxxxxxz

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

Step 7: Pivot x1 in and x3 outSecond ERO: Add –10 times Row 1 to Row 2

14

5

4

1

54321

2000100840

600013333.0400

200000333.04.010

000045.41

basic

x

x

x

z

bxxxxxz

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

Step 7: Pivot x1 in and x3 outThird ERO: Add –4 times Row 1 to Row 3

15

5

4

1

54321

1200101333.04.600

600013333.0400

200000333.04.010

000045.41

basic

x

x

x

z

bxxxxxz

Fourth ERO: Add 4.5 times Row 1 to Row 0

Step 7: Pivot x1 in and x3 outFourth ERO: Add 4.5 times Row 1 to Row 0

16

5

4

1

54321

1200101333.04.600

600013333.0400

200000333.04.010

9000015.02.201

basic

x

x

x

z

bxxxxxz

Steps 4 and 5

BV = {z, x1, x4, x5}, NBV = {x2, x3}z = 900, x1 = 200, x4 = 600, x5 = 1200Increasing x2 may lead to an increase in z.

17

5

4

1

54321

1200101333.04.600

600013333.0400

200000333.04.010

9000015.02.201

basic

x

x

x

z

bxxxxxz

Step 6: Ratio Test for x2

The minimum ratio occurs in Row 2.Thus, x4 leaves the basis when x2 enters.

18

5.1874.612001200101333.04.600

1504600600013333.0400

5004.0200200000333.04.010

9000015.02.201

ratiobasic

5

4

1

54321

x

x

x

z

bxxxxxz

Step 7: Pivot x2 in and x4 Out

BV = {z, x1, x2, x5}, NBV = {x3, x4}z = 1230, x1 = 140, x2 = 150, x5 = 240

19

5

2

1

54321

24016.14.0000

150025.00833.0100

14001.00667.0010

1230055.00333.0001

basic

x

x

x

z

bxxxxxz

Steps 4 and 5

x3 is eligible to enter the basis

20

5

2

1

54321

24016.14.0000

150025.00833.0100

14001.00667.0010

1230055.00333.0001

basic

x

x

x

z

bxxxxxz

Step 6: Ratio Test for x3

21

6004.024024016.14.0000

18000833.0150150025.00833.0100

21000667.014014001.00667.0010

1230055.00333.0001

ratiobasic

5

2

1

54321

x

x

x

z

bxxxxxz

15025.00833.0 432 xxx

432 25.00833.0150 xxx

If x3 enters the basis, then x2 will increase as well.

Step 6: Ratio Test for x3

22

6004.024024016.14.0000

150025.00833.0100

21000667.014014001.00667.0010

1230055.00333.0001

ratiobasic

5

2

1

54321

x

x

x

z

bxxxxxz

If x3 enters the basis, then x5 will leave the basis.

Step 7: Pivot x3 in and x5 out

23

3

2

1

54321

6005.241000

2002083.00833.00100

1001667.01667.00010

12500833.04167.00001

basic

x

x

x

z

bxxxxxz

Steps 4 and 8

BV = {z, x1, x2, x3}, NBV = {x4, x5}z = 1250, x1 = 100, x2 = 200, x3 = 600This an optimal BFS.

24

3

2

1

54321

6005.241000

2002083.00833.00100

1001667.01667.00010

12500833.04167.00001

basic

x

x

x

z

bxxxxxz