This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Class: RandomStartPointSet

Generate start points


points = list(RandSet,problem)


points = list(RandSet,problem) generates pseudorandom start points using the parameters in the RandSet RandomStartPointSet object, and information from the problem problem structure.

Input Arguments


A RandomStartPointSet object. This contains parameters for generating the points: number of points, and artificial bounds.


An optimization problem structure. list generates points uniformly within the bounds of the problem structure. If a component is unbounded, list uses the artificial bounds from RandSet. list takes the dimension of the points from the x0 field in problem.

Output Arguments


A k-by-n matrix. The number of rows k is the number of start points that RandSet specifies. The number of columns n is the dimension of the start points. n is equal to the number of elements in the x0 field in problem. The MultiStart algorithm uses each row of points as an initial point in an optimization.


Create a matrix representing 40 seven-dimensional start points:

rs = RandomStartPointSet('NumStartPoints',40); % 40 points
problem = createOptimProblem('fminunc','x0',ones(7,1),...
ptmatrix = list(rs,problem); % matrix values between 
   % -1000 and 1000 since those are the default bounds 
   % for unconstrained dimensions

Related Examples


The list method generates a pseudorandom random matrix using the default random number stream. Each row of the matrix represents a start point to run. list generates points that satisfy the bounds in problem. If lb is the vector of lower bounds, ub is the vector of upper bounds, there are n dimensions in a point, and there are k rows in the matrix, the random matrix is

lb + (ub - lb).*rand(k,n)
  • If a component has no bounds, RandomStartPointSet uses a lower bound of -ArtificialBound, and an upper bound of ArtificialBound.

  • If a component has a lower bound lb, but no upper bound, RandomStartPointSet uses an upper bound of lb + 2*ArtificialBound.

  • Similarly, if a component has an upper bound ub, but no lower bound, RandomStartPointSet uses a lower bound of ub - 2*ArtificialBound.

The default value of ArtificialBound is 1000.

To obtain identical pseudorandom results, reset the default random number stream. See Reproduce Results.

Was this topic helpful?