The Sequential Quadratic Programming Solver |
Getting Started
Consider a simple example of minimizing the following nonlinear programming problem:
Assume the starting point . You can use the following SAS code to solve the problem:
proc optmodel;
var x {1..2};
minimize obj = (1-x[1])^2;
con cons1: x[2] - x[1]^2 = 0;
/*starting point */
x[1] = -1.2;
x[2] = 1;
solve with SQP/ printfreq = 5;
print x;
quit;
The summary of the solver output along with the optimal solution, , is displayed in Figure 13.1.
The OPTMODEL Procedure
Minimization |
obj |
Quadratic |
|
2 |
0 |
0 |
0 |
2 |
0 |
|
1 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
The OPTMODEL Procedure
SQP |
obj |
Optimal |
2.736033E-16 |
18 |
|
9.2771104E-7 |
1.5590633E-7 |
0 |
|
Figure 13.1: Optimal Solution
The iteration log in Output 13.2 displays information about the objective
function value, the norm of the violated constraints, the norm of the gradient of the Lagrangian function, and the norm of the violated complementarity condition at each iteration.
NOTE: The problem has 2 variables (2 free, 0 fixed). |
NOTE: The problem has 0 linear constraints (0 LE, 0 EQ, 0 GE, 0 range). |
NOTE: The problem has 1 nonlinear constraints (0 LE, 1 EQ, 0 GE, 0 range). |
NOTE: Using analytic derivatives for objective. |
NOTE: Using analytic derivatives for nonlinear constraints. |
NOTE: The SQP solver is called. |
Objective Optimality |
Iter Value Infeasibility Error Complementarity |
0 4.8400000 0.4400000 0.2892834 0 |
5 0.7106649 1.2210650 0.8103064 0 |
10 0.0063019 0.1667028 0.1369754 0 |
15 0.00000317470 0.0047719 0.0035509 0 |
18 2.73603275E-16 0.00000092771 0.00000015591 0 |
NOTE: Converged. |
NOTE: Objective = 2.73603275E-16. |
|
Figure 13.2: Iteration Log
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.