Nonlinear Optimization Examples |
Printing the Optimization History |
Each optimization and least squares subroutine prints the optimization history, as long as opt and you do not specify the "ptit" module argument. You can use this output to check for possible convergence problems. If you specify the "ptit" argument, you can enter a print command inside the module, which is called at each iteration.
The amount of information printed depends on the opt[2] argument. See the section Options Vector.
The output consists of three main parts:
Optimization Start Output
The following information about the initial state of the optimization can be printed:
the number of constraints that are active at the starting point, or, more precisely, the number of constraints that are currently members of the working set. If this number is followed by a plus sign (), there are more active constraints, at least one of which is temporarily released from the working set due to negative Lagrange multipliers.
the value of the objective function at the starting point
the value of the largest absolute (projected) gradient element
the initial trust-region radius for the NLPTR and NLPLM subroutines
General Iteration History
In general, the iteration history consists of one line of printed output for each iteration, with the exception of the Nelder-Mead simplex method. The NLPNMS subroutine prints a line only after several internal iterations because some of the termination tests are time-consuming compared to the simplex operations and because the subroutine typically uses many iterations.
The iteration history always includes the following columns:
iter is the iteration number.
nrest is the number of iteration restarts.
nfun is the number of function calls.
act is the number of active constraints.
optcrit is the value of the optimization criterion.
difcrit is the difference between adjacent function values.
maxgrad is the maximum of the absolute (projected) gradient components.
An apostrophe trailing the number of active constraints indicates that at least one of the active constraints was released from the active set due to a significant Lagrange multiplier.
Some subroutines print additional information at each iteration; for details see the entry that corresponds to each subroutine in the section Nonlinear Optimization and Related Subroutines.
Optimization Result Output
The output ends with the following information about the optimization result:
the number of constraints that are active at the final point, or more precisely, the number of constraints that are currently members of the working set. When this number is followed by a plus sign (), there are more active constraints, at least one of which is temporarily released from the working set due to negative Lagrange multipliers.
the value of the objective function at the final point
the value of the largest absolute (projected) gradient element
Copyright © SAS Institute, Inc. All Rights Reserved.