The Simplex Method on the TI-89

The Simplex Method on the TI-89
Written by Jeff O’Connell – [email protected]
Ohlone College
http://www2.ohlone.edu/people2/joconnell/ti/
Example:
Maximize
P = 50x1 + 80x2
Subject to
x1 + 2x2 ! 32
3x1 + 4x2 ! 84
x1 , x2 " 0
3) Set up Initial Simplex Tableau
x1
x2 s1 s2 P
1) Introduce slack variables:
x1 + 2x2 + s1
= 32
3x1 + 4x2
+ s2 = 84
x1 , x2 , s1 , s2 ! 0
4) Put the matrix as matrix
[A] into the calculator and
display [A].
2) Set up the Initial System
x1 + 2x2 + s1
= 32
3x1 + 4x2
!50x1 ! 80x2
+ s2
= 84
+P=0
x1 , x2 , s1 , s2 " 0
5) Pick the Pivot Element
x1
x2 s1 s2 P
s1 " 1
2 1 0 0 32 % 32 2 = 16 ( pivot row
$
'
s2 $ 3
4 0 1 0 84 ' 84 4 = 22
P $# !50 !80 0 0 1 0 '&
)
pivot column
The Row operations can be found by pressing [2nd][MATH] selecting [4: Matrix] and selecting [J: Row ops].
Row Operation
TI-89
Result
x1
x2
s1 s2 P
s1 " 1
2 1 0 0 32 %
$
s2 $ 3
4 0 1 0 84 ''
P $# !50 !80 0 0 1 0 '&
(a)
1
R1 ! R1
2
Row Operation
mRow(1/2,ANS,1)
TI-89
s1 " 0.5
1 0.5 0 0 16 %
$
s2 $ 3
4
0 1 0 84 ''
P $# !50 !80 0 0 1 0 '&
Result
x1
(b)
(!4)R1 + R2 " R2
(80)R1 + R3 " R3
mRowAdd(!4, ANS,1, 2)
mRowAdd(80, ANS,1, 3)
x2
s1
s2 P
x2 " 0.5 1 0.5 0 0 16 %
s2 $$ 1 0 !2 1 0 20 ''
P #$ !10 0 40 0 1 1280 '&
6) There are still negative numbers in the last row so we must do another pivot operation:
Row Operation
TI-89
Result
1
(! )R2 + R1 " R1
(a)
2
(10)R2 + R3 " R3
x1 x2
mRowAdd(!0.5, ANS, 2,1)
mRowAdd(10, ANS, 2, 3)
There are no negative numbers in the last row.
The maximum is 1480 at x1 = 20, x2 = 6, s1 = 0, s2 = 0.
s1
s2
P
x2 " 0 1 1.5 !0.5 0
6 %
$
x1 $ 1 0 !2
1
0 20 ''
P #$ 0 0 20 10 1 1480 '&