The Nonlinear Programming Solver

A Larger Optimization Problem

Consider the following larger optimization problem:

The problem consists of a quadratic objective function, 1,000 linear equality constraints, and a linear inequality constraint. There are also 2,005 variables. The goal is to find a local minimum by using the ACTIVESET technique. This can be accomplished by issuing the following call to PROC OPTMODEL:

proc optmodel;
   number n = 1000;
   number b = 5;
   var x{1..n} >= -1 <= 1 init  0.99;
   var y{1..n} >= -1 <= 1 init -0.99;
   var z{1..b} >=  0 <= 2 init  0.5;

   minimize f = sum{i in 1..n} x[i]*y[i] + 0.5*sum{j in 1..b} z[j]^2;
   con cons1{k in 1..n}: x[k] + y[k] + sum{j in 1..b} z[j] = b;
   con cons2: sum{i in 1..n} (x[i] + y[i]) + sum{j in 1..b} z[j] >= b + 1;

   solve with NLP / algorithm=activeset logfreq=10;
quit;

The SAS output displays a detailed summary of the problem along with the status of the solver at termination, the total number of iterations required, and the value of the objective function at the local minimum. The summaries are shown in Figure 5.

Figure 5: Problem Summary and Solution Summary

The OPTMODEL Procedure

Problem Summary
Objective SenseMinimization
Objective Functionf
Objective TypeQuadratic
  
Number of Variables2005
Bounded Above0
Bounded Below0
Bounded Below and Above2005
Free0
Fixed0
  
Number of Constraints1001
Linear LE (<=)0
Linear EQ (=)1000
Linear GE (>=)1
Linear Range0

Solution Summary
SolverNLP
AlgorithmActive Set
Objective Functionf
Solution StatusOptimal
Objective Value-996.4999999
  
Optimality Error3.9546178E-7
Infeasibility8.8295709E-9
  
Iterations10
Presolve Time0.00
Solution Time0.17


The SAS log shown in Figure 6 displays a brief summary of the problem that is being solved, followed by the iterations that are generated by the solver.

Figure 6: Progress of the Algorithm as Shown in the Log

NOTE: Problem generation will use 16 threads.                                   
NOTE: The problem has 2005 variables (0 free, 0 fixed).                         
NOTE: The problem has 1001 linear constraints (0 LE, 1000 EQ, 1 GE, 0 range).   
NOTE: The problem has 9005 linear constraint coefficients.                      
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: Using 2 threads for nonlinear evaluation.                                 
NOTE: The NLP solver is called.                                                 
NOTE: The Active Set algorithm is used.                                         
                        Objective                          Optimality           
           Iter             Value     Infeasibility             Error           
              0     -979.47500000        3.50000000        0.14142857           
             10     -996.49999991   0.0000000088296   0.0000003954618           
NOTE: Optimal.                                                                  
NOTE: Objective = -996.4999999.                                                 


Last updated: April 14, 2021