psoptimset

(Not recommended) Create pattern search options structure

psoptimset is not recommended. Use optimoptions instead. For more information, see Compatibility Considerations.

Syntax

psoptimset
options = psoptimset
options = psoptimset(@patternsearch)
options = psoptimset('param1',value1,'param2',value2,...)
options = psoptimset(oldopts,'param1',value1,...)
options = psoptimset(oldopts,newopts)

Description

psoptimset with no input or output arguments displays a complete list of parameters with their valid values.

options = psoptimset (with no input arguments) creates a structure called options that contains the options, or parameters, for patternsearch, and sets parameters to [], indicating patternsearch uses the default values.

options = psoptimset(@patternsearch) creates a structure called options that contains the default values for patternsearch.

options = psoptimset('param1',value1,'param2',value2,...) creates a structure options and sets the value of 'param1' to value1, 'param2' to value2, and so on. Any unspecified parameters are set to their default values. It is sufficient to type only enough leading characters to define the parameter name uniquely. Case is ignored for parameter names.

options = psoptimset(oldopts,'param1',value1,...) creates a copy of oldopts, modifying the specified parameters with the specified values.

options = psoptimset(oldopts,newopts) combines an existing options structure, oldopts, with a new options structure, newopts. Any parameters in newopts with nonempty values overwrite the corresponding old parameters in oldopts.

Options

The following table lists the options you can set with psoptimset. See Pattern Search Options for a complete description of the options and their values. Values in {} denote the default value. You can also view the optimization parameters and defaults by typing psoptimset at the command line.

optimoptions hides the options listed in italics, but psoptimset does not. See Options that optimoptions Hides.

Options for patternsearch and paretosearch

OptionDescriptionValues

ConstraintTolerance

Tolerance on constraints.

For an options structure, use TolCon.

Positive scalar | {1e-6}

Display

Level of display.

'off' | 'iter' | 'diagnose' | {'final'}

MaxFunctionEvaluations

Maximum number of objective function evaluations.

For an options structure, use MaxFunEvals.

Positive integer | {'2000*numberOfVariables'} for patternsearch, {'3000*(numberOfVariables+numberOfObjectives)'} for paretosearch, where numberOfVariables is the number of problem variables, and numberOfObjectives is the number of objective functions

MaxIterations

Maximum number of iterations.

For an options structure, use MaxIter.

Positive integer | {'100*numberOfVariables'} for patternsearch, {'100*(numberOfVariables+numberOfObjectives)'} for paretosearch, where numberOfVariables is the number of problem variables, and numberOfObjectives is the number of objective functions

MaxTime

Total time (in seconds) allowed for optimization.

For an options structure, use TimeLimit.

Positive scalar | {Inf}

MeshTolerance

Tolerance on the mesh size.

For an options structure, use TolMesh.

Positive scalar | {1e-6}

OutputFcn

Function that an optimization function calls at each iteration. Specify as a function handle or a cell array of function handles.

For an options structure, use OutputFcns.

Function handle or cell array of function handles | {[]}

PlotFcn

Plots of output from the pattern search. Specify as the name of a built-in plot function, a function handle, or a cell array of names of built-in plot functions or function handles.

For an options structure, use PlotFcns.

{[]} | For both patternsearch and paretosearch: 'psplotfuncount' | custom plot function

For paretosearch only with multiple objectives: 'psplotdistance' | 'psplotmaxconstr' | 'psplotparetof' | 'psplotparetox' | 'psplotspread' | 'psplotvolume'

For patternsearch only or paretosearch with a single objective: 'psplotbestf' | 'psplotmeshsize' | 'psplotbestx'

PollMethod

Polling strategy used in the pattern search.

{'GPSPositiveBasis2N'} | 'GPSPositiveBasisNp1' | 'GSSPositiveBasis2N' | 'GSSPositiveBasisNp1' | 'MADSPositiveBasis2N' | 'MADSPositiveBasisNp1'

For paretosearch only: {'GSSPositiveBasis2np2'}

UseParallel

Compute objective and nonlinear constraint functions in parallel. See Vectorized and Parallel Options (User Function Evaluation) and How to Use Parallel Processing in Global Optimization Toolbox.

true | {false}

UseVectorized

Specifies whether functions are vectorized. See Vectorized and Parallel Options (User Function Evaluation) and Vectorize the Objective and Constraint Functions.

For an options structure, use Vectorized = 'on' or 'off'.

true | {false}

Options for paretosearch Only

OptionDescriptionValues

InitialPoints

Initial points for paretosearch. Use one of these data types:

  • Matrix with nvars columns, where each row represents one initial point.

  • Structure containing the following fields (all fields are optional except X0):

    • X0 — Matrix with nvars columns, where each row represents one initial point.

    • Fvals — Matrix with numObjectives columns, where each row represents the objective function values at the corresponding point in X0.

    • Cineq — Matrix with numIneq columns, where each row represents the nonlinear inequality constraint values at the corresponding point in X0.

paretosearch computes any missing values in the Fvals and Cineq fields.

Matrix with nvars columns | structure | {[]}

MinPollFraction

Minimum fraction of the pattern to poll.

Scalar from 0 through 1 | {0}

ParetoSetSize

Number of points in the Pareto set.

Positive integer | {'max(numberOfObjectives, 60)'}, where numberOfObjectives is the number of objective functions

ParetoSetChangeTolerance

The solver stops when the relative change in a stopping measure over a window of iterations is less than or equal to ParetoSetChangeTolerance.

  • For three or fewer objectives, paretosearch uses the volume and spread measures.

  • For four or more objectives, paretosearch uses the spread and distance measures.

See Definitions for paretosearch Algorithm.

The solver stops when the relative change in any applicable measure is less than ParetoSetChangeTolerance, or the maximum of the squared Fourier transforms of the time series of these measures is relatively small. See paretosearch Algorithm.

Note

Setting ParetoSetChangeTolerance < sqrt(eps) ~ 1.5e-8 is not recommended.

Positive scalar | {1e-4}

Options for patternsearch Only

OptionDescriptionValues
Cache

With Cache set to 'on', patternsearch keeps a history of the mesh points it polls. At subsequent iterations, patternsearch does not poll points close to those already polled. Use this option if patternsearch runs slowly while computing the objective function. If the objective function is stochastic, do not use this option.

'on' | {'off'}

CacheSize

Size of the history.

Positive scalar | {1e4}

CacheTol

Largest distance from the current mesh point to any point in the history in order for patternsearch to avoid polling the current point. Use if Cache option is set to 'on'.

Positive scalar | {eps}

FunctionTolerance

Tolerance on the function. Iterations stop if the change in function value is less than FunctionTolerance and the mesh size is less than StepTolerance. This option does not apply to MADS polling.

For an options structure, use TolFun.

Positive scalar | {1e-6}

InitialMeshSize

Initial mesh size for the algorithm. See How Pattern Search Polling Works.

Positive scalar | {1.0}

InitialPenalty

Initial value of the penalty parameter. See Nonlinear Constraint Solver Algorithm.

Positive scalar | {10}

MaxMeshSize

Maximum mesh size used in a poll or search step. See How Pattern Search Polling Works.

Positive scalar | {Inf}

MeshContractionFactor

Mesh contraction factor for unsuccessful iteration.

For an options structure, use MeshContraction.

Positive scalar | {0.5}

MeshExpansionFactor

Mesh expansion factor for successful iteration.

For an options structure, use MeshExpansion.

Positive scalar | {2.0}

MeshRotate

Rotate the pattern before declaring a point to be optimum. See Mesh Options.

'off' | {'on'}

PenaltyFactor

Penalty update parameter. See Nonlinear Constraint Solver Algorithm.

Positive scalar | {100}

PlotInterval

Specifies that plot functions are called at every interval.

positive integer | {1}

PollOrderAlgorithm

Order of poll directions in pattern search.

For an options structure, use PollingOrder.

'Random' | 'Success' | {'Consecutive'}

ScaleMesh

Automatic scaling of variables.

For an options structure, use ScaleMesh = 'on' or 'off'.

{true}| false

SearchFcn

Type of search used in pattern search. Specify as a name or a function handle.

For an options structure, use SearchMethod.

'GPSPositiveBasis2N' | 'GPSPositiveBasisNp1' | 'GSSPositiveBasis2N' | 'GSSPositiveBasisNp1' | 'MADSPositiveBasis2N' | 'MADSPositiveBasisNp1' | 'searchga' | 'searchlhs' | 'searchneldermead' | {[]} | custom search function

StepTolerance

Tolerance on the variable. Iterations stop if both the change in position and the mesh size are less than StepTolerance. This option does not apply to MADS polling.

For an options structure, use TolX.

Positive scalar | {1e-6}

TolBind

Binding tolerance. See Constraint Parameters.

Positive scalar | {1e-3}

UseCompletePoll

Complete poll around the current point. See How Pattern Search Polling Works.

For an options structure, use CompletePoll = 'on' or 'off'.

true | {false}

UseCompleteSearch

Complete search around current point when the search method is a poll method. See Searching and Polling.

For an options structure, use CompleteSearch = 'on' or 'off'.

true | {false}

Compatibility Considerations

expand all

Not recommended starting in R2018b

Introduced before R2006a