FM Simplex with Rowops F09 O’Brien
How to Solve a Standard Maximization Problem Using the Simplex Method and the Rowops Program
Problem:
Maximize z = 25x1 + 30x2 subject to x1 + x2 ≤ 65 4x1 + 5x2 ≤ 300 with x ≥ 0 y ≥ 0
I.Setting Up the Problem
1.Rewrite each structural constraint as an equation by adding a different slack variable and replacing the
inequality symbol with an equal sign.
x1 + x2 ≤ 65 x1 + x2 + s1 = 65
4x1 + 5x2 ≤ 300 4x1 + 5x2 + s2 = 300
2.Rewrite the objective function so that all the variables are on the left and the constant is on the right.
When you do this, the coefficient of the variable to be optimized must be positive.
correct: –25x1 – 30x2 + z = 0 incorrect: 25x1 + 30x2 – z = 0
Record the rewritten objective function below the constraint equations. Line the variables up vertically.
x1 + x2 + s1 = 65
4x1 + 5x2 + s2 = 300
–25x1 – 30x2 + z = 0
3.Record the initial simplex tableau. Label each column.
4.Enter your initial simplex tableau into your calculator as matrix A.
What You Do on the CalculatorWhat You Will See
a.HitMATRIX or 2ndMATRIX
b.Hit►► to go to the Edit Menu
c.Hit 1to select matrix A
d.Hit 3ENTER6ENTERto enter the
number of rows and columns in the matrix.
The calculator will then create an empty
matrix with those dimensions.
e.Enter the elements of the matrix, one
number at a time, working from left to
right. ALWAYS check every entry before
you leave this screen. You can scroll
left & right, up & down, to check the entire
matrix.
II.Using the ROWOPS Program
5.Enter the ROWOPS program.
What You Do on the CalculatorWhat You Will See
a.Hit the PRGM key.
Select ROWOPS.
b.Hit ENTER. You will see the matrix
you just entered as Matrix A.
Hit ENTERagain. You will see a
menu with four choices.
The ROWOPS Menu
1.SWAP ROWSWe never swap rows when using the simplex method.
2.MULTIPLYTo get a one in a pivot position we multiply the row by the reciprocal of the pivot
number. For example, if the pivot position is R2C1 and it is occupied by 3,
we would multiply row two by .
To do this in the Rowops program we would select 2 To Multiply, hit Enter, type the
row number 2, hit Enter, type the multiplier 1 3, and hit Enter.
On paper we record this row operation as .
3.PIVOTTo get a zero above or below a one in a pivot position, we add a multiple of one row
to another. This is called pivoting. Pivoting clears a column of all nonzero non-pivot
entries. For example, if there is a one in the pivot position R2C1, –4 in R1C1, and in
R3C1,we would clear the first column by doing the following, assuming we have
gotten a one in the pivot position first:
i.To get a zero at R1C1, we would multiply the pivot row (R2) by 4 and add the
result to the row we are getting a zero in (R1). On paper we would record this
operation as4R2 + R1.
ii.To get a zero at R3C1, we would multiply the pivot row (R2) by and add the
result to the row we are getting a zero in (R3). On paper we would record this
operation as R2 + R3
To do this in the Rowops program, we would select 3 To Pivot, hit Enter, type the
rownumber where the pivot is located 2, hit Enter, type the column number where
the pivot is located 1, hit Enter. This operation will clear the entire column (replace
every non-pivot number in the column with zero).
When pivoting in Rowops, we do not enter the manual row operations, just the
location of the pivot. On paper, however, we must record the appropriate manual row
operations to get every zero in the column.
Hint:If you have a one in the pivot position and A in the position you want to clear, the
pivoting operation is: –A∙Rp + Rc
If you have B in the pivot position and A in the position you want to clear, the
pivoting operation is: –A∙Rp + B∙Rc
[Rp = pivot row Rc = row you are getting a zero in]
Note:You are required to record the manual row operation and the resulting matrix at each step ofthe
simplex method. Examples of manual row operations include and.
It is not o.k. to record a pivoting operation as “pivot on R2C1”.
4.StopWhen you have reached the final tableau, select 4 To Stop to exit the program and
then turn your calculator off to completely disengage the program.
III.Solving the Problem
6.To identify the pivot column, find the most negative indicator (number in the bottom row to the left of the
vertical bar). If there is a tie, choose the one farther to the left.
For this matrix, the most negative indicator is –30, so the pivot column is column 2.
7.To identify the pivot, form test quotients by taking each number in the pivot column and dividing it into
the corresponding constant. You are looking for the number which produces the smallest non-negative
quotient. Disregard quotients with zero or a negative number in the denominator. If all quotients must be
disregarded, no optimum solution exists. If there is a tie between two test quotients, choose the pivot
closest to the top of the matrix. Circle the pivot in every matrix.
Test Quotients: 60 < 65
Conclusion: The pivot is the 5 located in row 2 column 2.
What You Write Down:
Initial Simplex Tableau (Matrix 1)
with the first pivot circled
8.To get a one in the pivot position, multiply the pivot row by the reciprocal of the number in the pivot position.
Record this row operation in front of the resultant matrix.
Since there is a 5 in the pivot position, we must multiply the pivot row (R2) by
What You Do on the CalculatorWhat You Will See
a.Select 2 To Multiply. Hit ENTER
b.Enter the row number2 Hit ENTER
c.Enter the multiplier15 Hit ENTER
Record the row operation and
the resultant matrix on your paper.
What You Write Down
Initial Matrix (Matrix 1)row operation Resultant Matrix (Matrix 2)
9.To get a zero above or below the pivot position, multiply the pivot row by the opposite of the number you
want to become zero and add theresult to the row you are getting the zero in, –A∙Rp + Rc
Be sure you record the appropriate manual row operation to get every zero in the column
To get a zero in R1C2manually, we would multiply the pivot row (row 2) by –1 and add that to row one.
On paper we record –1R2 + R1.
To get a zero in R3C2 manually,we would multiply the pivot row (row 2) by 30 and add that to row three.
On paper we record 30R2 + R3.
What You Do on the CalculatorWhat You Will See
a.Hit ENTER to advance the program.
b.Select 3 To Pivot. Hit ENTER
c.Enter the row numberthe pivot is in2.
Hit ENTER.
d.Enter the column number the pivot is in2.
Hit ENTER.
Record the row operations and
the resultant matrix.
What You Write Down
Matrix 2row operations Matrix 3
10.Repeat steps 6 – 9 until all of the indicators are either positive or zero. This is called the final tableau.
Read the solution from the final tableau.
We still have a negative indicator, so we have not reached the final tableau.
Repeating Step 6:
The most negative indicator is the -1 in R3C1, so the pivot column is column 1.
Repeating Step 7:
Test Quotients: 25 < 75
Conclusion: The pivot is the located in R1C1.
Repeating Step 8:
Since there is a in the pivot position, we must multiply the pivot row (row 1) by 5.
What You Do on the CalculatorWhat You Will See
a.Hit ENTER to advance the program.
b.Select 2 To Multiply. Hit ENTER
c.Enter the row number 1 Hit ENTER
d.Enter the multiplier 5 Hit ENTER
Record the row operation and
the resultant matrix on your paper.
What You Write Down
Matrix 3 row operation Matrix 4
Repeating Step 9:
To get a zero in R2C1 manually, we would multiply the pivot row (row 1) by – and add that to row two.
On paper we record –R1 + R2.
To get a zero in R3C1 manually, we would multiply the pivot row (row 1) by 1 and add that to row three.
On paper we record 1R1 + R3.
What You Do on the CalculatorWhat You Will See
a.Hit ENTER to advance the program.
bSelect 3 To Pivot. Hit ENTER
c.Enter the row number the pivot is in 1.
Hit ENTER.
d.Enter the column number the pivot is in 1.
Hit ENTER.
Record the row operations and
the resultant matrix on your paper.
What You Write Down
Matrix 4 row operations Final Tableau
Since the indicators of this matrix are all either positive or zero, we have reached the final matrix.
We can now read the solution from the matrix.
Basic variables: x1 = 25 x2 = 40 Nonbasic variables: s1 = 0 s2 = 0
Conclusion: A maximum z-value of 1825 occurs when x1 = 25 and x2 = 40
1