examples/README   Philip E Gill                  24 December 2002


 RUNNING THE PRECOMPILED PROBLEMS
 --------------------------------

 You can run 28 problems separately using one of the two shell
scripts "snopt/examples/run" and "snopt/examples/runLP".  These
scripts have arguments that allow you to provide the explicit
path to the load libraries.  For example, the script "run" has
three arguments (the last being optional):
./run <problem_name> <lib_dir> [static]
where:
 <problem_name> is from:
      sntoya     sntoyb    snmaina   snmainb    snmainc npmain
     t1dieta    t1dietb  t2bananaa t2bananab       t3qp
    t4mannea   t4manneb   t5weapon    t6wood t7etamacro
  snmemtesta snmemtestb
     springa    springb   springbi      maxi
     hsmaina      hs118     slmain    sqmain  slmainMPS sqmainMPS
 <lib_dir>  is the path to the libraries   (default  "../lib")
 [static]   is an optional argument that specifies the use of
            static object libraries.

The check script includes a run of the problem "sntoy". This
problem was solved by the interface snOptA on a Linux PC by
invoking the command:

  % ./run sntoya     ../lib

Continuing in this way, we can use "run" to solve the following 22
precompiled test cases:

  1.  Two simple NLP examples:
  % ./run sntoya     ../lib
  % ./run snmaina    ../lib

  2.  The same examples with the user interface snOptB (aka snOpt)
      can be run with the commands

  % ./run sntoyb     ../lib
  % ./run snmainb    ../lib

  3.  An example of using subroutine snOptC, which is the user
      interface that calls a single user-supplied routine to compute
      the problem functions.  snOptC can be used as an alternative to
      snOptB when it is convenient to compute the objective and constraint
      functions simultaneously.

  % ./run snmainc    ../lib

      Next come eight stand-alone test problems that illustrate various
      ways of calling SNOPT and SQOPT interfaces.

  3.  The first two cases are examples of using snMemA and snMemB to
      estimate the storage for snOptA and snOptB:

  % ./run snmemtesta     ../lib
  % ./run snmemtestb     ../lib


  4.  The next is a small linear program with data defined in-line:
  % ./run t1dieta     ../lib

      (yes, SNOPT also solves an LP.  SQOPT would be more efficient,
       but never mind.)


  5.  A famous test problem with some bound constraints:
  % ./run t2bananaa   ../lib


  6.  A quadratic program:
  % ./run t3qp       ../lib


  7.  A nonlinear energy model with data defined in-line (the reduced
      Hessian is singular at the solution):
  % ./run t4mannea    ../lib


  8.  A linearly constrained problem with MPS data:
  % ./run t5weapon   ../lib


  9.  A  problem with nonlinear constraints and a linear objective, 
      data read  from an MPS file:
  % ./run t6wood     ../lib


 10.  A toughish linearly constrained problem with MPS data:
  % ./run t7etamacro ../lib

 11. Two fairly large optimal control problems (the second problem is
     infeasible):
  % ./run springa     ../lib
  % ./run springib    ../lib

 12. This is a nasty nonlinear problem with many local solutions:
  % ./run maxi       ../lib

 13. NPOPT is a version of SNOPT that uses a dense problem format 
     compatible with the dense code NPSOL.  (If you are new to this
     sort of thing it might be better to use NPOPT to get acquainted
     with nonlinear optimization).
  % ./run npmain     ../lib


     The next three cases deal with large-scale linear programming (LP)
     and quadratic programming (QP).

 14.  First, a small LP and two small QPs:
  % ./run slmain     ../lib
  % ./run sqmain     ../lib
  % ./run hs118      ../lib

 15. Solve two of these problems when the problem data is given in an
     MPS file.  The MPS reader is called from a main program.
  % ./run slmainMPS  ../lib
  % ./run sqmainMPS  ../lib

 16. Finally, we apply SQOPT to three linear programs defined using an
     MPS file.  The required script "runLP" uses SQOPT as stand-alone
     package.  Note that the problem REFINERY is infeasible, so SQOPT
     minimizes the one-norm of the constraint violations of the general
     constraints.

  % ./runLP adlittle lp  ../lib
  % ./runLP pilot4   lp  ../lib
  % ./runLP refinery lp  ../lib

     NOTE: If you want to run executables generated using the static
     object libraries, include the optional argument "static" to the
     "run" and "runLP" commands. For example, to run "sntoy" use:
  % ./run snmaina        ../lib static

