The Sequential Quadratic Programming Solver

Example 13.4: Using the PENALTY= Option

The PENALTY= option plays an important role in ensuring a good convergence rate. Consider the following example:

\min & ({x_1} -10)^3 + (x_2-20)^3 & \    {\rm subjectto} & ({x_1}-5)^2 + ({x_2}-5...   ...-5)^2 \leq 82.81 & \    & 13 \leq {x_1} \leq 16 & \    & 0 \leq {x_2} \leq 15 &

Assume the starting point \mathbf{x}^0 = (\,14.35, 8.6\,). You can use the following SAS code to solve the problem:

    proc optmodel;
       var x1 >=13 <=16, x2 >=0 <=15;
       
       minimize obj = 
          (x1-10)^3 + (x2-20)^3;
       
       con cons1:
          (x1-5)^2 + (x2-5)^2 - 100 >= 0;
       con cons2:
          82.81 - (x1-6)^2 - (x2-5)^2 >= 0;
       
       /* starting point */
       x1 = 14.35;
       x2 = 8.6;
       
       solve with sqp / printfreq = 5;
       print x1 x2;
    quit;
 

The optimal solution is displayed in Output 13.4.1.

Output 13.4.1: Optimal Solution
The OPTMODEL Procedure

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



The OPTMODEL Procedure

Solution Summary
Solver SQP
Objective Function obj
Solution Status Optimal
Objective Value -6961.800335
Iterations 43
   
Infeasibility 0
Optimality Error 2.2032777E-6
Complementarity 6.9098659E-6

x1 x2
14.095 0.84297



The SQP solver might converge to the optimal solution more quickly if you specify PENALTY = 0.1 instead of the default value (0.75). You can specify the PENALTY= option in the SOLVE statement as follows:

  
    proc optmodel; 
    ... 
       solve with sqp / printfreq=5 penalty=0.1; 
    ... 
    quit;
 

The optimal solution is displayed in Output 13.4.2.

Output 13.4.2: Optimal Solution Using the PENALTY= Option
The OPTMODEL Procedure

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



The OPTMODEL Procedure

Solution Summary
Solver SQP
Objective Function obj
Solution Status Optimal
Objective Value -6961.813876
Iterations 31
   
Infeasibility 1.105604E-11
Optimality Error 1.6225769E-9
Complementarity 1.105604E-11

x1 x2
14.095 0.84296



The iteration log is shown in Output 13.4.3.

Output 13.4.3: Iteration Log
NOTE: The problem has 2 variables (0 free, 0 fixed).
NOTE: The problem has 0 linear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The problem has 2 nonlinear constraints (0 LE, 0 EQ, 2 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 -1399.2311250 0 0.9974417 0
5 -22119.5304661 90.4096764 0.9995770 90.4096764
10 -17483.9618903 37.4732872 0.0808863 37.4732872
15 -7949.1564384 1.6899450 0.0321408 1.6899450
20 -6948.7032786 0 0.0911572 0.8546242
25 -6961.8201998 0.0000428 18.1097485 0.0000428
30 -6961.8138753 4.10693701E-12 0.00000067261 2.84700263E-10
31 -6961.8138756 1.1056045E-11 0.00000000162 1.1056045E-11
NOTE: Converged.
NOTE: Objective = -6961.81388.



You can see from Output 13.4.2 that the SQP solver took fewer iterations to converge to the optimal solution (see Output 13.4.1).

Previous Page | Next Page | Top of Page