Documentation Center

  • Trial Software
  • Product Updates

sdo.OptimizeOptions class

Package: sdo

Optimization options

Syntax

opt = sdo.OptimizeOptions
opt = sdo.OptimizeOptions(Name,Value)

Description

Specify options such as solver, solver options and whether to use parallel computing during optimization.

Construction

opt = sdo.OptimizeOptions creates an sdo.OptimizeOptions object and assigns default values to the properties.

opt = sdo.OptimizeOptions(Name,Value) creates an sdo.OptimizeOptions object with additional options specified by one or more Name,Value pair arguments. Name is a property name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Input Arguments

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'GradFcn'

String that indicates whether the cost/constraint function you provide to sdo.optimize returns gradient information:

  • 'on' — The cost/constraint function returns gradient information

  • 'off' — The cost/constraint function does not return gradient information. The software uses central differences to compute the gradients.

Default: 'off'

'Method'

String specifying the optimization solver that sdo.optimize uses to solve the optimization problem:

  • 'fmincon'

  • 'fminsearch'

  • 'lsqnonlin'

  • 'patternsearch' (requires Global Optimization Toolbox software)

See the Optimization Toolbox and Global Optimization Toolbox documentation for more information on these solvers.

Default: 'fmincon'

'MethodOptions'

Structure with fields specifying optimization solver options. The structure fields are configured based on the Method property.

You can change solver options. For example opt.MethodOptions.TolX = 1.5e-3.

For information on the optimization solver options, see:

Default: [1x1 struct]

'OptimizedModel'

String displaying a Simulink® model name to be optimized.

Default: ''

'ParallelPathDependencies'

Cell array of strings specifying path dependencies to use during parallel optimization. These path dependencies are temporarily added to the workers during parallel optimization.

Default: {}

'Restarts'

Nonnegative integer specifying the number of times the optimization solver restarts the optimization if convergence criteria are not satisfied. At each restart, the initial value of the tunable parameters are set to the final value of the previous optimization run.

Default: 0

'StopIfFeasible'

Terminate optimization once a feasible solution satisfying the constraints is found:

  • 'on' — Terminate as soon a feasible solution is found

  • 'off' — Continue to search for solutions that are typically located further inside the constraint region

The software ignores this option when you track a reference signal or your problem has a cost.

Default: 'on'

'UseParallel'

Parallel computing option for fmincon, lsqnonlin and patternsearch optimization solvers:

  • 'never' — Do not use parallel computing during optimization

  • 'always' — Use parallel computing during optimization

Parallel Computing Toolbox™ software must be installed to enable parallel computing for the optimization methods.

When set to 'always', the methods compute the following in parallel:

  • fmincon — Finite difference gradients

  • lsqnonlin — Finite difference gradients

  • patternsearch — Population evaluation

Default: 'never'

Properties

GradFcn

String that indicates whether the cost/constraint function you provide to sdo.optimize returns gradient information:

  • 'on' — The cost/constraint function returns gradient information

  • 'off' — The cost/constraint function does not return gradient information. The software uses central differences to compute the gradients.

Default: 'off'

Method

String specifying the optimization solver that sdo.optimize uses to solve the optimization problem:

  • 'fmincon'

  • 'fminsearch'

  • 'lsqnonlin'

  • 'patternsearch' (requires Global Optimization Toolbox software)

See the Optimization Toolbox and Global Optimization Toolbox documentation for more information on these solvers.

Default: 'fmincon'

MethodOptions

Structure with fields specifying optimization solver options. The structure fields are configured based on the Method property.

You can change solver options. For example opt.MethodOptions.TolX = 1.5e-3.

For information on the optimization solver options, see:

Default: [1x1 struct]

OptimizedModel

String displaying a Simulink model name to be optimized.

Default: ''

ParallelPathDependencies

Cell array of strings specifying path dependencies to use during parallel optimization. These path dependencies are temporarily added to the workers during parallel optimization.

Default: {}

Restarts

Nonnegative integer specifying the number of times the optimization solver restarts the optimization if convergence criteria are not satisfied. At each restart, the initial value of the tunable parameters are set to the final value of the previous optimization run.

Default: 0

StopIfFeasible

Terminate optimization once a feasible solution satisfying the constraints is found:

  • 'on' — Terminate as soon a feasible solution is found

  • 'off' — Continue to search for solutions that are typically located further inside the constraint region

The software ignores this option when you track a reference signal or your problem has a cost.

Default: 'on'

UseParallel

Parallel computing option for fmincon, lsqnonlin and patternsearch optimization solvers:

  • 'never' — Do not use parallel computing during optimization

  • 'always' — Use parallel computing during optimization

Parallel Computing Toolbox software must be installed to enable parallel computing for the optimization methods.

When set to 'always', the methods compute the following in parallel:

  • fmincon — Finite difference gradients

  • lsqnonlin — Finite difference gradients

  • patternsearch — Population evaluation

Default: 'never'

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® documentation.

Examples

Specify an optimization solver.

opts = sdo.OptimizeOptions;
opts.Method = 'fminsearch';

See Also

|

How To

Was this topic helpful?