The Nonlinear Programming Solver

An Optimization Problem with Many Local Minima

Consider the following optimization problem:

\[ \begin{array}{lll} \displaystyle \mathop \textrm{minimize}f(x) & =&  e^{\sin (50x)} + \sin (60e^ y) + \sin (70\sin (x)) + \sin (\sin (80y)) \\ & &  - \sin (10(x+y)) + (x^2+y^2)/4\\ \textrm{subject\  to}& &  -1 \le x \le 1 \\ & &  -1 \le y \le 1 \end{array}  \]

The objective function is highly nonlinear and contains many local minima. The NLP solver provides you with the option of searching the feasible region and identifying local minima of better quality. This is achieved by writing the following SAS program:

proc optmodel;
  var x >= -1 <= 1;
  var y >= -1 <= 1;
  min f = exp(sin(50*x)) + sin(60*exp(y)) + sin(70*sin(x)) + sin(sin(80*y)) 
          - sin(10*(x+y)) + (x^2+y^2)/4;
  solve with nlp / multistart seed=94245 msmaxstarts=30;
quit;   

The MULTISTART option is specified, which directs the algorithm to start the local solver from many different starting points. The SAS log is shown in Figure 8.5.

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

NOTE: Problem generation will use 2 threads.                                    
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 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: The NLP solver is called.                                                 
NOTE: The Interior Point algorithm is used.                                     
NOTE: The MULTISTART option is enabled.                                         
NOTE: The deterministic parallel mode is enabled.                               
NOTE: The Multistart algorithm is using up to 2 threads.                        
NOTE: Random number seed 94245 is used.                                         
                    Best       Local  Optimality    Infeasi-  Local  Local      
      Start    Objective   Objective       Error      bility  Iters  Status     
          1   -1.6426974  -1.6426974        5E-7           0      3  Optimal    
          2   -1.6426974  -1.5650191        5E-7           0      4  Optimal    
          3   -1.6426974  -1.1044506        5E-7           0      4  Optimal    
          4   -2.8376555  -2.8376555        5E-7           0      5  Optimal    
          5   -2.8376555  -1.2485371        5E-7           0      6  Optimal    
          6   -2.8376555   -2.333689        5E-7           0      4  Optimal    
          7   -2.8376555   -0.480206        5E-7           0      5  Optimal    
          8   -2.8376555  -1.0585595        5E-7           0      3  Optimal    
          9   -2.8376555  -2.5753281        5E-7           0      4  Optimal    
         10   -2.8376555  -2.5267443        5E-7           0      4  Optimal    
         11 * -2.8376555  -1.3289057        5E-7           0      4  Optimal    
         12   -2.8376555   -2.119774        5E-7           0      3  Optimal    
         13   -2.9525781  -2.9525781        5E-7           0      4  Optimal    
         14   -2.9525781  -1.9508557        5E-7           0      4  Optimal    
         15   -2.9525781  -1.8175105        5E-7           0      4  Optimal    
         16   -2.9525781  -1.3557927        5E-7           0      4  Optimal    
         17   -2.9525781  -2.0402058        5E-7           0      4  Optimal    
         18   -2.9525781  -0.2693636        5E-7           0      4  Optimal    
         19   -2.9525781  -1.9746745        5E-7           0      4  Optimal    
         20   -2.9525781  -0.5021146        5E-7           0      3  Optimal    
         21   -2.9525781  -0.3721518        5E-7           0      6  Optimal    
         22   -2.9525781  -0.7000047        5E-7           0      4  Optimal    
         23   -2.9525781  -1.8461741        5E-7           0      6  Optimal    
         24   -2.9525781   -1.734773        5E-7           0      3  Optimal    
         25   -3.2081391  -3.2081391        5E-7           0      3  Optimal    
         26   -3.2081391  -2.0724927        5E-7           0      4  Optimal    
         27 r -3.2081391  -1.2485371        5E-7           0      5  Optimal    
NOTE: The Multistart algorithm generated 320 sample points.                     
NOTE: 26 distinct local optima were found.                                      
NOTE: The best objective value found by local solver = -3.20813913.             


The SAS log presents additional information when the MULTISTART option is enabled. The first column counts the number of restarts of the local solver. The second column records the best local optimum that has been found so far, and the third through sixth columns record the local optimum to which the solver has converged. The final column records the status of the local solver at every iteration.

The SAS output is shown in Figure 8.6.

Figure 8.6: Problem Summary and Solution Summary

The OPTMODEL Procedure

Problem Summary
Objective Sense Minimization
Objective Function f
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 0

Performance Information
Execution Mode On Client
Number of Threads 2

Solution Summary
Solver Multistart NLP
Algorithm Interior Point
Objective Function f
Solution Status Optimal
Objective Value -3.20813913
   
Number of Starts 27
Number of Sample Points 320
Number of Distinct Optima 27
Random Seed Used 94245
Optimality Error 5E-7
Infeasibility 0