$TITLE  Example of a simple nonlin problem
$OFFUPPER
*Taken from the example: Ramsey Model of Optimal Economic Growth
*
*  This formulation is described in 'GAMS/MINOS: Three examples'
*  by Alan S. Manne, Department of Operations Research, Stanford
*  University, May 1986.
*
*
*---------------------------------------------------------------------

 SETS     I         index      / IND1 * IND4 / ;

 VARIABLES
      X(I)   unknowns
      Z      optimal value  ;

 EQUATIONS 
    COST   define objective function
    CONSTRAINT single constraint nonlinear ;
 
 COST..  Z =E= -X("IND1")*X("IND3")-2*X("IND2") +9*X("IND3") ;
 CONSTRAINT.. SUM(I,SQR(X(I))) =L= 100;

MODEL NONL /ALL/;

 SOLVE NONL  MAXIMIZING Z USING NLP;

