Main Content

Options Changes in R2016a

Use optimoptions to Set Options

Before 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 Optimization Options.

Options that optimoptions Hides

optimoptions does not display some options. To view the setting of any such “hidden” option, use dot notation. For details, see View Optimization Options. These options are listed in italics in the options tables in the function reference pages.

Options that optimoptions Hides

OptionDescriptionSolversReason for Hiding
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 it 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.

patternsearchWorks poorly
CacheSize

Size of the history.

patternsearchWorks poorly
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'.

patternsearchWorks poorly
DisplayIntervalInterval for iterative display. The iterative display prints one line for every DisplayInterval iterations.particleswarm, simulannealbndNot generally useful
FunValCheck

Check whether objective function and constraints values are valid. 'on' displays an error when the objective function or constraints return a value that is complex, Inf, or NaN.

particleswarmNot generally useful
HybridInterval

Interval (if not 'end' or 'never') at which HybridFcn is called.

simulannealbndNot generally useful
InitialPenalty

Initial value of penalty parameter.

ga, patternsearchDifficult to know how to set
MaxMeshSize

Maximum mesh size used in a poll or search step.

patternsearchNot generally useful
MeshRotate

Rotate the pattern before declaring a point to be optimum.

patternsearchDefault value is best

MigrationDirection

Direction of migration — see Migration Options.

gaNot useful

MigrationFraction

Scalar between 0 and 1 specifying the fraction of individuals in each subpopulation that migrates to a different subpopulation — see Migration Options.

gaNot useful

MigrationInterval

Positive integer specifying the number of generations that take place between migrations of individuals between subpopulations — see Migration Options

gaNot useful

PenaltyFactor

Penalty update parameter.

ga, patternsearchDifficult to know how to set

PlotInterval

Positive integer specifying the number of generations between consecutive calls to the plot functions.

ga, patternsearch, simulannealbndNot useful

StallTest

String describing the stopping test.

gaDefault value is best
TolBind

Binding tolerance. See Constraint Parameters.

patternsearchDefault value is usually best

Table of Option Names in Legacy Order

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 NameCurrent NameLegacy ValuesCurrent Values
CompletePollUseCompletePoll'on', 'off'true, false
CompleteSearchUseCompleteSearch'on', 'off'true, false
GenerationsMaxGenerations  
InitialPopulationInitialPopulationMatrix  
InitialScoresInitialScoreMatrix  
InitialSwarmInitialSwarmMatrix  
MaxFunEvalsMaxFunctionEvaluations  
MaxIterMaxIterations  
MeshAcceleratorAccelerateMesh'on', 'off'true, false
MeshContractionMeshContractionFactor  
MeshExpansionMeshExpansionFactor  
MinFractionNeighborsMinNeighborsFraction  
NonlinConAlgorithmNonlinearConstraintAlgorithm  
* OutputFcns* OutputFcn  
* PlotFcns* PlotFcn  
PollingOrderPollOrderAlgorithm  
PopInitRangeInitialPopulationRange  
SearchMethodSearchFcn  
SelfAdjustmentSelfAdjustmentWeight  
SocialAdjustmentSocialAdjustmentWeight  
StallGenLimitMaxStallGenerations  
StallIterLimitMaxStallIterations  
StallTimeLimitMaxStallTime  
TimeLimitMaxTime  
TolConConstraintTolerance  
* TolFun* FunctionTolerance  
TolMeshMeshTolerance  
* TolXStepTolerance
* XTolerance for GlobalSearch and MultiStart
  
VectorizedUseVectorized'on', 'off'true, false

Table of Option Names in Current Order

* indicates GlobalSearch and MultiStart property names as well as solver option names.

Option Names in Current Order

Current NameLegacy NameCurrent ValuesLegacy Values
AccelerateMeshMeshAcceleratortrue, false'on', 'off'
ConstraintToleranceTolCon  
* FunctionTolerance* TolFun  
InitialPopulationMatrixInitialPopulation  
InitialPopulationRangePopInitRange  
InitialScoreMatrixInitialScores  
InitialSwarmMatrixInitialSwarm  
MaxFunctionEvaluationsMaxFunEvals  
MaxGenerationsGenerations  
MaxIterationsMaxIter  
MaxStallGenerationsStallGenLimit  
MaxStallIterationsStallIterLimit  
MaxStallTimeStallTimeLimit  
MaxTimeTimeLimit  
MeshContractionFactorMeshContraction  
MeshExpansionFactorMeshExpansion  
MeshToleranceTolMesh  
MinNeighborsFractionMinFractionNeighbors  
NonlinearConstraintAlgorithmNonlinConAlgorithm  
* OutputFcn* OutputFcns  
* PlotFcn* PlotFcns  
PollOrderAlgorithmPollingOrder  
SearchFcnSearchMethod  
SelfAdjustmentWeightSelfAdjustment  
SocialAdjustmentWeightSocialAdjustment  
StepToleranceTolX  
UseCompletePollCompletePolltrue, false'on', 'off'
UseCompleteSearchCompleteSearchtrue, false'on', 'off'
UseVectorizedVectorizedtrue, false'on', 'off'
* XTolerance* TolX