This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Optimization Workflow

To solve an optimization problem:

  1. Decide what type of problem you have, and whether you want a local or global solution (see Local vs. Global Optima). Choose a solver per the recommendations in Table for Choosing a Solver.

  2. Write your objective function and, if applicable, constraint functions per the syntax in Compute Objective Functions and Write Constraints.

  3. Set appropriate options using optimoptions, or prepare a GlobalSearch or MultiStart problem as described in Workflow for GlobalSearch and MultiStart. For details, see Pattern Search Options, Particle Swarm Options, Genetic Algorithm Options, or Simulated Annealing Options.

  4. Run the solver.

  5. Examine the result. For information on the result, see Solver Outputs and Iterative Display (Optimization Toolbox) or Examine Results for GlobalSearch or MultiStart.

  6. 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 When the Solver Fails (Optimization Toolbox), When the Solver Might Have Succeeded (Optimization Toolbox), or When the Solver Succeeds (Optimization Toolbox).

Related Topics