Optimization Decision Table
The following table is designed to help you choose a solver. It does not address multiobjective optimization or equation solving. There are more details on all the solvers in Problems Handled by Optimization Toolbox Functions.
In this table:
* means relevant solvers are found in Global Optimization Toolbox (Global Optimization Toolbox) functions (licensed separately from Optimization Toolbox™ solvers).
fmincon
applies to most smooth objective functions with smooth constraints. It is not listed as a preferred solver for least squares or linear or quadratic programming because the listed solvers are usually more efficient.The table has suggested functions, but it is not meant to unduly restrict your choices. For example,
fmincon
can be effective on some nonsmooth problems.The Global Optimization Toolbox
ga
(Global Optimization Toolbox) andsurrogateopt
(Global Optimization Toolbox) functions can address mixed-integer nonlinear programming problems.The Statistics and Machine Learning Toolbox™
bayesopt
(Statistics and Machine Learning Toolbox) function can address low-dimensional deterministic or stochastic optimization problems with combinations of continuous, integer, or categorical variables.
Solvers by Objective and Constraint
Constraint Type | Objective Type | ||||
---|---|---|---|---|---|
Linear | Quadratic | Least Squares | Smooth Nonlinear | Nonsmooth | |
None | n/a (f = const, or min = ) | quadprog , Information | mldivide , lsqcurvefit , lsqnonlin , Information | fminsearch , fminunc , Information | fminsearch , * |
Bound | linprog , Information | quadprog , Information | lsqcurvefit , lsqlin , lsqnonlin , lsqnonneg , Information | fminbnd , fmincon , fseminf , Information | fminbnd , * |
Linear | linprog , Information | quadprog , Information | lsqcurvefit , lsqlin , lsqnonlin , Information | fmincon , fseminf , Information | * |
Cone | coneprog , Information | fmincon , Information | lsqcurvefit , fmincon , lsqnonlin , Information | fmincon , Information | * |
General Smooth | fmincon , Information | fmincon , Information | lsqcurvefit , fmincon , lsqnonlin , Information | fmincon , fseminf , Information | * |
Discrete, with Bound or Linear | intlinprog , Information | * | * | * | * |
Note
This table does not list multiobjective solvers nor equation solvers. See Problems Handled by Optimization Toolbox Functions for a complete list of problems addressed by Optimization Toolbox functions.
Note
Some solvers have several algorithms. For help choosing, see Choosing the Algorithm.