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
Solver | Algorithm | Optimality Tolerance | Function Tolerance | Step Tolerance | Constraint Tolerance |
---|---|---|---|---|---|
fmincon | 'interior-point' | R | . | R | R |
'sqp' | R | . | R | R | |
'sqp-legacy' | R | . | R | R | |
'active-set' | A | A | A | A | |
'trust-region-reflective' | A | R | A | . | |
fminunc | 'quasi-newton' | R | . | R | . |
'trust-region' | A | R | A | . | |
fminsearch | . | A | A | . | |
fminbnd | . | A | R | . | |
fseminf | A | A | A | A | |
fgoalattain | A | A | A | A | |
fminimax | A | A | A | A | |
linprog | 'dual-simplex' | A* | . | . | A*, R |
'interior-point' | R | . | . | R | |
'interior-point-legacy' | R | . | . | . | |
intlinprog | A* | . | . | A*, R | |
quadprog | 'interior-point-convex' | R | . | R | R |
'trust-region-reflective' , bounds | A | R | A | . | |
'trust-region-reflective' , linear
equalities | . | . | . | . | |
'active-set' | R | . | A | R | |
coneprog | R | R | |||
lsqlin | 'interior-point' | R | . | R | R |
'trust-region-reflective' | A | R | A | . | |
lsqnonneg | . | . | R | . | |
lsqnonlin | 'trust-region-reflective' | A | R | A | . |
'levenberg-marquardt' | R | R | R | . | |
lsqcurvefit | 'trust-region-reflective' | A | R | A | . |
'levenberg-marquardt' | R | R | R | . | |
fsolve | 'trust-region-dogleg' | A | R | R | . |
'trust-region' | A | R | A | . | |
'levenberg-marquardt' | R | R | R | . | |
fzero | . | . | R | . |