选择R2的变化016a
Useoptimoptions
to Set Options
Before R2016a, you set options for someGlobal Optimization Toolboxsolvers by using a dedicated option function:
gaoptimset
forga
andgamultiobj
psoptimset
forpatternsearch
saoptimset
forsimulannealbnd
Beginning in R2016a, the recommended way to set options is to useoptimoptions
. (You already setparticleswarm
options usingoptimoptions
.)
Note
GlobalSearch
andMultiStart
use a different mechanism for setting properties. SeeGlobalSearch and MultiStart Properties (Options). Some of these property names changed as solver option names changed.
Some option names changed in R2016a. SeeTable 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, seeView Options.
Options thatoptimoptions
Hides
optimoptions
does not display some options. To view the setting of any such “hidden” option, use dot notation. For details, seeView Options. These options are listed initalicsin the options tables in the function reference pages.
Options thatoptimoptions
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 everyDisplayInterval 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迁移选项. |
ga |
Not useful |
MigrationFraction |
Scalar between 0 and 1 specifying the fraction of individuals in each subpopulation that migrates to a different subpopulation — see迁移选项. |
ga |
Not useful |
MigrationInterval |
Positive integer specifying the number of generations that take place between migrations of individuals between subpopulations — see迁移选项 |
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. SeeConstraint Parameters. |
patternsearch |
Default 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, seeCurrent and Legacy Option Names.
* indicatesGlobalSearch
andMultiStart
property names as well as solver option names.
Option Names in Legacy Order
Legacy Name | Current Name | 遗产的价值es | 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 forGlobalSearch andMultiStart |
||
Vectorized |
UseVectorized |
'on' ,'off' |
true ,false |
Table of Option Names in Current Order
* indicatesGlobalSearch
andMultiStart
property names as well as solver option names.
Option Names in Current Order
Current Name | Legacy Name | Current Values | 遗产的价值es |
---|---|---|---|
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 |