optimization workflow
to solve an optimization problem:
decide what type of problem you have, and whether you want a local or global solution (see ). choose a solver per the recommendations in .
write your objective function and, if applicable, constraint functions per the syntax in and .
set appropriate options using , or prepare a
globalsearch
ormultistart
problem as described in . for details, see pattern search options, particle swarm options, genetic algorithm options, , or .run the solver.
examine the result. for information on the result, see solver outputs and iterative display or examine results for
globalsearch
ormultistart
.if the result is unsatisfactory, change options or start points or otherwise update your optimization and rerun it. for information, see global optimization toolbox solver characteristics or improve results. for information on improving solutions that applies mainly to smooth problems, see , , or .