| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Design Optimization |
| Contents | Index |
| Learn more about Simulink Design Optimization |
optimset(proj,'Property1',Value1,'Property2',Value2,...)
optimset(proj,'Property1',Value1,'Property2',Value2,...) modifies the optimization settings within the response optimization project, proj. The value of the optimization setting, Property1, is set to Value1, Property2 is set to Value2, etc.
| Property | Description | Possible Settings | |
|---|---|---|---|
| Method | The optimization method used. The following methods are available:
| {'fmincon'} | 'patternsearch' | 'fminsearch' | |
| Algorithm | The algorithm used by the optimization method. | For fmincon optimization method:
| |
| Display | The level of information that the optimization displays:
| 'off' | {'iter'} | 'final' | 'notify' | |
| GradientType | Method used to calculate gradients when using 'fmincon' as
the Method. Use one of the following finite difference
methods for gradient calculation:
| {'basic'} | 'refined' | |
| MaximallyFeasible | Option to specify that the optimization continue after an initial
solution has been found:
| {0} | 1 | |
| MaxIter | Maximum number of iterations allowed | Positive integer value | |
| TolCon | Termination tolerance on the constraints | Positive scalar value | |
| TolFun | Termination tolerance on the function value | Positive scalar value | |
| TolX | Termination tolerance on the parameter values | Positive scalar value | |
| Restarts | In some optimizations, the Hessian may become ill-conditioned, and the optimization does not converge. In these cases, it is sometimes useful to restart the optimization after it stops, using the endpoint of the previous optimization as the starting point for the next one. To automatically restart the optimization, use this option to indicate the number of times you want to restart. | Nonnegative integer value | |
| UseParallel | Parallel computing option for the following optimization methods:
When set to 'always', the methods compute the following in parallel:
Disable the option by setting to 'never'. | 'always' | {'never'} | |
| ParallelPathDependencies | Option to store model path dependencies when using parallel computing | Cell array of strings | |
| SearchMethod | Search options for use with the patternsearch method | See Search Options in the Genetic Algorithm and Direct Search Toolbox documentation. |
For more information on the possible settings and the values they can take, see the reference page for optimset in the MATLAB documentation.
Create a default response optimization project for the model srotut1.
proj=newsro('srotut1','Kint');Get the optimization settings for this project.
opt_settings=optimget(proj)
This command returns the following list of optimization settings and their current values.
Method: 'fmincon'
Algorithm: 'active-set'
Display: 'iter'
GradientType: 'basic'
MaximallyFeasible: 0
MaxIter: 100
TolCon: 1.0000e-003
TolFun: 1.0000e-003
TolX: 1.0000e-003
Restarts: 0
UseParallel: 'never'
ParallelPathDependencies: {0x1 cell}
SearchMethod: []Use optimset to change the maximum number of iterations to 150.
optimset(proj,'MaxIter',150)
To view the changes to opt_settings, enter the variable name at the MATLAB prompt.
opt_settings
This command returns
Method: 'fmincon'
Algorithm: 'active-set'
Display: 'iter'
GradientType: 'basic'
MaximallyFeasible: 0
MaxIter: 150
TolCon: 1.0000e-003
TolFun: 1.0000e-003
TolX: 1.0000e-003
Restarts: 0
UseParallel: 'never'
ParallelPathDependencies: {0x1 cell}
SearchMethod: []![]() | optimize | randunc | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |