Main Content

Tolerance Details

Optimization Toolbox™ solvers use tolerances to decide when to stop iterating and to measure solution quality. See Tolerances and Stopping Criteria.

For the four most important tolerances, this section describes which tolerances are relative, meaning scale in some sense with problem size or values, and which are absolute, meaning do not scale with the problem. In the following table,

  • R means Relative.

  • A means Absolute.

  • . means inapplicable.

  • A* means Absolute when the tolerances are checked; however, preprocessing can scale the entries to some extent, so the tolerances can be considered relative.

  • A*, R means the constraints are first checked as Absolute. If this check passes, the solver returns a positive exit flag. If this check fails then the constraints are checked as Relative. If this check passes, the solver returns a positive exit flag with "poor feasibility". If this check fails, the solver returns a negative exit flag.

Tolerances by Solver and Algorithm

SolverAlgorithmOptimality ToleranceFunction ToleranceStep ToleranceConstraint Tolerance
fmincon'interior-point'R.RR
'sqp'R.RR
'sqp-legacy'R.RR
'active-set'AAAA
'trust-region-reflective'ARA.
fminunc'quasi-newton'R.R.
'trust-region'ARA.
fminsearch .AA.
fminbnd .AR.
fseminf AAAA
fgoalattain AAAA
fminimax AAAA
linprog'dual-simplex'A*..A*, R
'interior-point'R..R
'interior-point-legacy'R...
intlinprog A*..A*, R
quadprog'interior-point-convex'R.RR
'trust-region-reflective', boundsARA.
'trust-region-reflective', linear equalities....
'active-set'R.AR
coneprog R  R
lsqlin'interior-point'R.RR
'trust-region-reflective'ARA.
lsqnonneg ..R.
lsqnonlin'trust-region-reflective'ARA.
'levenberg-marquardt'RRR.
lsqcurvefit'trust-region-reflective'ARA.
'levenberg-marquardt'RRR.
fsolve'trust-region-dogleg'ARR.
'trust-region'ARA.
'levenberg-marquardt'RRR.
fzero ..R.

Related Topics