| The Unconstrained Nonlinear Programming Solver |
Consider the following example of minimizing a nonlinear function of three variables,
,
, and
:
![]() |
You can use the following SAS statements to formulate and solve the problem in PROC OPTMODEL:
proc optmodel;
var x, y, z;
minimize obj = x^2 + exp(y/10 + 10) + sin(z*y);
solve with nlpu / tech = fletreev maxiter = 100
opttol = 1e-7;
print x y z;
quit;
The optimal solution is displayed in Output 13.1.1.
| Problem Summary | |
|---|---|
| Objective Sense | Minimization |
| Objective Function | obj |
| Objective Type | Nonlinear |
| Number of Variables | 3 |
| Bounded Above | 0 |
| Bounded Below | 0 |
| Bounded Below and Above | 0 |
| Free | 3 |
| Fixed | 0 |
| Number of Constraints | 0 |
The following iteration log displays information about the type of algorithm used, objective value, relative gradient norm, and number of function evaluations at each iteration.
| line |
|---|
| NOTE: The problem has 3 variables (3 free, 0 fixed). |
| NOTE: The problem has 0 linear constraints (0 LE, 0 EQ, 0 GE, 0 range). |
| NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range). |
| NOTE: The OPTMODEL presolver removed 0 variables, 0 linear constraints, and 0 |
| nonlinear constraints. |
| NOTE: Using analytic derivatives for objective. |
| NOTE: The Fletcher-Reeves Conjugate Gradient algorithm for unconstrained |
| optimization is called. |
| Objective Optimality Function |
| Iter Value Error Calls |
| 0 22026.5 2202.64657948 1 |
| 1 3.2096359E-124 0.99999994 5 |
| 2 -0.79979862 0.60026837 16 |
| 3 -0.99009673 0.14038682 30 |
| 4 -0.99973800 0.02288966 41 |
| 5 -0.99999990 0.00045001 48 |
| 6 -1.00000000 0.00004279639 52 |
| 7 -1.00000000 2.71425843E-10 55 |
| NOTE: Optimal. |
| NOTE: Objective = -1. |
| NOTE: At least one W.D format was too small for the number to be printed. The |
| decimal may be shifted by the "BEST" format. |
Copyright © SAS Institute, Inc. All Rights Reserved.