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.

Single Solution

You obtain the single best solution found during the run by calling run with the syntax

[x,fval,eflag,output] = run(...);
  • x is the location of the local minimum with smallest objective function value.

  • fval is the objective function value evaluated at x.

  • eflag is an exit flag for the global solver. Values:

    Global Solver Exit Flags

    2At least one local minimum found. Some runs of the local solver converged (had positive exit flag).
    1At least one local minimum found. All runs of the local solver converged (had positive exit flag).
    0No local minimum found. Local solver called at least once, and at least one local solver exceeded the MaxIterations or MaxFunctionEvaluations tolerances.
    -1Solver stopped by output function or plot function.
    -2No feasible local minimum found.
    -5MaxTime limit exceeded.
    -8No solution found. All runs had local solver exit flag -1 or smaller.
    -10Failures encountered in user-provided functions.
  • output is a structure with details about the multiple runs of the local solver. For more information, see Global Output Structures.

The list of outputs is for the case eflag > 0. If eflag <= 0, then x is the following:

  • If some local solutions are feasible, x represents the location of the lowest objective function value. “Feasible” means the constraint violations are smaller than problem.options.ConstraintTolerance.

  • If no solutions are feasible, x is the solution with lowest infeasibility.

  • If no solutions exist, x, fval, and output are empty entries ([]).

Related Topics