| Simulink® Response Optimization™ | ![]() |
optimset(proj,'setting1',value1,'setting2',value2,...)
optimset(proj,'setting1',value1,'setting2',value2,...) modifies the optimization settings within the response optimization project, proj. The value of the optimization setting, setting1, is set to value1, setting2 is set to value2, etc.
| Option | Description | Possible Settings |
|---|---|---|
| Algorithm | The optimization algorithm used. | 'fmincon' uses the Optimization Toolbox™ function fmincon; 'patternsearch' uses the Genetic Algorithm and Direct Search Toolbox™ function patternsearch; 'fminsearch' uses the Optimization Toolbox function fminsearch. |
| Display | The level of information that the optimization displays. | 'off' displays no output; 'iter' displays output at each iteration; 'final' displays just the final output; 'notify' displays output only if the function does not converge. |
| GradientType | When using 'fmincon' as the Algorithm, Simulink® Response Optimization™ software calculates gradients based on finite difference methods. The default method for computing the gradients is 'basic'. The 'refined' method offers a more robust and less noisy gradient calculation method than 'basic', although it is sometimes more expensive and does not work with certain models such as SimPowerSystems™ models. | ''basic' or 'refined' |
| MaximallyFeasible | By default, the optimization terminates as soon as it finds a solution that satisfies the constraints and the resulting response signal sometimes lies very close to the constraint segment. However, the optimization can continue to search for a maximally feasible solution that is typically located further inside the constraint region. | 0 to terminate the optimization after an initial solution is found; 1 to continue the optimization after an initial solution, in search of a maximally feasible solution. |
| MaxIter | Maximum number of iterations allowed. | Positive integer |
| TolCon | Termination tolerance on the constraints. | Positive scalar |
| TolFun | Termination tolerance on the function value. | Positive scalar |
| TolX | Termination tolerance on the parameter values. | Positive scalar |
| 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 |
| SearchMethod | Search options for use with the patternsearch algorithm. | 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 the MATLAB® function optimset.
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 returns the following list of optimization settings and their current values.
Algorithm: 'fmincon'
Display: 'iter'
GradientType: 'basic'
MaxIter: 100
TolCon: 1.0000e-003
TolFun: 1.0000e-003
TolX: 1.0000e-003
Restarts: 0
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 returns
Algorithm: 'fmincon'
Display: 'iter'
GradientType: 'basic'
MaxIter: 150
TolCon: 1.0000e-003
TolFun: 1.0000e-003
TolX: 1.0000e-003
Restarts: 0
SearchMethod: []
![]() | optimize | randunc | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |