Main Content

RandomStartPointSet

Random start points

Description

A RandomStartPointSet object describes how to generate a set of pseudorandom points for use with MultiStart. A RandomStartPointSet object does not contain points. It contains parameters for generating the points when MultiStart runs or when you use the list function.

Creation

Description

rs = RandomStartPointSet creates a default RandomStartPointSet object.

example

rs = RandomStartPointSet(PropertyName=Value) sets properties for the RandomStartPointSet object. For example, rs = RandomStartPointSet(NumStartPoints=50) creates an object that uses 50 start points instead of the default 10.

example

rs = RandomStartPointSet(oldrs,PropertyName=Value) creates a copy of the oldrs RandomStartPointSet object and sets properties of rs.

example

Input Arguments

expand all

Start points description to update, specified as an existing RandomStartPointSet object.

Output Arguments

expand all

Random start points description, returned as a RandomStartPointSet object. The description rs enables MultiStart and list to create start points.

Properties

expand all

Absolute value of the default bounds for unbounded components, specified as a positive scalar.

Example: 1e2

Data Types: double

Number of start points, specified as a positive integer.

Example: 40

Data Types: double

Object Functions

listList start points

Examples

collapse all

Create a default RandomStartPointSet object.

rs = RandomStartPointSet
rs = 
  RandomStartPointSet with properties:

     NumStartPoints: 10
    ArtificialBound: 1000

Create a RandomStartPointSet object for 40 points.

rs = RandomStartPointSet(NumStartPoints=40);

Create a problem with 3-D variables, lower bounds of 0, and upper bounds of [10,20,30].

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

Create a RandomStartPointSet object that generates 50 points.

rs = RandomStartPointSet(NumStartPoints=50)
rs = 
  RandomStartPointSet with properties:

     NumStartPoints: 50
    ArtificialBound: 1000

Update rs to use 100 points and an artificial bound of 1e4.

rs = RandomStartPointSet(rs,NumStartPoints=100,ArtificialBound=1e4)
rs = 
  RandomStartPointSet with properties:

     NumStartPoints: 100
    ArtificialBound: 10000

You can also update properties using dot notation.

rs.ArtificialBound = 500
rs = 
  RandomStartPointSet with properties:

     NumStartPoints: 100
    ArtificialBound: 500

Version History

Introduced in R2010a