TI Nspire CX program to generate initial tableau for Simplex Algorithm

The simplex algorithm can be easily performed in TI Nspire CX and also in the TI-84 series. A program is created to provide an intuitive means to construct the initial tableau.

The function prototype takes two arguments, one for a list of expression consisting the constraint inequalities plus the function to maximize (assumed to be the last in the list), and another argument to specify the number of variables. The variables in the inequalities must be named as x[n] where n is a number starting from one.

simplextableau2

Example of the usage of this program showing how the inequalities are set up.simplextableau1a

The program makes use of some string functions, the expr and polyCoeffs functions and also indirection to extract the coefficients in the inequalities and to build the initial tableau matrix.
simplextableau3

simplextableau4

Graphical representation of the example above.
simplexgraphsln1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s