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
2 | At least one local minimum found. Some runs of the local solver converged (had positive exit flag). |
1 | At least one local minimum found. All runs of the local solver converged (had positive exit flag). |
0 | No local minimum found. Local solver called at least once,
and at least one local solver exceeded the MaxIterations or MaxFunctionEvaluations tolerances. |
-1 | Solver stopped by output function or plot function. |
-2 | No feasible local minimum found. |
-5 | MaxTime limit exceeded. |
-8 | No solution found. All runs had local solver exit flag -1 or
smaller. |
-10 | Failures 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 ([]).