+ All Categories
Home > Documents > 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i)...

8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i)...

Date post: 12-Jan-2016
Category:
Upload: noah-bryant
View: 225 times
Download: 0 times
Share this document with a friend
22
8. Linear 8. Linear Programming Programming (Simplex Method) (Simplex Method) Objectives: 1. Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation 3. Geometric interpretation Refs: B&Z 5.4.
Transcript
Page 1: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

8. Linear Programming8. Linear Programming(Simplex Method)(Simplex Method)

Objectives:

1. Simplex Method- Standard Maximum problem2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation3. Geometric interpretation

Refs: B&Z 5.4.

Page 2: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

Recall from last lecture that we saw that the number of basic solutions for small L.P. problems grows rapidly. Most of these solutions will not be feasible.

The Simplex Method computes less than 2m (m= number of consraints) basic solutions and these will all be basic feasible solutions.

So for a problem with 4 decision variables and 5 constraintsthere are 126 basic solutions, but the Simplex Method wouldcompute less than 10.

Page 3: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

The basic principle behind the Simplex Method is as follows:

We treat the objective function as a constraint and P as a decision variable.

We move from one feasible corner point to another, increasing the value of P as we go.

We stop when there are no more such corner points; that is,we have the optimal solution.

We will now return to the previous example and solve it using the Simplex Method.

Page 4: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

max P = 4x1+ 5x2 subj to 2x1+ 3x2 ≤ 600

5x1+ 2x2 ≤ 1,200

x1 ≥ 0 x2 ≥ 0

Example 1 (revisited).

To initiate the Simplex Method we first rewrite the inequalities as equalities by adding slack variables.

So our constraints become:

2x1+ 3x2 + s1 = 600

5x1+ 2x2 + s2 = 1,200

x1 ≥ 0 x2 ≥ 0 s1 ≥ 0 s2 ≥ 0

Page 5: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

We also rewrite the objective function so that all variablesare on the left and the constants are on the right:

P - 4x1 - 5x2 = 0.

**Remember we are treating P as a variable.

Thus our new system is:

2x1 + 3x2 + s1 = 6005x1 + 2x2 + s2 = 1, 200

- 4x1 - 5x2 + P = 0

Now we can start to set up a Simplex Tableau.

Page 6: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

2x1 + 3x2 + s1 = 6005x1 + 2x2 + s2 = 1, 200

- 4x1 - 5x2 + P = 0

x1 x2 s1 s2 P RHS

2 3 1 0 0 600

5 2 0 1 0 1200

−4 −5 0 0 1 0

Remember, if an optimal solution exists, it will be one of thebasic solutions. Since we have 2 constraints and 4 variables,to find the basic solutions, we must set 2 variables at a time to zero.These variables are called non-basic variables, the other variables are called basic variables.

Page 7: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

x1 x2 s1 s2 P RHS

2 3 1 0 0 600

5 2 0 1 0 1200

−4 −5 0 0 1 0

In the tableau we see that the columns corresponding to the B.V.’s have a particular structure - the entries are all zeroes except for a single “1” and each of these 1’sis in a different row.

If we initially set x1 = x2 = 0 (non-basic)

then s1 = 600, s2 = 1200 are basic variables.

Now P = 0 is also a basic variable (it has value zero, we have not set it to zero).

Page 8: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

This structure indicates that these variables are basic - we indicate this by writing the appropriate label in the left columnin the same row as the 1.

The value of that variable is given in the same row, in the RHS column.

So our initial basic feasible solution is:

s1 = 600, s2 = 1200, P = 0 (these are the basic variables)

x1 = x2 = 0 (non-basic variables).

BV x1 x2 s1 s2 P RHS

s1 2 3 1 0 0 600

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0

Page 9: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

Since we are trying to maximize P we want to find a basic feasible solution which increases the value of P. This means we need to set a different pair of variables to zero. But which ones do we choose to ensure that we increase the value of P?

If x1 is increased from 0 and we leave x2 = 0, the rate ofincrease is 4. If x2 is increased from 0 and we leave x1 = 0,the rate of increase is 5.

P = 4x1 + 5x2

increasing either of x1 or x2 will increase P.

Page 10: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

We would like our method to be efficient. So we always choose the variable which will increase P at the largest rate.

This is called the Greedy Rule.

It is a process which selects the new basic variable.How is this reflected in the Simplex tableau?

The Greedy Rule chooses the most negative value in the bottom row of the tableau.

BV x1 x2 s1 s2 P RHS

s1 2 3 1 0 0 600

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0

Initial tableau

So x2 will enter the basis.

Page 11: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

Set x1= 0

Example 2x1 + 3x2 + s1 = 600

5x1 + 2x2 + s2 = 1200

3x2 + s1 = 600

2x2 + s2 = 1200As x2 increases, the values of s1 and s2 will decreaseaccording to s1 = 600- 3x2 s2 = 1200 - 2 x2 .

So to ensure s1 ≥ 0 we need x2 ≤ 200, and to ensure s2 ≥ 0 we need x2 ≤ 600.

We now need to choose a basic variable to become non-basic (since we must have 2 non-basic variables at a time). We choose this variable by determining howmuch we can increase the new basic variable without causing any other basic variable to become negative.

Page 12: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

The first constraint is the most restrictive and so we choose the variable s1 to become non-basic.

So if we increase x2 to 200 we force s1 to 0.

This process is called the Ratio Test.It determines which basic variable leaves the basis.

To satisfy both of these conditions, we must have

x2 ≤ 200.

BV x1 x2 s1 s2 P RHS

s1 2 3 1 0 0 600

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0

Initial tableau

So x2 will enter the basis.

s1 will leave the basis

Page 13: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

When dealing with the Simplex tableau we perform the Ratio Test as follows:

1. Divide each entry in the RHS column by the corresponding entry in the column of the new basic variable(provided the entry is positive, otherwise ignore it).

2. Select the smallest ratio.3. The basic variable associated with this row leaves the basis.

600/3=200

1200/2=600

BV x1 x2 s1 s2 P RHS

s1 2 3 1 0 0 600

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0

Page 14: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

Remember, for our initial tableau, the basic variables are s1 and s2 .

To choose the new basic variable, we apply the Greedy Rule which chooses the most negative value in the bottom row of the tableau.

BV x1 x2 s1 s2 P RHS

s1 2 3 1 0 0 600

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0

So x2 will enter the basis.

We now perform the ratio test to see which variable leavesthe basis.

600/3=200

1200/2=600

s1 will leave the basis

Page 15: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

To update the Simplex tableau, we perform a PivotOperation. We start with the entry in the column of the entering variable and the row of the exiting variable.

BV x1 x2 s1 s2 P RHS

s1 2 3 1 0 0 600

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0

3

Step 1: Divide the entire row by the circled value, so that inthe next tableau there is a “1” in this position.

Page 16: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

Step 2: We use the updated pivot row and operation “C”to obtain zeroes above and below the pivot element.

Note that we are using the updated Row 1.

BV x1 x2 s1 s2 P RHS

s2 5 2 0 1 0 1200

P −4 −5 0 0 1 0R2-2R1 R2

R3+5R1 R3

(partial initial tableau)€

BV x1 x2 s1 s2 P RHS2

3 1 13 0 0 2001 R1÷3 R1

(partial updated tableau)

Page 17: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

What are our new basic variables?

BV x1 x2 s1 s2 P RHS2

3 1 13 0 0 200

113 0 −2

3 1 0 800

−23 0 5

3 0 1 1000

s2

x2

P

x2 = 200, s2 = 800 P=1000

We have now moved from one corner position to another and increased the value of P along the way.

Our new non-basic variables are x1 = s1 = 0

Page 18: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

Our next step is to check the bottom row for negativevalues. We are applying the Greedy Rule again.€

BV x1 x2 s1 s2 P RHS

x22

3 1 13 0 0 200

s211

3 0 −23 1 0 800

P −23 0 5

3 0 1 1000

x1 will enter the basis.

Now we perform the ratio test:

The smallest ratio is in Row 2.

s2 willleave thebasis

200 ÷ 23 = 300Row 1:

800 ÷113 = 2400

11Row 2:

Page 19: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

BV x1 x2 s1 s2 P RHS

1 0 −211

311 0 2400

11

The pivot entry is 11/3. We can now perform the Pivot Operation. Our new Row 2 will be our old Row 2 multipliedby 3/11.

BV x1 x2 s1 s2 P RHS

x22

3 1 13 0 0 200

s211

3 0 23 1 0 800

P 23 0 5

3 0 1 1000

We use thenew Row 2to obtainzeroes aboveand belowthe “1” inthe x1 column

R1-2/3 R2 R1

R3+2/3 R2 R3

Page 20: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

BV x1 x2 s1 s2 P RHS

x2 0 1 511

−211 0 600

11x1 1 0 −2

113

11 0 240011

P 0 0 1711

211 1 12,600

11

We have no further negative entries in the bottom rowso we are finished.

The variables x1 and x2 are basic variables.

x1= 2400

11

x2= 600

11

P is also basic

P= 12,600

11

And s1 and s2 are non- basic variables, so s1= s2=0.

Page 21: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

You should now check your solution.

P(2400/11, 600/11)= 4(2400/11) + 5 (600/11) = 12,600/11

2x1 + 3x2= 2(2400/11)+3(600/11) =600 (≤ 600)

5x1 + 2x2= 5(2400/11)+2(600/11) =1200 (≤ 1200)

And clearly, x1, x2, s1, s2 ≥ 0

So the optimal solution is:(x1, x2, s1, s2 ) = (2400/11, 600/11,0,0) and P*=12,600/11.

Page 22: 8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.

You should now be able to complete

Q’s 1(a), (b), (c) and(d) and Q 3 on

Example Sheet 3from the Orange Book.


Recommended