Documentation

MultiStart class

Find multiple local minima

Description

A MultiStart object contains properties (options) that affect how the run method repeatedly runs a local solver, or generates a GlobalOptimSolution object.

Construction

MS = MultiStart constructs MS, a MultiStart solver with its properties set to the defaults.

MS = MultiStart('PropertyName',PropertyValue,...) constructs MS using options, specified as property name and value pairs.

MS = MultiStart(oldMS,'PropertyName',PropertyValue,...) creates a copy of the oldMS MultiStart solver, with the named properties changed to the specified values.

MS = MultiStart(GS) constructs MS, a MultiStart solver, with common parameter values from the GS GlobalSearch solver.

Properties

Display

Detail level of the output to the Command Window:

  • 'final' — Report summary results after run finishes.

  • 'iter' — Report results after each local solver run, in addition to the final summary.

  • 'off' — No display.

Default: final

FunctionTolerance

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 XTolerance distance of each other and have objective function values within FunctionTolerance of each other. If both conditions are not met, solvers report the solutions as distinct. Set FunctionTolerance to 0 to obtain the results of every local solver run. Set FunctionTolerance to a larger value to have fewer results.

Default: 1e-6

MaxTime

Tolerance on the time MultiStart runs. MultiStart and its local solvers halt when they see MaxTime seconds have passed since the beginning of the run. Time means wall clock as opposed to processor cycles.

Default: Inf

OutputFcn

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 OutputFcn. See GlobalSearch Output Function.

Default: []

PlotFcn

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 OutputFcn. There are two built-in plot functions:

  • @gsplotbestf plots the best objective function value.

  • @gsplotfunccount plots the number of function evaluations.

See MultiStart Plot Function.

Default: []

StartPointsToRun

Directs the solver to exclude certain start points from being run:

  • all — Accept all start points.

  • bounds — Reject start points that do not satisfy bounds.

  • bounds-ineqs — Reject start points that do not satisfy bounds or inequality constraints.

Default: all

UseParallel

Distribute local solver calls to multiple processors:

  • true — Distribute the local solver calls to multiple processors.

  • false — Cannot not run in parallel.

Default: false

XTolerance

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 XTolerance distance of each other and have objective function values within FunctionTolerance of each other. If both conditions are not met, solvers report the solutions as distinct. Set XTolerance to 0 to obtain the results of every local solver run. Set XTolerance to a larger value to have fewer results.

Default: 1e-6

Methods

runRun local solver from multiple points

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® Programming Fundamentals documentation.

Examples

Run MultiStart on 20 instances of a problem using the fmincon sqp algorithm:

opts = optimoptions(@fmincon,'Algorithm','sqp');
problem = createOptimProblem('fmincon','objective',...
 @(x) x.^2 + 4*sin(5*x),'x0',3,'lb',-5,'ub',5,'options',opts);
ms = MultiStart;
[x,f] = run(ms,problem,20)

Related Examples

Algorithms

A detailed description of the algorithm appears in MultiStart Algorithm.

Was this topic helpful?