Main Content

Set Start Points for MultiStart

Four Ways to Set Start Points

There are four ways you tellMultiStartwhich start points to use for the local solver:

  • Pass apositive integerk.MultiStartgeneratesk - 1start points as if using aRandomStartPointSetobject and theproblemstructure.MultiStartalso uses thex0start point from theproblemstructure, for a total ofkstart points.

  • Pass aRandomStartPointSetobject.

  • Pass aCustomStartPointSetobject.

  • Pass acell arrayofRandomStartPointSetandCustomStartPointSetobjects. 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 whetherMultiStartuses all start points, or only those points that satisfy bounds or other inequality constraints. For more information, seeFilter Start Points (Optional).

Positive Integer for Start Points

The syntax for runningMultiStartforkstart points is

[xmin,fmin,flag,outpt,allmins] = run(ms,problem,k);

The positive integerkspecifies the number of start pointsMultiStartuses.MultiStartgenerates random start points using the dimension of the problem and bounds from theproblemstructure.MultiStartgeneratesk - 1random start points, and also uses thex0start point from theproblemstructure.

RandomStartPointSet Object for Start Points

Create aRandomStartPointSetobject as follows:

stpoints = RandomStartPointSet;

RunMultiStartstarting from aRandomStartPointSetas follows:

[xmin,fmin,flag,outpt,allmins] = run(ms,problem,stpoints);

By default aRandomStartPointSetobject generates 10 start points. Control the number of start points with theNumStartPointsproperty. For example, to generate 40 start points:

stpoints = RandomStartPointSet('NumStartPoints',40);

You can set anArtificialBoundfor aRandomStartPointSet. ThisArtificialBoundworks in conjunction with the bounds from the problem structure:

  • If a component has no bounds,RandomStartPointSetuses a lower bound of-ArtificialBound和一个上限的ArtificialBound.

  • If a component has a lower boundlbbut no upper bound,RandomStartPointSetuses an upper bound oflb + 2*ArtificialBound.

  • Similarly, if a component has an upper boundubbut no lower bound,RandomStartPointSetuses a lower bound ofub - 2*ArtificialBound.

For example, to generate100start points with anArtificialBoundof50:

stpoints = RandomStartPointSet('NumStartPoints', 100,...'ArtificialBound',50);

ARandomStartPointSetobject generates start points with the same dimension as thex0point in the problem structure; seelist.

CustomStartPointSet Object for Start Points

To use a specific set of starting points, package them in aCustomStartPointSetas follows:

  1. Place the starting points in a matrix. Each row of the matrix represents one starting point.MultiStart运行所有矩阵的行,过滤器ing with theStartPointsToRunproperty. For more information, seeMultiStart Algorithm.

  2. Create aCustomStartPointSetobject 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);

RunMultiStartstarting from aCustomStartPointSetas follows:

[xmin,fmin,flag,outpt,allmins] = run(ms,problem,tpoints);

To get the original matrix of points from aCustomStartPointSetobject, uselist:

pts = list(tpoints);% Assumes tpoints is a CustomStartPointSet

ACustomStartPointSethas two properties:StartPointsDimensionandNumStartPoints. You can use these properties to query aCustomStartPointSetobject. For example, thetpointsobject in the example has the following properties:

tpoints.StartPointsDimension ans = 5 tpoints.NumStartPoints ans = 40

Cell Array of Objects for Start Points

To use a specific set of starting points along with some randomly generated points, pass a cell array ofRandomStartPointSetorCustomStartPointSetobjects.

For example, to use both the 40 specific five-dimensional points ofCustomStartPointSet Object for Start Pointsand 40 additional five-dimensional points fromRandomStartPointSet:

pts = -25*log(rand(40,5)) + 10; tpoints = CustomStartPointSet(pts); rpts = RandomStartPointSet('NumStartPoints',40); allpts = {tpoints,rpts};

RunMultiStartstarting from theallptscell array:

% Assume ms and problem exist[xmin,fmin,flag,outpt,allmins] = run(ms,problem,allpts);

Related Topics