This piece of software implements an active-set method to solve linealy 
constrained problems described in [1]. This particular implementation, 
designed to solve small and medium sized problems, uses the main ideas 
of GENCAN [2] and BETRA [3] to solve the "unconstrained" subproblems and 
SPG [4,5] to leave the faces.

[1] M. Andretta, E. G. Birgin and J. M. Martinez, ''Partial Spectral 
Projected Gradient Method with Active-Set Strategy for Linearly
Constrained Optimization'', submitted, 2008.

[2] E. G. Birgin and J. M. Martinez, "Large-scale active-set 
box-constrained optimization method with spectral projected gradients", 
Computational Optimization and Applications 23, pp. 101-125, 2002. 

[3] M. Andretta, E. G. Birgin and J. M. Martinez, "Practical active-set 
Euclidian trust-region method with spectral projected gradients for 
bound-constrained minimization", Optimization 54, pp. 305-325, 2005.

[4]  E. G. Birgin, J. M. Martinez and M. Raydan, "Nonmonotone spectral 
projected gradient methods on convex sets", SIAM Journal on 
Optimization 10, pp. 1196-1211, 2000.

[5] E. G. Birgin, J. M. Martinez and M. Raydan, "Algorithm 813: SPG - 
software for convex-constrained optimization", ACM Transactions on 
Mathematical Software 27, pp. 340-349, 2001.

Description of the files:

genlin.f     : optimization method main subroutine,

genlinma.f   : example of a main program,

genlin.dat   : specification file used to easily change some parameters. 
               It is not necessary to use this file, but if the user wants, 
               it should be in the same directory as the program is executed,

film.f       : routines used by genlin.f and genlinma.f that define the 
               problem of thin films,

For an easy test, copy all the files and directories qp/, lapack/ and blas/. 
Generate the object files typing

g77 -O3 -c -xf77-cpp-input genlin.f genlinma.f film.f qp/ql00022.f
g77 -c lapack/* blas/*

Files in directory lapack/ can be obtained from www.netlib.org/lapack. 
Files in directory blas/ can be obtained from www.netlib.org/blas.

Compile all files typing

g77 genlin.o genlinma.o film.o ql00022.o dgeqp3.o dgeqr2.o dgeqrf.o \
    dlapy2.o dlaqp2.o dlaqps.o dlarfb.o dlarfg.o dlarf.o dlarft.o dorm2r.o \
    dormqr.o dgemm.o dgemv.o dger.o dlamch.o dtrmm.o dtrmv.o ieeeck.o \
    ilaenv.o lsame.o xerbla.o dgeequ.o dnrm2.o dscal.o dcopy.o dswap.o \
    idamax.o -o genlinma

and execute typing

genlinma.

The output that will appear in the screen will be the application of GENLIN
to the thin film problem implemented in subroutines

inip    : set the number of variables, the number of linear constraints, 
          the bounds the initial points and other few parameters of the 
	  problem,

evalf   : computes the objective function,

evalg   : computes the gradient of the objective function,

evalh   : computes the hessian (dense format) of the objective function,

evalsh  : computes the hessian (sparse format) of the objective function,

endp    : print some final information.

Solution will be saved in the output file solution.txt. Moreover, everything
that appears in the screen will be also saved in the file genlin.out. All 
the subroutines described above can be easily modified to solve your own 
problem.
