the simplex procedure

110
The Simplex Procedure Daniel B. Taylor AAEC 5024 Department of Agricultural and Applied Economics Virginia Tech

Upload: krysta

Post on 21-Jan-2016

21 views

Category:

Documents


0 download

DESCRIPTION

The Simplex Procedure. Daniel B. Taylor AAEC 5024 Department of Agricultural and Applied Economics Virginia Tech. The Basic Model. Completing the Initialization Step. Add slack (Si) variables so that the constraints may be specified as equality constraints - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Simplex Procedure

The Simplex Procedure

Daniel B. Taylor

AAEC 5024

Department of Agricultural and Applied Economics

Virginia Tech

Page 2: The Simplex Procedure

The Basic Model

Max Z= 3X1 +5x2

st X1 <=4

2X2 <=12

3x1 +2x2 <=18

Page 3: The Simplex Procedure

Completing the Initialization Step

• Add slack (Si) variables so that the constraints may be specified as equality constraints

• Reformulate the objective function by moving all the terms to the left hand side of the equality sign – in part to make the interpretation of the solution more straight forward

Page 4: The Simplex Procedure

The Model to Enter in the Simplex Tableau

Max Z -3X1 -5x2 -0S1 -0S2 -0S3 =0

st X1 +S1 =4

2X2 +S2 =12

3X1 +2X2 +S3 =18

Page 5: The Simplex Procedure

The Simplex Tableau

• Construct the Simplex Tableau

Page 6: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

Coefficient of

Page 7: The Simplex Procedure

Begin to Fill out the Tableau

• The purpose of the first two columns is to give reference numbers to refer to when discussing the tableau

Page 8: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

Coefficient of

Page 9: The Simplex Procedure

Begin to Fill out the Tableau

• The purpose of the first two columns is to give reference numbers to refer to when discussing the tableau– The iteration column records the number of the

iteration you are performing– Conventionally the first tableau which really is

the last phase of the initialization step is labeled zero.

Page 10: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

0

Coefficient of

Page 11: The Simplex Procedure

Continue to Fill out the Tableau

• RN just stands for the row number.

• We label the objective function row “0”

Page 12: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

0

0

Coefficient of

Page 13: The Simplex Procedure

Continue to Fill out the Tableau

• RN just stands for the row number.

• We label the objective function row 0

• The remaining rows contain the constraints, and in this example are labeled 1-3

Page 14: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

0

0 1

Coefficient of

Page 15: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

0

0 1

2

Coefficient of

Page 16: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

0

0 1

2

3

Coefficient of

Page 17: The Simplex Procedure

“Coefficients of”

• Area of the Table

Page 18: The Simplex Procedure

Iter-ation

RN BV RHS bi/aij

0

0 1

2

3

Coefficient of

Page 19: The Simplex Procedure

“Coefficients of”

• Area of the Table

• Is where the decision making variables (Xj) and the slack variables (Si) are listed

Page 20: The Simplex Procedure

Iter-ation

RN BV

X1

RHS bi/aij

0

0 1

2

3

Coefficient of

Page 21: The Simplex Procedure

Iter-ation

RN BV

X1 X2

RHS bi/aij

0

0 1

2

3

Coefficient of

Page 22: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1

RHS bi/aij

0

0 1

2

3

Coefficient of

Page 23: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2

RHS bi/aij

0

0 1

2

3

Coefficient of

Page 24: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0

0 1

2

3

Coefficient of

Page 25: The Simplex Procedure

Basic Variables

• The column labeled BV just keeps track of the basic variables following each iteration

Page 26: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0

0 1

2

3

Coefficient of

Page 27: The Simplex Procedure

Basic Variables

• The column labeled BV just keeps track of the basic variables following each iteration

• Since there is not a basic variable in the objective function, we simply label the BV row “OBJ”

Page 28: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ

0 1

2

3

Coefficient of

Page 29: The Simplex Procedure

Basic Variables

• The column labeled BV just keeps track of the basic variables following each iteration

• Since there is not a basic variable in the objective function, we simply label the BV row “OBJ”

• In the initial tableau (0) the slack variables associated with each constraint are our basic variables

Page 30: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ

0 1 S1

2

3

Coefficient of

Page 31: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ

0 1 S1

2 S2

3

Coefficient of

Page 32: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ

0 1 S1

2 S2

3 S3

Coefficient of

Page 33: The Simplex Procedure

Right Hand Side

• The column labeled RHS contains the numbers on the right hand side of the equations in the linear programming problem

Page 34: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ

0 1 S1

2 S2

3 S3

Coefficient of

Page 35: The Simplex Procedure

Completing the Initialization Step

• Coefficients are taken from each equation and entered into the appropriate row of the tableau

• So for the first row, the objective function

Page 36: The Simplex Procedure

The Model to Enter in the Simplex Tableau

Max Z -3X1 -5x2 -0S1 -0S2 -0S3 =0

st X1 +S1 =4

2X2 +S2 =12

3X1 +2X2 +S3 =18

Page 37: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3

0 1 S1

2 S2

3 S3

Coefficient of

Page 38: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5

0 1 S1

2 S2

3 S3

Coefficient of

Page 39: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0

0 1 S1

2 S2

3 S3

Coefficient of

Page 40: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0

0 1 S1

2 S2

3 S3

Coefficient of

Page 41: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0

0 1 S1

2 S2

3 S3

Coefficient of

Page 42: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0

0 1 S1

2 S2

3 S3

Coefficient of

Page 43: The Simplex Procedure

Completing the Initialization Step

• For the second row which is the first constraint

Page 44: The Simplex Procedure

The Model to Enter in the Simplex Tableau

Max Z -3X1 -5x2 -0S1 -0S2 -0S3 =0

st X1 +S1 =4

2X2 +S2 =12

3X1 +2X2 +S3 =18

Page 45: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0

0 1 S1 1 0 1 0 0 4

2 S2

3 S3

Coefficient of

Page 46: The Simplex Procedure

Completing the Initialization Step

• For the second constraint

Page 47: The Simplex Procedure

The Model to Enter in the Simplex Tableau

Max Z -3X1 -5x2 -0S1 -0S2 -0S3 =0

st X1 +S1 =4

2X2 +S2 =12

3X1 +2X2 +S3 =18

Page 48: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0

0 1 S1 1 0 1 0 0 4

2 S2 0 2 0 1 0 12

3 S3

Coefficient of

Page 49: The Simplex Procedure

Completing the Initialization Step

• For the third constraint

Page 50: The Simplex Procedure

The Model to Enter in the Simplex Tableau

Max Z -3X1 -5x2 -0S1 -0S2 -0S3 =0

st X1 +S1 =4

2X2 +S2 =12

3X1 +2X2 +S3 =18

Page 51: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0

0 1 S1 1 0 1 0 0 4

2 S2 0 2 0 1 0 12

3 S3 3 2 0 0 1 18

Coefficient of

Page 52: The Simplex Procedure

Select the Entering Basic Variable

• Choose the most negative objective function coefficient

• Why?• Because with the reformulated objective

function that coefficient will increase the objective function value most rapidly

• The column of the entering basic variable is referred to as the pivot column

Page 53: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0

0 1 S1 1 0 1 0 0 4

2 S2 0 2 0 1 0 12

3 S3 3 2 0 0 1 18

Coefficient of

Page 54: The Simplex Procedure

Determine the Leaving Basic Variable

• Choose the minimum of the of the result of dividing the RHS coefficients by the coefficients in the pivot column:

(bi/aij) for aij>0

• Why the minimum? Otherwise the solution will either be infeasible or unbounded.

Page 55: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 2 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

Coefficient of

Page 56: The Simplex Procedure

Pivot Row

• The row selected for the leaving basic variable is referred to as the pivot row

Page 57: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 2 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

Coefficient of

Page 58: The Simplex Procedure

Pivot Number

• The number at the intersection of the pivot row and pivot column is referred to as the pivot number

Page 59: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

Coefficient of

Page 60: The Simplex Procedure

Number the Next Tableau

• Tableau Number 1

Page 61: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

1

Coefficient of

Page 62: The Simplex Procedure

Renumber the Rows

• 1

• 2

• 3

Page 63: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0

1 1

2

3

Coefficient of

Page 64: The Simplex Procedure

Write Down the Remaining Basic Variables

• S2 has left the basis as it was the basic variable in the pivot row

Page 65: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ

1 1 S1

2

3 S3

Coefficient of

Page 66: The Simplex Procedure

Write Down the Remaining Basic Variables

• S2 has left the basis as it was the basic variable in the pivot row

• X2 enters the basis replacing S2

Page 67: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ

1 1 S1

2 X2

3 S3

Coefficient of

Page 68: The Simplex Procedure

Prepare the Pivot Row to Perform Row Operations

• Divide the coefficients in the pivot row by the pivot number and write them down in the same row in the next tableau – tableau number 1

Page 69: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ

1 1 S1

2 X2 0 1 0 1/2 0 6

3 S3

Coefficient of

Page 70: The Simplex Procedure

Row Operations

• Now the idea is to use row operations to drive all of the other entries in the pivot column to zero, using the row that you just divided by 2 and moved down into tableau 1

• Remind any one of Gauss-Jordan reduction?

Page 71: The Simplex Procedure

Row Operations

• Now the idea is to use row operations to drive all of the other entries in the pivot column to zero, using the row that you just divided by 2 and moved down into tableau 1

• Remind any one of Gauss-Jordan reduction?

In case you were wondering, you use this and only this row for the row operations on the other rows. The fact that you know what row to use for the operations coupled with the entering andleaving basic variable rules is what makes the simplex solution process “easy” – well I guess we can at least say straight forward in that you always know exactly what row operations to perform.

Page 72: The Simplex Procedure

Row Operations

• Now the idea is to use row operations to drive all of the other entries in the pivot column to zero, using the row that you just divided by 2 and moved down into tableau 1

• Remind any one of Gauss-Jordan reduction?• Since the coefficient in row 1 is already zero all

you have to do is copy that row into tableau 1

Page 73: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ

1 1 S1 1 0 1 0 0 4

2 X2 0 1 0 1/2 0 6

3 S3

Coefficient of

Page 74: The Simplex Procedure

Work On Row Three

• Subtract 2 times the new row two from the old row 3 in tableau 0 and write down the results in the new row 3 in tableau 1

Page 75: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ

1 1 S1 1 0 1 0 0 4

2 X2 0 1 0 1/2 0 6

3 S3 3 0 0 -1 1 6

Coefficient of

Page 76: The Simplex Procedure

Complete the Iteration

• Add 5 times the new row 2 to the old row 0 in tableau 0 and write down the results in row 0 in tableau 1

• The iteration is complete because all entries in the old pivot column are now zero except for the old pivot number, which is 1

Page 77: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30

1 1 S1 1 0 1 0 0 4

2 X2 0 1 0 1/2 0 6

3 S3 3 0 0 -1 1 6

Coefficient of

Page 78: The Simplex Procedure

Start the Next Iteration

• Select the entering basic variable

Page 79: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30

1 1 S1 1 0 1 0 0 4

2 X2 0 1 0 1/2 0 6

3 S3 3 0 0 -1 1 6

Coefficient of

Page 80: The Simplex Procedure

Start the Next Iteration

• Select the entering basic variable

• X1

Page 81: The Simplex Procedure

Start the Next Iteration

• Select the entering basic variable

• X1

• Calculate (bi/aij) for aij>0

Page 82: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 3 0 0 -1 1 6 6/3=2

Coefficient of

Page 83: The Simplex Procedure

Start the Next Iteration

• Select the entering basic variable

• X1

• Calculate (bi/aij) for aij>0

• Select the leaving basic variable

Page 84: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 3 0 0 -1 1 6 6/3=2

Coefficient of

Page 85: The Simplex Procedure

Start the Next Iteration

• Select the entering basic variable

• X1

• Calculate (bi/aij) for aij>0

• Select the leaving basic variable

• S3

Page 86: The Simplex Procedure

Start the Next Iteration

• Select the entering basic variable

• X1

• Calculate (bi/aij) for aij>0

• Select the leaving basic variable

• S3

• The pivot number is 3

Page 87: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

Coefficient of

Page 88: The Simplex Procedure

Begin to Fill Out the Next Tableau

• Specify the iteration number (2)

• Write down the row numbers

• Specify the basic variables

Page 89: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ

2 1 S1

2 X2

3 X1

Coefficient of

Page 90: The Simplex Procedure

Prepare the Pivot Row to Perform Row Operations

• Divide the coefficients in the pivot row by the pivot number and write them down in the same row in the next tableau – tableau number 2

Page 91: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ

2 1 S1

2 X2

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 92: The Simplex Procedure

Prepare the Pivot Row to Perform Row Operations

• Divide the coefficients in the pivot row by the pivot number and write them down in the same row in the next tableau – tableau number 2

• Since the coefficient in row 2 is already zero all you have to do is copy that row into tableau 2

Page 93: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ

2 1 S1

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 94: The Simplex Procedure

Work On Row One

• Subtract 1 times the new row three from the old row 1 in tableau 1 and write down the results in the new row 1 in tableau 2

Page 95: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 96: The Simplex Procedure

Complete the Iteration

• Add 3 times the new row 3 to the old row 0 in tableau 1 and write down the results in row 0 in tableau 2

• The iteration is complete because all entries in the old pivot column are now zero except for the old pivot number, which is 1

Page 97: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 98: The Simplex Procedure

You are Done!

• You have arrived at the optimal solution to the problem (assuming no math errors).

• Why?

• Because there are no negative objective function coefficients – thus no candidates for a leaving basic variable

Page 99: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 100: The Simplex Procedure

You are Done!

• You have arrived at the optimal solution to the problem (assuming no math errors).

• Why?• Because there are no negative objective

function coefficients – thus no candidates for a leaving basic variable

• And your solution is feasible – because all RHS values are positive

Page 101: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 102: The Simplex Procedure

Interpretation of the Final Tableau

• The Objective Function Value is 36

Page 103: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 104: The Simplex Procedure

Interpretation of the Final Tableau

• The Objective Function Value is 36

• The Values of the basic variables are:– S1=2– X2=6– X1=2

• The non-basic variables are– S2=0– S3=0

Page 105: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 106: The Simplex Procedure

Interpretation of the Final Tableau• The Values of the basic variables are:

– S1=2

– X2=6

– X1=2

• The non-basic variables are– S2=0

– S3=0

• The shadow prices are:– 0 for constraint 1– 3/2 for constraint 2– 1 for constraint 3

Page 107: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 108: The Simplex Procedure

The Slack Variable Matrix

• Remember you have essentially been using Gauss-Jordan reduction to solve the problem

• Among other things this matrix keeps track of the net effects (in mathematical terms) of the row operations that you have preformed

Page 109: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of

Page 110: The Simplex Procedure

Iter-ation

RN BV

X1 X2 S1 S2 S3

RHS bi/aij

0 OBJ -3 -5 0 0 0 0 NA

0 1 S1 1 0 1 0 0 4 NA

2 S2 0 22 0 1 0 12 12/2=6

3 S3 3 2 0 0 1 18 18/2=9

0 OBJ -3 0 0 5/2 0 30 NA

1 1 S1 1 0 1 0 0 4 4/1=4

2 X2 0 1 0 1/2 0 6 NA

3 S3 33 0 0 -1 1 6 6/3=2

0 OBJ 0 0 0 3/2 1 36

2 1 S1 0 0 1 1/3 -1/3 2

2 X2 0 1 0 1/2 0 6

3 X1 1 0 0 -1/3 1/3 2

Coefficient of