Choose a solver based on problem characteristics and on the type of solution you want. Solver Characteristics contains more information to help you decide which solver is likely to be most suitable. This table gives recommendations that are suitable for most problems.
|Problem Type||Recommended Solver|
|Smooth (objective twice differentiable), and you want a local solution||An appropriate Optimization Toolbox™ solver; see Optimization Decision Table (Optimization Toolbox)|
|Smooth (objective twice differentiable), and you want a global solution or multiple local solutions|
|Nonsmooth, and you want a local solution|
|Nonsmooth, and you want a global solution or multiple local solutions|
patternsearch at multiple points when you have finite bounds
ub on every component, try:
x0 = lb + rand(size(lb)).*(ub - lb);
Many other solvers provide different solution algorithms, including the genetic algorithm
ga and the
particleswarm solver. Try some of them if the
recommended solvers do not perform well on your problem. For details, see Global Optimization Toolbox Solver Characteristics.