Resources

Solving Highly Nonlinear Optimization Problems (nlps1)

/*******************************************************************/
/*                                                                 */
/*               S A S   S A M P L E   L I B R A R Y               */
/*                                                                 */
/*    NAME: nlps1                                                  */
/*   TITLE: Solving Highly Nonlinear Optimization Problems (nlps1) */
/* PRODUCT: OR                                                     */
/*  SYSTEM: ALL                                                    */
/*    KEYS: OR                                                     */
/*   PROCS: OPTMODEL                                               */
/*    DATA:                                                        */
/*                                                                 */
/* SUPPORT:                             UPDATE:                    */
/*     REF:                                                        */
/*    MISC: Example 1 from the Nonlinear Programming Solver        */
/*          chapter of Mathematical Programming.                   */
/*                                                                 */
/*******************************************************************/

proc optmodel;
   var x{1..8} >= 0.1 <= 10;

   min f = 0.4*(x[1]/x[7])^0.67 + 0.4*(x[2]/x[8])^0.67 + 10 - x[1] - x[2];

   con c1: 1 - 0.0588*x[5]*x[7] - 0.1*x[1] >= 0;
   con c2: 1 - 0.0588*x[6]*x[8] - 0.1*x[1] - 0.1*x[2] >= 0;
   con c3: 1 - 4*x[3]/x[5] - 2/(x[3]^0.71*x[5]) - 0.0588*x[7]/x[3]^1.3 >= 0;
   con c4: 1 - 4*x[4]/x[6] - 2/(x[4]^0.71*x[6]) - 0.0588*x[8]/x[4]^1.3 >= 0;
   con c5: 0.1 <= f <= 4.2;

   /* starting point */
   x[1] = 6;
   x[2] = 3;
   x[3] = 0.4;
   x[4] = 0.2;
   x[5] = 6;
   x[6] = 6;
   x[7] = 1;
   x[8] = 0.5;

   solve with nlp / algorithm=activeset;
   print x;
 quit;