Single Solution
You obtain the single best solution found during the run by calling run
with the syntax
[x,fval,exitflag,output] = run(...);
x
is the location of the local minimum with smallest objective function value.fval
is the objective function value evaluated atx
.exitflag
is an exit flag for the global solver. Values:Global Solver Exit Flags
2
At least one feasible local minimum found. Some runs of the local solver did not converge. 1
At least one feasible 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
orMaxFunctionEvaluations
tolerances.-1
One or more local solver runs stopped by the local solver output or plot function. -2
No feasible local minimum found. -5
MaxTime
limit exceeded.-8
No solution found. All runs had local solver exit flag -2
or lower, not all equal-2
.-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 exitflag > 0
. If
exitflag <= 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 thanproblem.options.ConstraintTolerance
.If no solutions are feasible,
x
is the solution with lowest infeasibility.If no solutions exist,
x
,fval
, andoutput
are empty entries ([]
).