| Genetic Algorithm and Direct Search Toolbox™ | ![]() |
Create simulated annealing algorithm or threshold acceptance options structure
saoptimset
options = saoptimset
options = saoptimset('param1',value1,'param2',value2,...)
options = saoptimset(oldopts,'param1',value1,...)
options = saoptimset(oldopts,newopts)
options = saoptimset(optimfunction)
saoptimset with no input or output arguments displays a complete list of parameters with their valid values.
options = saoptimset (with no input arguments) creates a structure called options that contains the options, or parameters, for the simulated annealing or threshold acceptance algorithm with all parameters set to [].
options = saoptimset('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 []. It is sufficient to type only enough leading characters to define the parameter name uniquely. Case is ignored for parameter names. Note that for string values, correct case and the complete string are required.
options = saoptimset(oldopts,'param1',value1,...) creates a copy of oldopts, modifying the specified parameters with the specified values.
options = saoptimset(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 = saoptimset(optimfunction) creates an options structure with all the parameter names and default values relevant to the optimization function optimfunction. optimfunction can be either 'simulannealbnd' or 'threshacceptbnd'. For example,
saoptimset('threshacceptbnd')
ans =
AnnealingFcn: @annealingfast
TemperatureFcn: @temperatureexp
AcceptanceFcn: @acceptancethresh
TolFun: 1.0000e-006
StallIterLimit: '500*numberofvariables'
MaxFunEvals: '3000*numberofvariables'
TimeLimit: Inf
MaxIter: Inf
ObjectiveLimit: -Inf
Display: 'final'
DisplayInterval: 10
HybridFcn: []
HybridInterval: 'end'
PlotFcns: []
PlotInterval: 1
OutputFcns: []
InitialTemperature: 100
ReannealInterval: 100
DataType: 'double'The following table lists the options you can set with saoptimset. See Options Reference for a complete description of these options and their values. Values in {} denote the default value. You can also view the options parameters by typing saoptimset at the command line.
| Option | Description | Values |
|---|---|---|
AcceptanceFcn | Handle to the function the algorithm uses to determine if a new point is accepted | Function handle | @acceptancethresh |{@acceptancesa} for simulannealbnd or {@acceptancethresh} for threshacceptbnd |
AnnealingFcn | Handle to the function the algorithm uses to generate new points | Function handle | @annealingboltz | {@annealingfast} |
DataType | Type of decision variable | 'custom' | {'double'} |
Display | Level of display | 'off' | 'iter' | 'diagnose' | {'final'} |
DisplayInterval | Interval for iterative display | Positive integer | {10} |
HybridFcn | Automatically run HybridFcn (another optimization function) during or at the end of iterations of the solver | Function handle | @fminsearch @patternsearch @fminunc @fmincon {[]} or 1-by-2 cell array | {@solver, hybridoptions}, where solver = fminsearch, patternsearch, fminunc, or fmincon {[]} |
HybridInterval | Interval (if not 'end' or 'never') at which HybridFcn is called | Positive integer | 'never' | {'end'} |
InitialTemperature | Initial value of temperature | Positive integer |{100} |
MaxFunEvals | Maximum number of objective function evaluations allowed | Positive scalar | {3000*numberOfVariables} |
MaxIter | Maximum number of iterations allowed | Positive scalar | {Inf} |
ObjectiveLimit | Minimum objective function value desired | Scalar | {Inf} |
OutputFcns | Function(s) get(s) iterative data and can change options at run time | Function handle or cell array of function handles | {[]} |
PlotFcns | Plot function(s) called during iterations | Function handle or cell array of function handles | @saplotbestf | @saplotbestx | @saplotf | @saplotstopping | @saplottemperature | {[]} |
PlotInterval | Plot functions are called at every interval | Positive integer |{1} |
ReannealInterval | Reannealing interval | Positive integer | {100} |
StallIterLimit | Number of iterations over which average change in fitness function value at current point is less than options.TolFun | Positive integer | {500*numberOfVariables} |
TemperatureFcn | Function used to update temperature schedule | Function handle | @temperatureboltz | @temperaturefast | {@temperatureexp} |
TimeLimit | The algorithm stops after running for TimeLimit seconds | Positive scalar | {Inf} |
| TolFun | Termination tolerance on function value | Positive scalar | {1e-6} |
For more about these options, see Simulated Annealing and Threshold Acceptance Algorithm Options.
saoptimget, simulannealbnd, threshacceptbnd
![]() | saoptimget | simulannealbnd | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |