The Nonlinear Programming Solver

Example 8.3 Solving NLP Problems with Range Constraints

Some constraints have both lower and upper bounds (that is, $a \le g(x) \le b$). These constraints are called range constraints. The NLP solver can handle range constraints in an efficient way. Consider the following NLP problem, taken from Hock and Schittkowski (1981),

\[ \begin{array}{ll} \displaystyle \mathop \textrm{minimize}&  f(x) = 5.35 (x_{3})^{2} + 0.83 x_1 x_5 + 37.29 x_1 - 40792.141 \\ \textrm{subject\  to}&  0 \le a_1 + a_2 x_2 x_5 + a_3 x_1 x_4 -a_4 x_3 x_5 \le 92 \\ &  0 \le a_5 + a_6 x_2 x_5 + a_7 x_1 x_2 +a_8 x_3^{2} - 90 \le 20 \\ &  0 \le a_9 + a_{10} x_3 x_5 + a_{11} x_1 x_3 + a_{12} x_3 x_4 -20 \le 5 \\ &  78 \le x_1 \le 102 \\ &  33 \le x_2 \le 45 \\ &  27 \le x_ i \le 45, \quad i=3,4,5 \end{array}  \]

where the values of the parameters $a_{i}, i=1,2, \ldots , 12$, are shown in Table 8.4.

Table 8.4: Data for Example 3

i

$a_ i$

i

$a_ i$

i

$a_ i$

1

85.334407

5

80.51249

9

9.300961

2

0.0056858

6

0.0071317

10

0.0047026

3

0.0006262

7

0.0029955

11

0.0012547

4

0.0022053

8

0.0021813

12

0.0019085


The initial point used is $x^{0} = (78,33,27,27,27)$. You can call the NLP solver within PROC OPTMODEL to solve this problem by writing the following statements:

proc optmodel;
   number l {1..5} = [78 33 27 27 27];
   number u {1..5} = [102 45 45 45 45];

   number a {1..12} = 
      [85.334407 0.0056858 0.0006262 0.0022053
      80.51249 0.0071317 0.0029955 0.0021813
      9.300961 0.0047026 0.0012547 0.0019085];

   var x {j in 1..5} >= l[j] <= u[j];

   minimize f = 5.35*x[3]^2 + 0.83*x[1]*x[5] + 37.29*x[1] 
                  - 40792.141;

   con constr1: 
      0 <= a[1] + a[2]*x[2]*x[5] + a[3]*x[1]*x[4] - 
         a[4]*x[3]*x[5] <= 92;
   con constr2: 
      0 <= a[5] + a[6]*x[2]*x[5] + a[7]*x[1]*x[2] + 
         a[8]*x[3]^2 - 90 <= 20;
   con constr3: 
      0 <= a[9] + a[10]*x[3]*x[5] + a[11]*x[1]*x[3] + 
         a[12]*x[3]*x[4] - 20 <= 5;

   x[1] = 78;
   x[2] = 33;
   x[3] = 27;
   x[4] = 27;
   x[5] = 27;

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

The summaries and solution are shown in Output 8.3.1.

Output 8.3.1: Summaries and the Optimal Solution

The OPTMODEL Procedure

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

Performance Information
Execution Mode On Client
Number of Threads 2

Solution Summary
Solver NLP
Algorithm Active Set
Objective Function f
Solution Status Optimal
Objective Value -30689.17762
Iterations 26
   
Optimality Error 4.661401E-10
Infeasibility 7.1288936E-8

[1] x
1 78.000
2 33.000
3 29.995
4 45.000
5 36.776