optimoptions
to Set OptionsBefore R2016a, you set options for some Global Optimization Toolbox solvers by using a dedicated option function:
gaoptimset
for ga
and gamultiobj
psoptimset
for patternsearch
saoptimset
for simulannealbnd
Beginning in R2016a, the recommended way to set options is to
use optimoptions
. (You already
set particleswarm
options using optimoptions
.)
Note
GlobalSearch
and MultiStart
use
a different mechanism for setting properties. See GlobalSearch and MultiStart Properties (Options). Some of
these property names changed as solver option names changed.
Some option names changed in R2016a. See Table of Option Names in Legacy Order.
optimoptions
“hides” some
options, meaning it does not display their values. optimoptions
displays
only current names, not legacy names. For details, see View Options.
optimoptions
Hidesoptimoptions
does not display some options.
To view the setting of any such “hidden” option, use
dot notation. For details, see View Options. These options are listed in italics in
the options tables in the function reference pages.
Options that optimoptions
Hides
Option | Description | Solvers | Reason for Hiding |
---|---|---|---|
Cache | With | patternsearch | Works poorly |
CacheSize | Size of the history. | patternsearch | Works poorly |
CacheTol | Largest distance from the current mesh point to any point
in the history in order for | patternsearch | Works poorly |
DisplayInterval | Interval for iterative display. The iterative display prints
one line for every DisplayInterval iterations. | particleswarm , simulannealbnd | Not generally useful |
FunValCheck | Check whether objective function and constraints values
are valid. | particleswarm | Not generally useful |
HybridInterval | Interval (if not | simulannealbnd | Not generally useful |
InitialPenalty | Initial value of penalty parameter. | ga , patternsearch | Difficult to know how to set |
MaxMeshSize | Maximum mesh size used in a poll or search step. | patternsearch | Not generally useful |
MeshRotate | Rotate the pattern before declaring a point to be optimum. | patternsearch | Default value is best |
MigrationDirection | Direction of migration — see Migration Options. | ga | Not useful |
MigrationFraction | Scalar between 0 and 1 specifying the fraction of individuals in each subpopulation that migrates to a different subpopulation — see Migration Options. | ga | Not useful |
MigrationInterval | Positive integer specifying the number of generations that take place between migrations of individuals between subpopulations — see Migration Options | ga | Not useful |
PenaltyFactor | Penalty update parameter. | ga , patternsearch | Difficult to know how to set |
PlotInterval | Positive integer specifying the number of generations between consecutive calls to the plot functions. | ga , patternsearch , simulannealbnd | Not useful |
StallTest | String describing the stopping test. | ga | Default value is best |
TolBind | Binding tolerance. See Constraint Parameters. | patternsearch | Default value is usually best |
These two tables have identical information. One is in alphabetical order by legacy option name, the other is in order by current option name. The tables show values only when the values differ between legacy and current, and show only the names that differ. For changes in Optimization Toolbox™ solvers, see Current and Legacy Option Names.
* indicates GlobalSearch
and MultiStart
property
names as well as solver option names.
Option Names in Legacy Order
Legacy Name | Current Name | Legacy Values | Current Values |
---|---|---|---|
CompletePoll | UseCompletePoll | 'on' , 'off' | true , false |
CompleteSearch | UseCompleteSearch | 'on' , 'off' | true , false |
Generations | MaxGenerations | ||
InitialPopulation | InitialPopulationMatrix | ||
InitialScores | InitialScoreMatrix | ||
InitialSwarm | InitialSwarmMatrix | ||
MaxFunEvals | MaxFunctionEvaluations | ||
MaxIter | MaxIterations | ||
MeshAccelerator | AccelerateMesh | 'on' , 'off' | true , false |
MeshContraction | MeshContractionFactor | ||
MeshExpansion | MeshExpansionFactor | ||
MinFractionNeighbors | MinNeighborsFraction | ||
NonlinConAlgorithm | NonlinearConstraintAlgorithm | ||
* OutputFcns | * OutputFcn | ||
* PlotFcns | * PlotFcn | ||
PollingOrder | PollOrderAlgorithm | ||
PopInitRange | InitialPopulationRange | ||
SearchMethod | SearchFcn | ||
SelfAdjustment | SelfAdjustmentWeight | ||
SocialAdjustment | SocialAdjustmentWeight | ||
StallGenLimit | MaxStallGenerations | ||
StallIterLimit | MaxStallIterations | ||
StallTimeLimit | MaxStallTime | ||
TimeLimit | MaxTime | ||
TolCon | ConstraintTolerance | ||
* TolFun | * FunctionTolerance | ||
TolMesh | MeshTolerance | ||
* TolX | StepTolerance * XTolerance for GlobalSearch and MultiStart | ||
Vectorized | UseVectorized | 'on' , 'off' | true , false |
* indicates GlobalSearch
and MultiStart
property
names as well as solver option names.
Option Names in Current Order
Current Name | Legacy Name | Current Values | Legacy Values |
---|---|---|---|
AccelerateMesh | MeshAccelerator | true , false | 'on' , 'off' |
ConstraintTolerance | TolCon | ||
* FunctionTolerance | * TolFun | ||
InitialPopulationMatrix | InitialPopulation | ||
InitialPopulationRange | PopInitRange | ||
InitialScoreMatrix | InitialScores | ||
InitialSwarmMatrix | InitialSwarm | ||
MaxFunctionEvaluations | MaxFunEvals | ||
MaxGenerations | Generations | ||
MaxIterations | MaxIter | ||
MaxStallGenerations | StallGenLimit | ||
MaxStallIterations | StallIterLimit | ||
MaxStallTime | StallTimeLimit | ||
MaxTime | TimeLimit | ||
MeshContractionFactor | MeshContraction | ||
MeshExpansionFactor | MeshExpansion | ||
MeshTolerance | TolMesh | ||
MinNeighborsFraction | MinFractionNeighbors | ||
NonlinearConstraintAlgorithm | NonlinConAlgorithm | ||
* OutputFcn | * OutputFcns | ||
* PlotFcn | * PlotFcns | ||
PollOrderAlgorithm | PollingOrder | ||
SearchFcn | SearchMethod | ||
SelfAdjustmentWeight | SelfAdjustment | ||
SocialAdjustmentWeight | SocialAdjustment | ||
StepTolerance | TolX | ||
UseCompletePoll | CompletePoll | true , false | 'on' , 'off' |
UseCompleteSearch | CompleteSearch | true , false | 'on' , 'off' |
UseVectorized | Vectorized | true , false | 'on' , 'off' |
* XTolerance | * TolX |