The Unconstrained Nonlinear Programming Solver

Getting Started

Consider a simple nonlinear problem as follows:

\min f = \sin(x) + \cos(x)
You can formulate and solve the problem by using PROC OPTMODEL as follows:

    proc optmodel;
      var x;
 
      minimize f = sin(x) + cos(x);
 
      solve with nlpu / tech = lbfgs;
 
    quit;
 

A problem summary and a solution summary are displayed in Figure 11.2.

The OPTMODEL Procedure

Problem Summary
Objective Sense Minimization
Objective Function f
Objective Type Nonlinear
   
Number of Variables 1
Bounded Above 0
Bounded Below 0
Bounded Below and Above 0
Free 1
Fixed 0
   
Number of Constraints 0



The OPTMODEL Procedure

Solution Summary
Solver L-BFGS
Objective Function f
Solution Status Optimal
Objective Value -1.414213562
Iterations 5
   
Optimality Error 1.046407E-6


Figure 11.2: Optimal Solution of the Example Problem

The iteration log is shown in Output 11.3.

NOTE: The problem has 1 variables (1 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: Using analytic derivatives for objective.
NOTE: The LIMITED MEMORY BFGS solver for unconstrained optimization is called.
Objective Optimality Function
Iter Value Error Calls
0 1.00000000 1.00000000 1
1 -1.36371237 0.10334611 6
2 -1.41417504 0.00310323 9
3 -1.41421338 0.00021392 12
4 -1.41421356 0.00001495429 15
5 -1.41421356 0.00000104641 18
NOTE: Optimal.
NOTE: Objective = -1.41421356.


Figure 11.3: Iteration Log


Previous Page | Next Page | Top of Page