LPMOVIE : USERS GUIDE ===================== (The detailed guidelines are in the file /u2/co350/lpmovie/lpmovie.user.guide on undergrad.math computers. See this file for a detailed example from the book LINEAR PROGRAMMING, by Chvatal, page 39.) Lpmovie is a very simple matlab m-file function that allows the user to display an LP in dictionary format on the screen and to do the pivoting. You can get online help by typing "help lpmovie" (no quotes). 0. Accessing Lpmovie ~~~~~~~~~~~~~~~~~~~~ METHOD 1: Add the co350 directory to your matlab path environment variable. This means matlab will look in the proper place for the files. The easiest way to add the path to your environment is to add the following line (exactly) in your ~/.cshrc file. setenv MATLABPATH "/u/co350/lpmovie" The environment variable will be defined properly the NEXT time you login. METHOD 2: Copy all the files into your own account and run matlab from the same directory where you copied the files to. To do this type, cp /u/co350/lpmovie/*.m . (the final DOT is required). 1. Defining the Dictionary Coefficients ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To use lpmovie you must define an initial dictionary of some form. To do this you enter the coefficients in a matrix. For example, to define the program, X1 = 3 -4X3 +1X4 X2 = 1 +1X3 -3X4 ---------------- Z = 0 +1X3 +1X4 type in (at the matlab prompt), A = [ 3 -4 1 1 1 -3 0 1 1 ]; 2. Running LPMOVIE ~~~~~~~~~~~~~~~~~~ The simplest way to run lpmovie is to type lpmovie(A) where A is the coefficient matrix of the LP. You are then prompted on the screen to say if you want a pivot. If you do, enter 1. You are next asked to specify the subscript of a leaving variable. This must be the integer subscript; do NOT include the letter X. You are finally asked to specify the subscript of the entering variable. For example, if you wish to pivot on element (X1,X3), you enter 1 for the leaving variable and 3 for the entering variable. 3. LPMOVIE Options ~~~~~~~~~~~~~~~~~~ 3.1 Specifying Variable Subscripts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lpmovie gives default variable name subscripts to your problem. To change the default and to run lpmovie with your own variable subscripts, type "lpmovie(A,n,b);" where n are the subscripts of the nonbasic variables and b are the subscripts of the basic variables. 3.2 Specifying Field Width ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3.3 Forcing Clear Screens ~~~~~~~~~~~~~~~~~~~~~~~~~ 3.4 Returning the Final Dictionary ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is handy if you want to use lpmovie for phase 1 and phase 2 methods.