Set Start Points for MultiStart
Four Ways to Set Start Points
There are four ways you tell MultiStart which
start points to use for the local solver:
Pass a positive integer
k.MultiStartgeneratesk - 1start points as if using aRandomStartPointSetobject and theproblemstructure.MultiStartalso uses thex0start point from theproblemstructure, for a total ofkstart points.Pass a
RandomStartPointSetobject.Pass a
CustomStartPointSetobject.Pass a cell array of
RandomStartPointSetandCustomStartPointSetobjects. Pass a cell array if you have some specific points you want to run, but also wantMultiStartto use other random start points.
Note
You can control whether MultiStart uses all
start points, or only those points that satisfy bounds or other inequality
constraints. For more information, see Filter Start Points (Optional).
Positive Integer for Start Points
The syntax for running MultiStart for k start
points is
[xmin,fmin,flag,outpt,allmins] = run(ms,problem,k);
The positive integer k specifies the number
of start points MultiStart uses. MultiStart generates
random start points using the dimension of the problem and bounds
from the problem structure. MultiStart generates k - 1 random start points, and
also uses the x0 start point from the problem structure.
RandomStartPointSet Object for Start Points
Create a RandomStartPointSet object as follows:
stpoints = RandomStartPointSet;
Run MultiStart starting from a
RandomStartPointSet as follows:
[xmin,fmin,flag,outpt,allmins] = run(ms,problem,stpoints);
By default a RandomStartPointSet object generates
10 start points. Control the number of start points with the NumStartPoints property.
For example, to generate 40 start points:
stpoints = RandomStartPointSet('NumStartPoints',40);You can set an ArtificialBound for a RandomStartPointSet.
This ArtificialBound works in conjunction with
the bounds from the problem structure:
If a component has no bounds,
RandomStartPointSetuses a lower bound of-ArtificialBound, and an upper bound ofArtificialBound.If a component has a lower bound
lbbut no upper bound,RandomStartPointSetuses an upper bound oflb + 2*ArtificialBound.Similarly, if a component has an upper bound
ubbut no lower bound,RandomStartPointSetuses a lower bound ofub - 2*ArtificialBound.
For example, to generate 100 start points
with an ArtificialBound of 50:
stpoints = RandomStartPointSet('NumStartPoints',100, ... 'ArtificialBound',50);
A RandomStartPointSet object generates start points with the
same dimension as the x0 point in the problem structure; see
list.
CustomStartPointSet Object for Start Points
To use a specific set of starting points, put the points in a CustomStartPointSet as follows:
Place the starting points in a matrix. Each row of the matrix represents one starting point.
MultiStartruns all the rows of the matrix, subject to filtering with theStartPointsToRunproperty. For more information, see MultiStart Algorithm.Create a
CustomStartPointSetobject from the matrix:tpoints = CustomStartPointSet(ptmatrix);
For example, create a set of 40 five-dimensional points, with each component of a point equal to 10 plus an exponentially distributed variable with mean 25:
pts = -25*log(rand(40,5)) + 10; tpoints = CustomStartPointSet(pts);
Run MultiStart starting from a
CustomStartPointSet as follows:
[xmin,fmin,flag,outpt,allmins] = run(ms,problem,tpoints);
To get the original matrix of points from a CustomStartPointSet object, use list:
pts = list(tpoints); % Assumes tpoints is a CustomStartPointSetA CustomStartPointSet has two properties:
StartPointsDimension and NumStartPoints. You can use these properties to query a
CustomStartPointSet object. For example, the
tpoints object in the example has the following
properties:
tpoints.StartPointsDimension
ans =
5tpoints.NumStartPoints
ans =
40Cell Array of Objects for Start Points
To use a specific set of starting points along with some randomly
generated points, pass a cell array of RandomStartPointSet or CustomStartPointSet objects.
For example, to use both the 40 specific five-dimensional points
of CustomStartPointSet Object for Start Points and 40 additional
five-dimensional points from RandomStartPointSet:
pts = -25*log(rand(40,5)) + 10;
tpoints = CustomStartPointSet(pts);
rpts = RandomStartPointSet('NumStartPoints',40);
allpts = {tpoints,rpts};Run MultiStart starting from the allpts
cell array:
% Assume ms and problem exist
[xmin,fmin,flag,outpt,allmins] = run(ms,problem,allpts);