Tweaking the Optimality tolerance parameter might be necessary if you are confronted with problems related to convergence. As an example, if the optimization solver reports a converged solution after just a few iterations, try to restart it with a tighter tolerance to make sure it has actually found the solution. If, on the contrary, it seems to iterate forever — despite the value of the objective function having converged (check the output on the
Log page in the
Progress window) — chances are that the tolerance value is too strict.
For the derivative-free optimization methods, the optimization tolerance, with a default value of 0.01, is used to determine whether a stationary point has been reached. The Coordinate search,
BOBYQA,
COBYLA, and
Nelder–Mead methods stop iterating as soon as no improvement over the current best estimate can be found with steps in the scaled control variables of relative size larger than or equal to the optimality tolerance.
For SNOPT, the optimality tolerance parameter (corresponding to the major optimality tolerance in
Ref. 5 and further explained together with parameter
Opttol), with a default of 1.0·10
−3, is used by the linear and quadratic solvers to determine, on the basis of the reduced-gradient size, whether optimality has been reached. More precisely, it regulates the accuracy to which the final iterate in SNOPT is required to fulfill the first-order conditions for optimality.
Theoretically the Optimality tolerance should not be set smaller than the square-root of the
function precision. The latter is the expected stability of the numerical model rather than its accuracy as a model of physical reality. When using a direct linear solver on a linear model, the function precision is generally of the same order as the inverse of the condition number. For a nonlinear or iterative solver, you can expect the precision to be of the same order as the solver tolerances, which is then also the numerical precision in the evaluation of the objective and constraints.
Furthermore, even when you set the Optimality tolerance based on the function precision, the same exit condition might occur. At present, the only remedy is to increase the accuracy of the function calculation, using all available means.
The MMA solver terminates when the relative change in all scaled control variables is less than the specified optimality tolerance parameter, with a default of 1e-3. The relative change is defined as the change in the variable since the last outer iteration divided by the range of the variable. The range of the variable is the upper bound minus the lower bound. For unbounded variables, the MMA solver internally estimates bounds based on the previous iteration points.
Let tol be the specified optimality tolerance. Define
told = γd·tol, where
γd is the defect reduction tolerance factor, and
tolx = γx·tol, where
γx is the
control variable tolerance factor. Moreover, let the defect vector be defined by
where ωl and
fl are defined in
Equation 5-6 and
Equation 5-7, and
L is the total number of the measurement evaluations. Then, when the Levenberg–Marquardt solver is used, the following conditions are used to determine when optimality has been reached:
where d0 is the initial defect vector, and
dj is the current defect vector.
where dj is the current defect vector and
J is the Jacobian.
The default values of the optimality tolerance, defect reduction tolerance factor, and control variable tolerance factor are 1.0·10−3, 1, and 1, respectively. The termination condition defined as the first condition above is not used by default and should be enabled in order to be included.