The OPTMODEL Procedure |
You can use parameters to produce a clear formulation of a problem. Consider the Rosenbrock problem:
Here is a PROC OPTMODEL program that solves the Rosenbrock problem:
proc optmodel; number alpha = 100; /* declare parameter */ var x {1..2}; /* declare variables */ /* objective function */ min f = alpha*(x[2] - x[1]**2)**2 + (1 - x[1])**2; /* now run the solver */ solve; print x; quit;
The PROC OPTMODEL output is shown in Output 6.3.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.