## Solving NLP Problems With Several Local Minima (nlps5)

```/********************************************************************/
/*                                                                  */
/*               S A S   S A M P L E   L I B R A R Y                */
/*                                                                  */
/*    NAME: nlps5                                                   */
/*   TITLE: Solving NLP Problems With Several Local Minima (nlps5)  */
/* PRODUCT: OR                                                      */
/*  SYSTEM: ALL                                                     */
/*    KEYS: OR                                                      */
/*   PROCS: OPTMODEL                                                */
/*    DATA:                                                         */
/*                                                                  */
/* SUPPORT:                             UPDATE:                     */
/*     REF:                                                         */
/*    MISC: Example 5 from the Nonlinear Programming Solver         */
/*          chapter of Mathematical Programming.                    */
/*                                                                  */
/********************************************************************/

proc optmodel;
var x{i in 1..5} >= -5 <= 5 init -2;

min f=(x - 1)^2 + (x - x)^2 + (x - x)^3 +
(x - x)^4 + (x - x)^4;

con g1: x + x^2 + x^3 =  2 + 3*sqrt(2);
con g2: x + x   - x^2 = -2 + 2*sqrt(2);
con g3: x*x = 2;