Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The NLP Procedure

GRADIENT Statement

GRADIENT variables ;

The GRADIENT statement defines the gradient vector contains the first-order derivatives of the objective function f with respect to x1, ... ,xn. For more information on]nlpd. To specify the values of nonzero derivatives, the variables specified in the GRADIENT statement must be defined at the left-hand side of algebraic expressions in programming statements. For example consider the Rosenbrock Function,

       proc nlp tech=congra;
         min y;
         decvar x1 x2;
         gradient g1 g2;

         y1 = 10 * (x2 - x1 * x1);
         y2 = 1 - x1;

         y  = .5 * (y1 * y1 + y2 * y2);

         g1 = -200 * x1 * (x2 - x1 * x1) - (1 - x1); 
         g2 = 100 * (x2 - x1 * x1);
       run;

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.