List start points
CustomStartPointSet object with 64 three-dimensional points.
[x,y,z] = meshgrid(1:4); ptmatrix = [x(:),y(:),z(:)] + [10,20,30]; tpoints = CustomStartPointSet(ptmatrix);
tpoints is the
ptmatrix matrix contained in a
Extract the original matrix from the
tpoints object by using
tpts = list(tpoints);
Check that the
tpts output is identical to
ans = logical 1
RandomStartPointSet object for 40 points.
rs = RandomStartPointSet('NumStartPoints',40);
Create a problem with 3-D variables, lower bounds of 0, and upper bounds of
problem = createOptimProblem('fmincon','x0',rand(3,1),'lb',zeros(3,1),'ub',[10,20,30]);
Generate a random set of 40 points consistent with the problem.
points = list(rs,problem);
Examine the maximum and minimum generated components.
largest = max(max(points))
largest = 29.8840
smallest = min(min(points))
smallest = 0.1390
tpoints— Start points
Start points, specified as a
list extracts the points into a matrix where each row
is one start point.
rs— Start points description
Start points description, specified as a
list generates start points using the
NumStartPoints (number of points) and
ArtificialBound (artificial bounds) properties of
list uses the
x0 field in
problem to determine
the number of variables in the start points.
the bounds in
problem as follows:
list generates points uniformly within
If a component has no bounds,
list uses a lower bound of
-ArtificialBound and an upper bound of
If a component has a lower bound
lb but no
list uses an upper
lb + 2*ArtificialBound.
Similarly, if a component has an upper bound
but no lower bound,
list uses a
lower bound of
ub - 2*ArtificialBound.
problem— Problem description
points— Start points
Start points, returned as a
matrix. Each row of the matrix represents one start point.