|On this page…|
A solver object contains your preferences for the global portion of the optimization.
You do not need to set any preferences. Create a GlobalSearch object named gs with default settings as follows:
gs = GlobalSearch;
Similarly, create a MultiStart object named ms with default settings as follows:
ms = MultiStart;
Global options are properties of a GlobalSearch or MultiStart object.
Properties for both GlobalSearch and MultiStart
|Display||Detail level of iterative display. Set to 'off' for no display, 'final' (default) for a report at the end of the run, or 'iter' for reports as the solver progresses. For more information and examples, see Iterative Display.|
|TolFun||Solvers consider objective function values within TolFun of each other to be identical (not distinct). Default: 1e-6. Solvers group solutions when the solutions satisfy both TolFun and TolX tolerances.|
|TolX||Solvers consider solutions within TolX distance of each other to be identical (not distinct). Default: 1e-6. Solvers group solutions when the solutions satisfy both TolFun and TolX tolerances.|
|MaxTime||Solvers halt if the run exceeds MaxTime seconds, as measured by a clock (not processor seconds). Default: Inf|
|StartPointsToRun||Choose whether to run 'all' (default) start points, only those points that satisfy 'bounds', or only those points that are feasible with respect to bounds and inequality constraints with 'bounds-ineqs'. For an example, see Optimize Using Only Feasible Start Points.|
|OutputFcns||Functions to run after each local solver run. See Output Functions for GlobalSearch and MultiStart. Default: |
|PlotFcns||Plot functions to run after each local solver run. See Plot Functions for GlobalSearch and MultiStart. Default: |
Properties for GlobalSearch
|NumTrialPoints||Number of trial points to examine. Default: 1000|
|BasinRadiusFactor||See Properties for detailed descriptions of these properties.|
Properties for MultiStart
|UseParallel||When true, MultiStart attempts to distribute start points to multiple processors for the local solver. Disable by setting to false (default). For details, see How to Use Parallel Processing. For an example, see Parallel MultiStart.|
Suppose you want to solve a problem and:
Consider local solutions identical if they are within 0.01 of each other and the function values are within the default TolFun tolerance.
Spend no more than 2000 seconds on the computation.
To solve the problem, create a GlobalSearch object gs as follows:
gs = GlobalSearch('TolX',0.01,'MaxTime',2000);
Suppose you want to solve a problem such that:
You consider local solutions identical if they are within 0.01 of each other and the function values are within the default TolFun tolerance.
You spend no more than 2000 seconds on the computation.
To solve the problem, create a MultiStart object ms as follows:
ms = MultiStart('TolX',0.01,'MaxTime',2000);