readme.txt for quadLP
Ding Ma and Michael Saunders, SOL, MS&E, Stanford University.
dingma@stanford.edu, saunders@stanford.edu

MPS = the classical MPS format for defining LP problems.

FBA = Flux Balance Analysis, a modeling approach in systems biology
      that leads to large multiscale LP problems.  The data for some
      FBA problems exists here as Matlab *.mat files in data/FBA.

29 Apr 2014: quadLP files organized into the following directories:
             bin       executables for testFBA and testMPS
             data      MPS and FBA files
             doc       Report SOL 2014-1 about this project
             matlab    Scripts for generating FBA and MPS data files
             minos56   Double MINOS (f77)
             qminos56  Quad   MINOS (f77)
             results   Those obtained in SOL 2014-1
             src       Main programs for running tests in testFBA and testMPS
             testFBA   Scripts for solving FBA problems with Double and Quad MINOS
             testMPS   Scripts for solving MPS problems with Double and Quad MINOS

04 Nov 2014: 1. New runtime option     Report file 81
                exports solution info to file fort.81
                for use with the COBRA toolbox.
             2. Files testFBA/lp1.spc and testFBA/lp2.spc
                may activate this option.
             3. Scripts testFBA/runfba and testFBA/qrunfba
                rename fort.81 to be $PROB.sol.
             4. Function matlab/loadMinosSolution.m imports a *.sol file to Matlab.

21 Dec 2015: mi27lu.f updated.
             lu1fac: Slacks handled first.
             TCP: Heap routines allow for empty cols.
             TRP and TCP: lu1DCP handles singularities better.

INSTALLATION STEPS

0. Check Makefile.defs (in top directory) and edit if necessary
   to select your Fortran compiler.
   The same file exists in the top directory of minos56 and qminos56.
   If necessary:
      cp Makefile.defs  minos56
      cp Makefile.defs qminos56
   
1. Make the minos and qminos libraries:

   cd quadLP  # top directory
   cd minos56
   make       # makes lib/libminos.a and lib/minosdbg.a
   cd ../qminos56
   make       # makes lib/libquadminos.a and lib/libquadminosdbg.a

2. Test the installation by solving an LP problem stored in data/MPS
   using a Cold start with Double MINOS
   then two Warm starts with Quad MINOS (with and then without scaling).
   Note there are TWO scripts: runmps and qrunmps.

   cd ../testMPS
   make       # makes ../bin/minos and ../bin/qminos
   ./runmps   minos pilot4 lp1   # runs  minos on pilot4.mps lp1.spc
   ./qrunmps qminos pilot4 lp2   # runs qminos with pilot4.mps, lp2.spc

3. Test the installation by solving an FBA-type LP problem stored in data/FBA
   using a Cold start with Double MINOS
   then two Warm starts with Quad MINOS (with and then without scaling).
   Note there are TWO scripts: runfba and qrunfba.
   lp2.spc contains TWO specs files for the two Quad MINOS Warm starts.

   cd ../testFBA
   make       # makes ../bin/solveLP and ../bin/qsolveLP
   ./runfba   solveLP TMA_ME lp1   # runs  solveLP with TMA_ME.txt, lp1.spc
   ./qrunfba qsolveLP TMA_ME lp2   # runs qsolveLP with TMA_ME.txt, lp2.spc

4. To make more FBA data from files data/FBA/*.mat :
   Fire up Matlab
   cd quadLP     % top directory
   cd matlab     %
   help dumpLP   % Read instructions in dumpLP.m.
                 % dumpLP can make 2 versions of each FBA problem.
                 % They will have names like
                 % TMA_ME.txt   (full   precision version)
                 % TMA_MEs.txt  (single precision version)
   edit dumpLP   % Select problem number and data format (full or single precision)
                 % Save edited file
   dumpLP        % Run dumpLP.m

   A new *.txt or *s.txt file will now be in quadLP/data/FBA .
   You can then run it from quadLP/testFBA .

