---------------------------------------------------------------------

C ALGORITHM 566
C
C FORTRAN SUBROUTINES FOR TESTING UNCONSTRAINED OPTIMIZATION
C SOFTWARE
C
C BY J.J. MORE, B.S. GARBOW AND K.E. HILLSTROM
C
C ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE 7,1 (MARCH 1981)
C
C ===== THERE ARE 16 PARTS TO THIS FILE
C ===== 1. DOCUMENTATION.
C ===== 2. DOUBLE PRECISION TESTING AIDS FOR NONLINEAR EQUATIONS.
C ===== 3. DOUBLE PRECISION TESTING AIDS FOR NONLINEAR LEAST-SQUARES.
C ===== 4. DOUBLE PRECISION TESTING AIDS FOR UNCONSTRAINED NONLINEAR
C =====     OPTIMIZATION.
C ===== 5. SINGLE PRECISION TESTING AIDS FOR NONLINEAR EQUATIONS.
C ===== 6. SINGLE PRECISION TESTING AIDS FOR NONLINEAR LEAST-SQUARES.
C ===== 7. SINGLE PRECISION TESTING AIDS FOR UNCONSTRAINED NONLINEAR
C =====     OPTIMIZATION.
C ===== 8. SAMPLE DRIVER FOR DOUBLE PRECISION NONLINEAR EQUATIONS.
C ===== 9. SAMPLE DRIVER FOR SINGLE PRECISION NONLINEAR EQUATIONS.
C ===== 10. SAMPLE DRIVER FOR DOUBLE PRECISION NONLINEAR LEAST-SQUARES.
C ===== 11. SAMPLE DRIVER FOR SINGLE PRECISION NONLINEAR LEAST-SQUARES.
C ===== 12. SAMPLE DRIVER FOR DOUBLE PRECISION UNCONSTRAINED NONLINEAR
C =====     MINIMIZATION.
C ===== 13. SAMPLE DRIVER FOR SINGLE PRECISION UNCONSTRAINED NONLINEAR
C =====     MINIMIZATION.
C ===== 14. DATA (NONLINEAR EQUATIONS).
C ===== 15. DATA (NONLINEARR LEAST SQUARES).
C ===== 16. DATA (UNCONSTRAINED NONLINEAR OPTIMIZATION).
C =====
C =====
C =====
C ===== 1. DOCUMENTATION.
 DESCRIPTION

      This is the Fortran package of subroutines described in (1)
 for testing unconstrained optimization software.  The following
 three problem areas are considered.

      1.  Zeros of systems of N nonlinear functions in N variables.

      2.  Least Squares minimization of M nonlinear functions in
          N variables.

      3.  Unconstrained minimization of an objective function with
          N variables.

      The subroutines which define the test functions and starting
 points depend on the dimension parameters M and N and on the
 problem number NPROB.  We first describe the subroutines for the
 test functions.

      For systems of nonlinear functions,

                VECFCN(N,X,FVEC,NPROB)

 returns the function values in the N-vector FVEC, and

                VECJAC(N,X,FJAC,LDFJAC,NPROB)

 returns the Jacobian matrix in the N by N array FJAC.  (The parameter
 LDFJAC is the leading dimension of the array FJAC as defined in the
 main program.)  In order to prevent gross inefficiencies with solvers
 which only require one function value at a time,

                COMFCN(N,K,X,FCNK,NPROB)

 returns the K-th function value in FCNK.

      For nonlinear least squares,

                SSQFCN(M,N,X,FVEC,NPROB)

 returns the function values in the M-vector FVEC, and

                SSQJAC(M,N,X,FJAC,LDFJAC,NPROB)

 returns the Jacobian matrix in the M by N array FJAC.

      For unconstrained minimization,

                OBJFCN(N,X,F,NPROB)

 returns the objective function value in F, and

                GRDFCN(N,X,G,NPROB)

 returns the gradient components in the N-vector G.

      For each problem area, the starting points are generated by

                INITPT(N,X,NPROB,FACTOR)

 which returns in X the starting point corresponding to the
 parameters NPROB and FACTOR.  If XS denotes the standard starting
 point, then X will contain FACTOR*XS, except that if XS is the
 zero vector and FACTOR is not unity, then all the components of X
 will be set to FACTOR.

      To test a code in any of the three problem areas, the user
 must provide a driver and interface routine.  The driver reads in
 the data which defines the dimensions, the problem number, and
 FACTOR, calls INITPT, and then calls the code of interest and
 prints out results.  The interface routine provides a link between
 the code with its particular function routine calling sequences
 and the subroutines for the test functions.

      The package includes example drivers and interface routines
 for each of the problem areas.  Sample data is also provided.


 REFERENCES

 1. More, J.J., Garbow, B.S., and Hillstrom, K.E., Testing
    Unconstrained Optimization Software, ACM Trans. Math. Software
    (this issue).
