The Sequential Quadratic Programming Solver

Getting Started

Consider a simple example of minimizing the following nonlinear programming problem:

\min & (1 - x_1)^2 \    {\rm subjectto} & {x_2} - {x_1}^2 = 0

Assume the starting point \mathbf{x}^0 = (\,-1.2, 1.0\,). 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, (\,1.0, 1.0\,), is displayed in Figure 13.1.

The OPTMODEL Procedure

Problem Summary
Objective Sense Minimization
Objective Function obj
Objective Type Quadratic
   
Number of Variables 2
Bounded Above 0
Bounded Below 0
Bounded Below and Above 0
Free 2
Fixed 0
   
Number of Constraints 1
Linear LE (<=) 0
Linear EQ (=) 0
Linear GE (>=) 0
Linear Range 0
Nonlinear LE (<=) 0
Nonlinear EQ (=) 1
Nonlinear GE (>=) 0
Nonlinear Range 0



The OPTMODEL Procedure

Solution Summary
Solver SQP
Objective Function obj
Solution Status Optimal
Objective Value 2.736033E-16
Iterations 18
   
Infeasibility 9.2771104E-7
Optimality Error 1.5590633E-7
Complementarity 0

[1] x
1 1
2 1


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

Previous Page | Next Page | Top of Page