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
Option | Description | Values |
---|---|---|
Algorithm | Algorithm used by For examples of algorithm effects, see Explore patternsearch Algorithms and Explore patternsearch Algorithms in Optimize Live Editor Task. | {"classic"} | "nups" |
"nups-gps" | "nups-mads" |
Cache | With Note
|
|
CacheSize | Size of the history. | Nonnegative scalar | |
CacheTol | Largest distance from the current mesh point to any point in the
history in order for | Nonnegative scalar | |
| Tolerance on constraints. For an options structure, use | Positive scalar | |
| Level of display, meaning how much information | "off" | "iter" | "diagnose" |
{"final"} |
FunctionTolerance | Tolerance on the function. Iterations stop if the change in
function value is less than For an options structure, use
| Nonnegative scalar | |
InitialMeshSize | Initial mesh size for the algorithm. See How Pattern Search Polling Works. | Positive scalar | |
InitialPenalty | Initial value of the penalty parameter. See Nonlinear Constraint Solver Algorithm for Pattern Search. | Positive scalar | |
| Maximum number of objective function evaluations. For an options structure, use | Nonnegative integer | |
| Maximum number of iterations. For an options structure, use | Nonnegative integer | |
MaxMeshSize | Maximum mesh size used in a poll or search step. See How Pattern Search Polling Works. | Nonnegative scalar | |
| Total time (in seconds) allowed for optimization. For an options structure, use | Nonnegative scalar | |
MeshContractionFactor | Mesh contraction factor for an unsuccessful iteration. This option applies only when For an options structure, use
| Positive scalar | |
MeshExpansionFactor | Mesh expansion factor for a successful iteration. This option applies only when For an options structure, use
| Positive scalar | |
MeshRotate | Flag to rotate the pattern before declaring a point to be optimum. See Mesh Options. This option applies only when |
|
| Tolerance on the mesh size. For an options structure, use
| Nonnegative scalar | |
| Function called by an optimization function at each iteration. Specify as a function handle or a cell array of function handles. For an options
structure, use | |
PenaltyFactor | Penalty update parameter. See Nonlinear Constraint Solver Algorithm for Pattern Search. | Positive scalar | |
| 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
|
|
PlotInterval | Number of iterations for plots. | positive integer | |
| Polling strategy used in the pattern search. This option applies only when Note You cannot use MADS polling when the problem has linear equality constraints. |
|
PollOrderAlgorithm | Order of the poll directions in the pattern search. This option applies only when For an options structure, use
|
|
ScaleMesh | Automatic scaling of variables. For an options
structure, use |
|
SearchFcn | Type of search used in the pattern search. Specify as a name or a function handle. For an options structure, use
|
|
StepTolerance | Tolerance on the variable. Iterations stop if both the change in
position and the mesh size are less than
For an options structure, use
| Nonnegative scalar | |
TolBind | Binding tolerance. See Constraint Parameters. | Nonnegative scalar | |
UseCompletePoll | Flag to complete the poll around the current point. See How Pattern Search Polling Works. This option applies only when Note For the Beginning in R2019a, when you set the
For an options structure, use |
|
UseCompleteSearch | Flag to complete the search around the current point when the search method is a poll method. See Searching and Polling. This option applies only when Note For the For an options structure, use |
|
| Flag to compute objective and nonlinear constraint functions in parallel. See Vectorized and Parallel Options and How to Use Parallel Processing in Global Optimization Toolbox. Note For the Beginning in R2019a, when you set the
Note
|
|
| Specifies whether functions are vectorized. See Vectorized and Parallel Options and Vectorize the Objective and Constraint Functions. Note For the For an options structure, use |
|