The linearly constrained Betts function (Hock and Schittkowski, 1981) is defined as
The boundary constraints are
The linear constraint is
The following code calls the NLPCG subroutine to solve the optimization problem. The infeasible initial point is specified, and a portion of the output is shown in Figure 14.3.
The NLPCG subroutine performs conjugate gradient optimization. It requires only function and gradient calls. The F_BETTS module represents the Betts function, and since no module is defined to specify the gradient, first-order derivatives are computed by finite-difference approximations. For more information about the NLPCG subroutine, see the section NLPCG Call. For details about the constraint matrix, which is represented by the CON matrix in the preceding code, see the section Parameter Constraints.
Figure 14.3: NLPCG Solution to Betts Problem
Optimization Start | |||||
---|---|---|---|---|---|
Parameter Estimates | |||||
N | Parameter | Estimate | Gradient Objective Function |
Lower Bound Constraint |
Upper Bound Constraint |
1 | X1 | 6.800000 | 0.136000 | 2.000000 | 50.000000 |
2 | X2 | -1.000000 | -2.000000 | -50.000000 | 50.000000 |
Linear Constraints | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 59.00000 | : | 10.0000 | <= | + | 10.0000 | * | X1 | - | 1.0000 | * | X2 |
Parameter Estimates | 2 |
---|---|
Lower Bounds | 2 |
Upper Bounds | 2 |
Linear Constraints | 1 |
Optimization Start | |||
---|---|---|---|
Active Constraints | 0 | Objective Function | -98.5376 |
Max Abs Gradient Element | 2 |
Iteration | Restarts | Function Calls |
Active Constraints |
Objective Function |
Objective Function Change |
Max Abs Gradient Element |
Step Size |
Slope of Search Direction |
||
---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | 3 | 0 | -99.54682 | 1.0092 | 0.1346 | 0.502 | -4.018 | ||
2 | 1 | 7 | 1 | -99.96000 | 0.4132 | 0.00272 | 34.985 | -0.0182 | ||
3 | 2 | 9 | 1 | -99.96000 | 1.851E-6 | 0 | 0.500 | -74E-7 |
Optimization Results | |||
---|---|---|---|
Iterations | 3 | Function Calls | 10 |
Gradient Calls | 9 | Active Constraints | 1 |
Objective Function | -99.96 | Max Abs Gradient Element | 0 |
Slope of Search Direction | -7.398365E-6 |
Optimization Results | ||||
---|---|---|---|---|
Parameter Estimates | ||||
N | Parameter | Estimate | Gradient Objective Function |
Active Bound Constraint |
1 | X1 | 2.000000 | 0.040000 | Lower BC |
2 | X2 | -1.24028E-10 | 0 |
Linear Constraints Evaluated at Solution | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 10.00000 | = | -10.0000 | + | 10.0000 | * | X1 | - | 1.0000 | * | X2 |
Since the initial point is infeasible, the subroutine first computes a feasible starting point. Convergence is achieved after three iterations, and the optimal point is given to be with an optimal function value of . For more information about the printed output, see the section Printing the Optimization History.