Documentation |
Find global minimum
A GlobalSearch object contains properties (options) that affect how the run method searches for a global minimum, or generates a GlobalOptimSolution object.
gs = GlobalSearch constructs a new global search optimization solver with its properties set to the defaults.
gs = GlobalSearch('PropertyName',PropertyValue,...) constructs the object using options, specified as property name and value pairs.
gs = GlobalSearch(oldgs,'PropertyName',PropertyValue,...) constructs a copy of the GlobalSearch solver oldgs. The gs object has the named properties altered with the specified values.
gs = GlobalSearch(ms) constructs gs, a GlobalSearch solver, with common parameter values from the ms MultiStart solver.
BasinRadiusFactor |
A basin radius decreases after MaxWaitCycle consecutive start points are within the basin. The basin radius decreases by a factor of 1 – BasinRadiusFactor. Set BasinRadiusFactor to 0 to disable updates of the basin radius. Default: 0.2 |
Display |
Detail level of iterative display. Possible values:
Default: 'final' |
DistanceThresholdFactor |
A multiplier for determining whether a trial point is in an existing basin of attraction. For details, see Examine Stage 2 Trial Point to See if fmincon Runs. Default: 0.75 |
MaxTime |
Time in seconds for a run. GlobalSearch halts when it sees MaxTime seconds have passed since the beginning of the run. Default: Inf |
MaxWaitCycle |
A positive integer tolerance appearing in several points in the algorithm:
Default: 20 |
NumStageOnePoints |
Number of start points in Stage 1. For details, see Obtain Stage 1 Start Point, Run. Default: 200 |
NumTrialPoints |
Number of potential start points to examine in addition to x0 from the problem structure. GlobalSearch runs only those potential start points that pass several tests. For more information, see GlobalSearch Algorithm. Default: 1000 |
OutputFcns |
A function handle or cell array of function handles to output functions. Output functions run after each local solver call. They also run when the global solver starts and ends. Write your output functions using the syntax described in OutputFcns. See GlobalSearch Output Function. Default: [] |
PenaltyThresholdFactor |
Determines increase in the penalty threshold. For details, see React to Large Counter Values. Default: 0.2 |
PlotFcns |
A function handle or cell array of function handles to plot functions. Plot functions run after each local solver call. They also run when the global solver starts and ends. Write your plot functions using the syntax described in OutputFcns. There are two built-in plot functions:
Default: [] |
StartPointsToRun |
Directs the solver to exclude certain start points from being run:
GlobalSearch checks the StartPointsToRun property only during Stage 2 of the GlobalSearch algorithm (the main loop). For more information, see GlobalSearch Algorithm. Default: 'all' |
TolFun |
Describes how close two objective function values must be for solvers to consider them identical for creating the vector of local solutions. Solvers consider two solutions identical if they are within TolX distance of each other and have objective function values within TolFun of each other. If both conditions are not met, solvers report the solutions as distinct. Set TolFun to 0 to obtain the results of every local solver run. Set TolFun to a larger value to have fewer results. Default: 1e-6 |
TolX |
Describes how close two points must be for solvers to consider them identical for creating the vector of local solutions. Solvers compute the distance between a pair of points with norm, the Euclidean distance. Solvers consider two solutions identical if they are within TolX distance of each other and have objective function values within TolFun of each other. If both conditions are not met, solvers report the solutions as distinct. Set TolX to 0 to obtain the results of every local solver run. Set TolX to a larger value to have fewer results. Default: 1e-6 |
Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB^{®} Programming Fundamentals documentation.
Solve a problem using a default GlobalSearch object:
opts = optimoptions(@fmincon,'Algorithm','interior-point'); problem = createOptimProblem('fmincon','objective',... @(x) x.^2 + 4*sin(5*x),'x0',3,'lb',-5,'ub',5,'options',opts); gs = GlobalSearch; [x,f] = run(gs,problem)
A detailed description of the algorithm appears in GlobalSearch Algorithm. Ugray et al. [1] describes both the algorithm and the scatter-search method of generating trial points.
[1] Ugray, Zsolt, Leon Lasdon, John Plummer, Fred Glover, James Kelly, and Rafael Martí. Scatter Search and Local NLP Solvers: A Multistart Framework for Global Optimization. INFORMS Journal on Computing, Vol. 19, No. 3, 2007, pp. 328–340.