psoptimset

Create pattern search options structure

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.

OptionDescriptionValues
Cache

With Cache set to 'on', patternsearch keeps a history of the mesh points it polls and does not poll points close to them again at subsequent iterations. Use this option if patternsearch runs slowly because it is taking a long time to compute the objective function. If the objective function is stochastic, it is advised not to use this option.

'on' | {'off'}
CacheSize

Size of the history

Positive scalar | {1e4}

CacheTol

Positive scalar specifying how close the current mesh point must be to a point in the history in order for patternsearch to avoid polling it. Use if 'Cache' option is set to 'on'.

Positive scalar | {eps}

CompletePoll

Complete poll around current iterate

'on' | {'off'}
CompleteSearch

Complete search around current iterate when the search method is a poll method

'on' | {'off'}
Display

Level of display

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

Initial mesh size for pattern algorithm

Positive scalar | {1.0}

InitialPenalty

Initial value of the penalty parameter

Positive scalar | {10}

MaxFunEvals

Maximum number of objective function evaluations

Positive integer | {2000*numberOfVariables}

MaxIter

Maximum number of iterations

Positive integer | {100*numberOfVariables}

MaxMeshSize

Maximum mesh size used in a poll/search step

Positive scalar | {Inf}

MeshAccelerator

Accelerate convergence near a minimum

'on'| {'off'}
MeshContraction

Mesh contraction factor, used when iteration is unsuccessful

Positive scalar | {0.5}
MeshExpansion

Mesh expansion factor, expands mesh when iteration is successful

Positive scalar | {2.0}

MeshRotate

Rotate the pattern before declaring a point to be optimum

'off' | {'on'}
OutputFcns

Specifies a user-defined function that an optimization function calls at each iteration

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

PenaltyFactor

Penalty update parameter

Positive scalar| {100}

PlotFcns

Specifies plots of output from the pattern search

@psplotbestf | @psplotmeshsize | @psplotfuncount | @psplotbestx | {[]}

PlotInterval

Specifies that plot functions will be called at every interval

{1}

PollingOrder

Order of poll directions in pattern search

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

PollMethod

Polling strategy used in pattern search

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

ScaleMesh

Automatic scaling of variables

{'on'} | 'off'
SearchMethod

Type of search used in pattern search

@GPSPositiveBasis2N | @GPSPositiveBasisNp1 | @GSSPositiveBasis2N | @GSSPositiveBasisNp1 | @MADSPositiveBasis2N | @MADSPositiveBasisNp1 | @searchga | @searchlhs | @searchneldermead | {[]}
TimeLimit

Total time (in seconds) allowed for optimization

Positive scalar | {Inf}

TolBind

Binding tolerance

Positive scalar | {1e-3}

TolCon

Tolerance on constraints

Positive scalar | {1e-6}

TolFun

Tolerance on function, stop if both the change in function value and the mesh size are less than TolFun

Positive scalar | {1e-6}

TolMesh

Tolerance on mesh size

Positive scalar | {1e-6}

TolX

Tolerance on variable, stop if both the change in position and the mesh size are less than TolX

Positive scalar | {1e-6}

UseParallel

Compute objective and nonlinear constraint functions in parallel, see Vectorize and Parallel Options (User Function Evaluation) and How to Use Parallel Processing.

true | {false}

Vectorized

Specifies whether functions are vectorized, see Vectorize and Parallel Options (User Function Evaluation) and Vectorize the Objective and Constraint Functions

'on' | {'off'}

Was this topic helpful?