8 From:	ADVAX::"kerr@eniac.seas.upenn.edu" "David E. Kerr" Subject: simplex   5 I'm sending a makefile first which will tell you that # as a stand-alone pgm, you run "sim" D    sim gets problem file specification and calls subroutine "simplx"   A simplx calls bldtab to build a tableau and returns the answer in  A argument X and RAY (if solution is unbounded, RAY is a direction  A along which the objective function can be minimized without limit $ and without violating constraints...   B incidently, the program assumes that problems are all minimizationD problems... to maximize an objective function, minimize its negative: and change the sign of the final objective function value.    in input file, as read by "sim"  * starts a commentI the first numbers are NVar (number of variables) and M (# of constraints)    > the next numbers are NVar coefficients of the linear objective function   ? the next M lines are constraints with <=, >=, or = relations to  right-hand-side    = the last line is up to NVar >= signs designating which of the : problem variables are non-negative (usually, they all are)   ! i'll send sample input files too.    
 the makefile:        CC=fort  RM=/bin/rm -rf all: sim$ sim: sim.o smplx.o simrpt.o bldtab.o0 	$(CC) -O -o sim sim.o smplx.o simrpt.o bldtab.o sim.o: sim.f 	$(CC) -O -c sim.f smplx.o: smplx.f 	$(CC) -O -c smplx.f simrpt.o: simrpt.f 	$(CC) -O -c simrpt.f  bldtab.o: bldtab.f 	$(CC) -O -c bldtab.f  clean: 	$(RM) *.o core sim        sample inputs:   	 * Nvar, M  * Bazaraa & Jarvis p. 143  2, 3 * objective function 1, -2 % * M=1 - 1st constraint, relation, rhs 	 1, 1 >= 2 % * M=2 - 2nd constraint, relation, rhs 
 -1, 1 >= 1% * M=3 - 2nd constraint, relation, rhs  , 1 <= 3. * non-negativity of variables (relation wrt 0) >=, >= ** end         L * Bazaraa & Jarvis p. 166 : Beale's example of a degenerate, cycling problem	 * Nvar, M  7, 3 * objective function ,,,-0.75, 20, -0.5, 6 % * M=1 - 1st constraint, relation, rhs  1, 0, 0, 0.25, -8, -1, 9 = 0% * M=2 - 2nd constraint, relation, rhs  0, -1, 0, -0.5, 12, 0.5, -3 = 0 % * M=3 - 3rd constraint, relation, rhs  ,, -1, , , -1, = -1 . * non-negativity of variables (relation wrt 0) >=, >=, >=, >=, >=, >=, >= ** end         	 * Nvar, M  3, 2 * objective function 1, 1, 4 % * M=1 - 1st constraint, relation, rhs  3, 2, 3 <= 2% * M=2 - 2nd constraint, relation, rhs 
 -2, 1, 5 >= 4 . * non-negativity of variables (relation wrt 0) , >=, >= ** end      