Sei sulla pagina 1di 47

Optimization Toolbox Release Notes

How to Contact MathWorks

Web Newsgroup www.mathworks.com/contact_TS.html Technical Support


www.mathworks.com comp.soft-sys.matlab suggest@mathworks.com bugs@mathworks.com doc@mathworks.com service@mathworks.com info@mathworks.com

Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information

508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site. Optimization Toolbox Release Notes COPYRIGHT 20052012 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the governments needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.

Trademarks

MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
Patents

MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information.

Contents
Summary by Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version 6.2 (R2012a) Optimization Toolbox Software . . Version 6.1 (R2011b) Optimization Toolbox Software . . Version 6.0 (R2011a) Optimization Toolbox Software . . Version 5.1 (R2010b) Optimization Toolbox Software . . Version 5.0 (R2010a) Optimization Toolbox Software . . Version 4.3 (R2009b) Optimization Toolbox Software . . Version 4.2 (R2009a) Optimization Toolbox Software . . Version 4.1 (R2008b) Optimization Toolbox Software . . Version 4.0 (R2008a) Optimization Toolbox Software . . Version 3.1.2 (R2007b) Optimization Toolbox Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version 3.1.1 (R2007a) Optimization Toolbox Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version 3.1 (R2006b) Optimization Toolbox Software . . Version 3.0.4 (R2006a) Optimization Toolbox Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version 3.0.3 (R14SP3) Optimization Toolbox Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 6 10 14 16 18 21 25 29

32

33 35

38

39

iii

Compatibility Summary for Optimization Toolbox Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

iv

Contents

Optimization Toolbox Release Notes

Summary by Version
This table provides quick access to whats new in each version. For clarification, see Using Release Notes on page 2. Version (Release) New Features and Changes Yes Details Yes Details Yes Details Yes Details Yes Details Yes Details Yes Details Yes Details Yes Details No Yes Details Yes Details Version Compatibility Considerations Yes Summary Yes Summary Yes Summary No Yes Summary Yes Summary Yes Summary Yes Summary Yes Summary No Yes Summary Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes Bug Reports Includes fixes

Latest Version V6.2 (R2012a) V6.1 (R2011b) V6.0 (R2011a) V5.1 (R2010b) V5.0 (R2010a) V4.3 (R2009b) V4.2 (R2009a) V4.1 (R2008b) V4.0 (R2008a) V3.1.2 (R2007b) V3.1.1 (R2007a) V3.1 (R2006b)

Optimization Toolbox Release Notes

Version (Release)

New Features and Changes No Yes Details

Version Compatibility Considerations No No

Fixed Bugs and Known Problems Bug Reports Includes fixes Bug Reports Includes fixes

V3.0.4 (R2006a) V3.0.3 (R14SP3)

Using Release Notes


Use release notes when upgrading to a newer version to learn about: New features Changes Potential impact on your existing files and practices Review the release notes for other MathWorks products required for this product (for example, MATLAB or Simulink). Determine if enhancements, bugs, or compatibility considerations in other products impact you. If you are upgrading from a software version other than the most recent one, review the current release notes and all interim versions. For example, when you upgrade from V1.0 to V1.2, review the release notes for V1.1 and V1.2.

What Is in the Release Notes


New Features and Changes New functionality Changes to existing functionality Version Compatibility Considerations When a new feature or change introduces a reported incompatibility between versions, the Compatibility Considerations subsection explains the impact.

Summary by Version

Compatibility issues reported after the product release appear under Bug Reports at the MathWorks Web site. Bug fixes can sometimes result in incompatibilities, so review the fixed bugs in Bug Reports for any compatibility impact. Fixed Bugs and Known Problems MathWorks offers a user-searchable Bug Reports database so you can view Bug Reports. The development team updates this database at release time and as more information becomes available. Bug Reports include provisions for any known workarounds or file replacements. Information is available for bugs existing in or fixed in Release 14SP2 or later. Information is not available for all bugs in earlier releases. Access Bug Reports using your MathWorks Account.

Documentation on the MathWorks Web Site


Related documentation is available on mathworks.com for the latest release and for previous releases: Latest product documentation Archived documentation

Optimization Toolbox Release Notes

Version 6.2 (R2012a) Optimization Toolbox Software


This table summarizes whats new in Version 6.2 (R2012a): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: Enhanced Robustness in fminunc on page 4 FinDiffRelStep Option in Optimization Tool on page 4 Levenberg-Marquardt Algorithm Tweak on page 5 fmincon sqp Algorithm Tweak on page 5

Enhanced Robustness in fminunc


The fminunc medium-scale algorithm now attempts to recover from failures when evaluating the objective function during iteration steps, or during gradient estimation. Failure means the objective function returns NaN, a complex value, or Inf. If there is such a failure, the algorithm attempts to take different steps. As part of robustness, the fminunc medium-scale algorithm now uses the ObjectiveLimit tolerance.

Compatibility Considerations
When objective function values drop below ObjectiveLimit (default value: -1e20), iterations end with a -3 exit flag. Use optimset to change the value of ObjectiveLimit. Set ObjectiveLimit to -Inf to disable this tolerance.

FinDiffRelStep Option in Optimization Tool


The FinDiffRelStep option for choosing relative finite difference step sizes is now available in the Optimization Tool, in the Approximated derivatives pane. This option lets you tune the gradient estimation step in most solvers.

Version 6.2 (R2012a) Optimization Toolbox Software

Levenberg-Marquardt Algorithm Tweak


The fsolve, lsqcurvefit, and lsqnonlin solvers no longer use the magnitude of the Levenberg-Marquardt regularization parameter as a stopping criterion, so they no longer return an exit flag of -3 when using the levenberg-marquardt algorithm. Instead, they use the TolX tolerance in all internal calculations.

Compatibility Considerations
The solvers now stop with exit flag 2 in most situations where previously they stopped with exit flag -3.

fmincon sqp Algorithm Tweak


The fmincon sqp algorithm calculates its Lagrange multiplier estimates somewhat differently than before.

Compatibility Considerations
The fmincon sqp algorithm can give slightly different results than before.

Optimization Toolbox Release Notes

Version 6.1 (R2011b) Optimization Toolbox Software


This table summarizes whats new in Version 6.1 (R2011b): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: Derivative Estimate Changes on page 6 Gauss-Newton Algorithm Removed on page 7 DerivativeCheck Changes on page 7 fmincon ScaleProblem Default Changed on page 8 fsolve trust-region-dogleg Algorithm Change on page 8 Conversion of Error and Warning Message Identifiers on page 8

Derivative Estimate Changes


The fsolve, lsqcurvefit, and lsqnonlin solvers now accept the FinDiffType option. Set FinDiffType to 'central' with optimset to enable derivative estimation by central finite differences. Central finite differences are more accurate, but take more time than the default 'forward' finite differences. fsolve, lsqcurvefit, and lsqnonlin now use the TypicalX option when estimating dense Jacobians via finite differences. In previous releases, these solvers used TypicalX only when checking derivatives. For algorithms that obey bounds, finite difference steps for derivative estimation now stay within any bounds you set for the decision variables. See Iterations Can Violate Constraints. The new FinDiffRelStep option allows you to set a vector of finite difference step sizes to better handle problems whose components have different scales. Use FinDiffRelStep at the command line for any solver

Version 6.1 (R2011b) Optimization Toolbox Software

that uses finite differences. For details, see FinDiffRelStep in Options Structure.

Gauss-Newton Algorithm Removed


The fsolve, lsqcurvefit, and lsqnonlin functions no longer use the Gauss-Newton algorithm.

Compatibility Considerations
The previous way of selecting the Gauss-Newton algorithm was to set the LargeScale option to 'off', and in: fsolve set the NonlEqnAlgorithm option to 'gn'. lsqcurvefit or lsqnonlin set the LevenbergMarquardt option to 'off'. To select an algorithm, use optimset to set the Algorithm option: fsolve trust-region-dogleg, trust-region-reflective, or
levenberg-marquardt

lsqcurvefit or lsqnonlin trust-region-reflective or


levenberg-marquardt

Solvers no longer use the LevenbergMarquardt, LineSearchType, and NonlEqnAlgorithm options, since these options relate only to the Gauss-Newton algorithm.

DerivativeCheck Changes
The DerivativeCheck option checks whether a solvers finite-difference approximations match the gradient or Jacobian functions that you supply. When a solver finds a discrepancy between the computed derivatives and their finite-difference approximations, the solver now errors. Solvers used to pause in this situation instead of erroring. Additionally, solvers now compare derivatives at a point near the initial point
x0, but not exactly at x0. Previously, solvers performed the comparison at x0. This change usually gives more reliable DerivativeCheck decisions. For

details, see Checking Validity of Gradients or Jacobians.

Optimization Toolbox Release Notes

Solvers do not include the computations for DerivativeCheck in the function count. See Iterations and Function Counts.

Compatibility Considerations
Solvers compare the derivatives at a different point than before, so can change their decision on whether the derivatives match. Solvers now error instead of pause when they encounter a discrepancy.

fmincon ScaleProblem Default Changed


The fmincon interior-point and sqp algorithms can use the ScaleProblem option. The default value of ScaleProblem is now 'none' instead of 'obj-and-constr'.

Compatibility Considerations
Because of a bug in previous releases, when you did not provide gradients of the objective and nonlinear constraint functions, fmincon did not scale these functions. fmincon did scale linear constraints. So, if you do not provide gradients and have no linear constraints, the current fmincon behavior is the same as in previous releases. However, the current behavior can differ if you do provide gradients (GradObj or GradConstr is 'on'). If you provide gradients, have no linear constraints, and want to obtain the previous behavior, set ScaleProblem to 'obj-and-constr' with optimset.

fsolve trust-region-dogleg Algorithm Change


The fsolve trust-region-dogleg algorithm no longer performs an internal calculation of conditioning. This change usually speeds fsolve.

Compatibility Considerations
fsolve iterations differ from previous versions. Additionally, the solution and

all associated outputs can differ from previous versions. Usually, results are numerically equivalent to previous results.

Conversion of Error and Warning Message Identifiers


For R2011b, error and warning message identifiers have changed in Optimization Toolbox.

Version 6.1 (R2011b) Optimization Toolbox Software

Compatibility Considerations
If you have scripts or functions that use message identifiers that changed, you must update the code to use the new identifiers. Typically, message identifiers are used to turn off specific warning messages, or in code that uses a try/catch statement and performs an action based on a specific error identifier. For example, the 'optim:fmincon:ConstrainedProblemsOnly' identifier has changed to 'optimlib:fmincon:ConstrainedProblemsOnly'. If your code checks for 'optim:fmincon:ConstrainedProblemsOnly', you must update it to check for 'optimlib:fmincon:ConstrainedProblemsOnly' instead. To determine the identifier for a warning, run the following command just after you see the warning:
[MSG,MSGID] = lastwarn;

This command saves the message identifier to the variable MSGID. To determine the identifier for an error, run the following command just after you see the error:
exception = MException.last; MSGID = exception.identifier;

Tip Warning messages indicate a potential issue with your code. While you can turn off a warning, a suggested alternative is to change your code so it runs warning free.

Optimization Toolbox Release Notes

Version 6.0 (R2011a) Optimization Toolbox Software


This table summarizes whats new in Version 6.0 (R2011a): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: New Quadratic Programming Algorithm on page 10 Enhanced Robustness in Nonlinear Solvers on page 11 New Defaults in DiffMinChange and DiffMaxChange Options on page 12 Output Structure Tweak on page 12 ktrlink Compatible with KNITRO 7 on page 13 New quadprog Demo on page 13

New Quadratic Programming Algorithm


quadprog has a new algorithm named 'interior-point-convex'. It has these features:

The algorithm has fast internal linear algebra. The algorithm handles sparse problems. There is a new presolve module that can improve speed, numerical stability, and detection of infeasibility. The algorithm handles large convex problems, and accepts and uses sparse inputs. See Large-Scale vs. Medium-Scale Algorithms. The algorithm optionally gives iterative display. The algorithm has enhanced exit messages.

10

Version 6.0 (R2011a) Optimization Toolbox Software

For details on the algorithm, see interior-point-convex quadprog Algorithm. For help choosing the algorithm to use, see Quadratic Programming Algorithms.

Compatibility Considerations
You now choose the quadprog algorithm by using optimset to set the Algorithm option instead of the LargeScale option. If you dont set Algorithm or LargeScale, quadprog behaves as before.
Algorithm option choices are:

trust-region-reflective (formerly LargeScale = 'on'), the default active-set (formerly LargeScale = 'off') interior-point-convex The previous way of choosing the quadprog algorithm at the command line was to set the LargeScale option to 'on' or 'off'. quadprog now ignores the LargeScale option, except when you set the inconsistent values LargeScale = 'off' and Algorithm = 'trust-region-reflective'. In this case, to avoid backward incompatibility, quadprog honors the LargeScale option, and uses the 'active-set' algorithm.
quadprog now checks whether any inputs are complex, and, if so, it errors. The only exception is the Hinfo argument for the HessMult option is allowed to be complex.

Enhanced Robustness in Nonlinear Solvers


More solvers now attempt to recover from errors in the evaluation of objective functions and nonlinear constraint functions during iteration steps, or, for some algorithms, during gradient estimation. The errors include results that are NaN or Inf for all solvers, or complex for fmincon and fminunc. If there is such an error, the algorithms attempt to take different steps. The following solvers are enhanced: fmincon trust-region-reflective algorithm (the interior-point and sqp algorithms already had this robustness) fminunc LargeScale algorithm

11

Optimization Toolbox Release Notes

fsolve trust-region-reflective, trust-region-dogleg, and levenberg-marquardt algorithms lsqcurvefit trust-region-reflective and levenberg-marquardt algorithms lsqnonlin trust-region-reflective and levenberg-marquardt algorithms

New Defaults in DiffMinChange and DiffMaxChange Options


The DiffMinChange and DiffMaxChange options set the minimum and maximum possible step sizes for finite differences in gradient estimation. The defaults are now: DiffMinChange = 0 (formerly 1e-8) DiffMaxChange = Inf (formerly 0.1) Solvers have mechanisms that ensure nonzero and non-infinite step sizes, so the new defaults simply mean that the step size adjustment algorithms have fewer constraints. The new defaults remove the previous arbitrary choices. The previous values can be inappropriate when components are too large or small in magnitude. Tests show these new defaults are good for most situations.

Compatibility Considerations
Some solver iterations can differ from previous ones. To obtain the previous behavior:
options = optimset('DiffMinChange',1e-8,'DiffMaxChange',0.1);

Output Structure Tweak


For the trust-region-reflective algorithm, the algorithm field of the output structure is now 'trust-region-reflective'. This value differs slightly from the previous values returned by fmincon, fsolve, lsqcurvefit, lsqnonlin, and quadprog.

12

Version 6.0 (R2011a) Optimization Toolbox Software

Compatibility Considerations
To avoid errors or unexpected results, update any code that depends on the exact value of the output.algorithm string.

ktrlink Compatible with KNITRO 7


ktrlink is compatible with KNITRO 7. For details, see ktrlink: An

Interface to KNITRO Libraries, or the Ziena Optimization web site http://www.ziena.com/.

New quadprog Demo


A new demo shows how to solve portfolio optimization problems using quadprog. View the demo at the command line by entering
showdemo portfoptimdemo

13

Optimization Toolbox Release Notes

Version 5.1 (R2010b) Optimization Toolbox Software


This table summarizes whats new in Version 5.1 (R2010b): New Features and Changes Yes Details below Version Compatibility Considerations No Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: Enhanced fmincon Finite Difference Algorithms Add Robustness on page 14 ktrlink Available for Macintosh 64-Bit Systems on page 14 Output Structure Tweaks on page 14 New Video Demo on Modeling on page 15

Enhanced fmincon Finite Difference Algorithms Add Robustness


The fmincon interior-point and sqp algorithms now attempt to recover from errors in the evaluation of objective functions and nonlinear constraint functions during gradient estimation. The errors include results that are NaN, Inf, or complex. If there is such an error, the finite differencing routines attempt to take different steps.

ktrlink Available for Macintosh 64-Bit Systems


The ktrlink function now works with Macintosh 64-bit systems. Therefore, ktrlink works on the same systems as all other Optimization Toolbox functions.

Output Structure Tweaks


All linprog and quadprog algorithms now create a firstorderopt field in the output structure. This field contains the value of the first-order optimality measure at the final point.

14

Version 5.1 (R2010b) Optimization Toolbox Software

All fmincon and quadprog algorithms now create a constrviolation field in the output structure. This field contains the largest value of the constraint functions at the final point: bounds, linear constraints, and nonlinear constraints. (Some algorithms return the larger of the constraint functions and 0.) See Writing Constraints.

New Video Demo on Modeling


There is a new two-part demo on modeling and solving optimization problems. View the first part from the MATLAB command line by entering
playbackdemo('Optimization-Modeling-1','toolbox/optim/web/demos');

View the second part by entering


playbackdemo('Optimization-Modeling-2-Converting-To-Solver-Form',... 'toolbox/optim/web/demos');

15

Optimization Toolbox Release Notes

Version 5.0 (R2010a) Optimization Toolbox Software


This table summarizes whats new in Version 5.0 (R2010a): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: New fmincon Algorithm on page 16 lsqnonneg No Longer Uses x0 on page 16

New fmincon Algorithm


fmincon has a new algorithm called SQP for Sequential Quadratic Programming. The algorithm has the following features:

Honors bounds at all iterations Attempts a different step if one leads to an objective or constraint function returning a NaN, Inf, or complex result Fast internal linear algebra for solving quadratic programs Choose the algorithm at the command line by setting the Algorithm option to 'sqp' with optimset. For more information about the algorithm, see fmincon SQP Algorithm in the Optimization Toolbox documentation.

lsqnonneg No Longer Uses x0


The lsqnonneg solver no longer accepts a start point x0 as an optional input.

Compatibility Considerations
The Optimization Tool no longer has an input region for accepting a start point. If you import or run a problem that contains a start point x0, MATLAB issues a warning. Also, the Optimization Tool and lsqnonneg ignore x0,

16

Version 5.0 (R2010a) Optimization Toolbox Software

and instead use a start point of a vector of zeroes. If you export a problem structure from the Optimization Tool, there is no x0 field.

17

Optimization Toolbox Release Notes

Version 4.3 (R2009b) Optimization Toolbox Software


This table summarizes whats new in Version 4.3 (R2009b): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: Enhanced Exit Messages in Selected Solvers on page 18 fmincon Interior-Point Algorithm Robust to Certain Errors on page 18 Changes in quadprog on page 19 Changes in linprog on page 19 Multiobjective optimValues Changes on page 19

Enhanced Exit Messages in Selected Solvers


Enhanced, clearer exit messages in fsolve, lsqnonlin, and lsqcurvefit, with links for more information. For more information about the enhancements, see Exit Flags and Exit Messages.

Compatibility Considerations
For solvers with enhanced exit messages, the content of output.message contains many more characters than before. User code that relies on this field might need to be modified in order to display the larger exit message satisfactorily.

fmincon Interior-Point Algorithm Robust to Certain Errors


The fmincon interior-point algorithm attempts to continue when a user-supplied objective or constraint function returns Inf, NaN, or a complex result. For more information, see fmincon Interior Point Algorithm.

18

Version 4.3 (R2009b) Optimization Toolbox Software

Changes in quadprog
The large-scale quadprog algorithm now uses the TolFun and MaxIter tolerances for deciding when to end iterations when there are only linear equality constraints, instead of the TolPCG and MaxPCGIter tolerances. The quadprog output structure now contains the constrviolation field, which reports the maximum constraint function at the final point.

Compatibility Considerations
For large-scale linear equality constrained problems, the default values of the tolerances are much tighter than before, so quadprog can take more iterations, but the resulting solution should be more accurate.

Changes in linprog
The large-scale interior-point algorithm of linprog now has a backtracking mechanism for the case of stalling, and performs LDL factorization when there is rank deficiency. For more information, see Large Scale Linear Programming. The linprog output structure now contains the constrviolation field, which reports the maximum constraint function at the final point.

Compatibility Considerations
The interior-point algorithm of linprog might arrive at different solutions than before, and can solve more problems than before.

Multiobjective optimValues Changes


The optimValues structure, used by output functions, has two new fields to better reflect the state of multiobjective solvers: For fgoalattain, the optimValues.attainfactor field contains the value of , the attainment factor. For fminimax, the optimValues.maxfval field contains the value maxiFi, where F is the vector of objectives.

19

Optimization Toolbox Release Notes

Furthermore, the value stored in optimValues.fval has changed. Now optimValues.fval contains the vector F of objective function values. For a complete description of the current optimValues structure, see Fields in optimValues.

Compatibility Considerations
User code that uses the optimValues.fval field within an output function in fgoalattain and fminimax might need to be updated to avoid errors

20

Version 4.2 (R2009a) Optimization Toolbox Software

Version 4.2 (R2009a) Optimization Toolbox Software


This table summarizes whats new in Version 4.2 (R2009a): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: Parallel Gradient Estimation Available in fmincon Interior-Point Algorithm on page 21 Enhanced Exit Messages in Selected Solvers on page 21 Change in linprog Simplex Algorithm on page 23 Change in fminunc Exit Flag on page 23 New demos on page 23

Parallel Gradient Estimation Available in fmincon Interior-Point Algorithm


The fmincon solvers interior-point algorithm can now compute finite differences in parallel in order to speed the estimation of gradients. For details on how to use this parallel gradient estimation, see the Parallel Computing for Optimization chapter in the Users Guide.

Enhanced Exit Messages in Selected Solvers


Solvers print exit messages by default at the end of their runs. The exit messages are different in R2009a for several solvers, and the messages have been enhanced with new functionality. The following sections describe the new features and changes. There is more information in the Exit Flags and Exit Messages section of the Users Guide. The following solvers have enhanced exit messages: fgoalattain

21

Optimization Toolbox Release Notes

fmincon fminimax fminunc fseminf

Links to More Information Window


The enhanced exit messages include hyperlinks within their exit messages. These hyperlinks bring up a window containing further information about the terms used in the exit messages.

Link for More Detail in Command Window


A <stopping criteria details> hyperlink may appear at the end of an exit message, depending on the solver and setting of the Display option. This link causes the solver to print more detail about the exit conditions to the MATLAB Command Window.

New Display Option Values Control Default Detail


There are new values of the Display option to control whether detailed exit messages appear instead of the default (simpler) messages. The new values are: 'final-detailed' 'iter-detailed' 'notify-detailed' These settings have the same effect as the corresponding settings without '-detailed', but give detailed exit messages instead of the default exit messages. For solvers without the new exit messages, the '-detailed' options give the same behavior as without '-detailed'.

Messages in Output Structure


For solvers with enhanced exit messages, the message field of the output structure contains both the default (simpler) and the detailed exit messages,

22

Version 4.2 (R2009a) Optimization Toolbox Software

separated by a line of text stating Stopping criteria details:. The message field does not contain hyperlinks; it contains only text.

Compatibility Considerations
For solvers with enhanced exit messages, the content of output.message contains many more characters than before. User code that relies on this field may need to be modified in order to display the larger exit message satisfactorily.

Change in linprog Simplex Algorithm


The simplex algorithm of linprog now detects when there is no progress in the solution process. It attempts to continue by performing bound perturbation.

Compatibility Considerations
The simplex algorithm of linprog might arrive at different solutions than before, and can solve more problems than before.

Change in fminunc Exit Flag


One exit flag in the fminunc medium-scale solver was changed from 2 to 5. This flag appears when the solver predicts a change in function value at the next step in its iterations will be less than the TolFun tolerance. This condition can occur at a relative minimum, which should be reported by a positive flag.

Compatibility Considerations
This change might cause users (or code) that examine exit flags to evaluate a result more favorably than previously, since positive exit flags represent normal termination of solvers.

New demos
There are two new demos: A demo showing how to use Symbolic Math Toolbox functions to help calculate gradients and Hessians. Run the demo at the MATLAB command line by entering echodemo symbolic_optim_demo.

23

Optimization Toolbox Release Notes

A demo showing how to use fseminf for investigating the effect of parameter uncertainty. Run the demo at the MATLAB command line by entering echodemo airpollution. Furthermore, the optimization tutorial demo now shows how to include extra parameters. Run the demo at the MATLAB command line by entering echodemo tutdemo.

24

Version 4.1 (R2008b) Optimization Toolbox Software

Version 4.1 (R2008b) Optimization Toolbox Software


This table summarizes whats new in Version 4.1 (R2008b): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: fsolve, lsqcurvefit, lsqnonlin Algorithm and Options Changes on page 25 Optimization Tool Enables Parallel Functionality on page 26 Central Finite Differences Available in Selected Solvers on page 26 lsqnonneg Refactored on page 27 Finite Difference Algorithm Tweaked on page 27 DerivativeCheck Tolerance Changed on page 28

fsolve, lsqcurvefit, lsqnonlin Algorithm and Options Changes


The Levenberg-Marquardt algorithm was refactored in the solvers fsolve, lsqcurvefit and lsqnonlin. It is now a more standard implementation, that accepts and preserves sparse Jacobians. Choose between the algorithms used in fsolve, lsqcurvefit and lsqnonlin using the new Algorithm option. There is a new ScaleProblem option that can sometimes help the Levenberg-Marquardt algorithm converge. The default fsolve algorithm, 'trust-region-dogleg', has been validated to work with sparse Jacobians.

25

Optimization Toolbox Release Notes

Compatibility Considerations
The refactored Levenberg-Marquardt algorithm can cause fsolve, lsqcurvefit and lsqnonlin to yield different answers than before. The previous way of choosing the algorithm at the command line was to set the LargeScale option to 'on' or 'off', and, for all solvers but fsolve, to set the LevenbergMarquardt option to 'on' or 'off'. For fsolve, in addition to the LargeScale option, you needed to set the NonlEqnAlgorithm option appropriately. LargeScale, NonlEqnAlgorithm, and LevenbergMarquardt are now ignored, except when choosing to use the Gauss-Newton algorithm. The Gauss-Newton algorithm warns that soon it may no longer be available. The default value of the MaxFunEvals option in the refactored Levenberg-Marquardt algorithm is now 200*numberOfVariables; the previous value was 100*numberOfVariables.

Optimization Tool Enables Parallel Functionality


You can now access built-in parallel functionality in Optimization Tool for relevant Optimization Toolbox solvers and, if licensed, Global Optimization Toolbox solvers. The option is available when you have a license for Parallel Computing Toolbox functions.

Central Finite Differences Available in Selected Solvers


The following solvers can now use central finite differences for gradient estimation: fgoalattain fmincon fminimax fminunc fseminf The fmincon active-set algorithm and fminunc medium-scale algorithm gained central finite differences this release. The fmincon interior-point

26

Version 4.1 (R2008b) Optimization Toolbox Software

algorithm already had them, and the trust-region-reflective algorithm for both solvers requires a user-supplied gradient, so does not use finite differences. To use central finite differences, use optimset to set the FinDiffType option to 'central' instead of the default 'forward'. This causes the solver to estimate gradients by formulae such as

f ( x + 1 e1 ) f ( x 1 e1 ) f ( x + n en ) f ( x n en ) f ( x) , , , 21 2 n
instead of

f ( x + 1 e1 ) f ( x) f ( x + 2 e2 ) f ( x) f ( x + n en ) f ( x) f ( x) , , , . 1 2 n
Central finite differences take twice as many function evaluations as forward finite differences, but are usually much more accurate. Central finite differences can work in parallel for gradient estimation in fgoalattain, fmincon active-set algorithm, and fminimax. For details on how to use this parallel gradient estimation, see the Parallel Computing for Optimization chapter in the Users Guide.

lsqnonneg Refactored
lsqnonneg was refactored. It can now use sparse matrices, and it preserves sparsity during its execution.

Finite Difference Algorithm Tweaked


A subroutine for gradient estimation by forward finite differences in nonlinear solvers had a bug that affected it when the current point x had a component with the value 0. Forward finite differences are typically calculated with a step size proportional to sqrt(eps), which is about 1.5*108. When a component of x was 0, the step size would instead be proportional to DiffMinChange, which has a default value of 108. There is now no difference in step size when x is 0.

27

Optimization Toolbox Release Notes

Compatibility Considerations
Nonlinear solvers can run slightly differently whenever an iteration causes a component of x to be zero, and gradients are estimated by forward finite differences.

DerivativeCheck Tolerance Changed


The DerivativeCheck option enables you to ascertain whether the derivative (gradient) functions that you supply for objective or constraint functions give approximately the same values as those estimated by a solver using finite differences. The meaning of approximately has changed. Now it means the relative error of each component of the gradient is less than 106, unless the size of an analytically given component is smaller than 1, in which case it means the absolute difference is less than 106. Previously, the gradients were considered approximately equal if the maximum absolute error in any component of the gradient was less than (106 * norm of analytic gradient) + 105.

Compatibility Considerations
Some problems will now report violations of the DerivativeCheck condition, when previously they would not.

28

Version 4.0 (R2008a) Optimization Toolbox Software

Version 4.0 (R2008a) Optimization Toolbox Software


This table summarizes whats new in Version 4.0 (R2008a): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: Parallel Computing Toolbox Support in fmincon, fminimax, and fgoalattain on page 29 Combined and Extended optimtool on page 29 New fmincon Solver, New Option Algorithm for fmincon, Option LargeScale Changed on page 30 External Interface to KNITRO Libraries on page 30 Default PrecondBandWidth = Inf in lsqcurvefit, lsqnonlin, and fsolve on page 31 New Option TolConSQP with Incompatible Default Value on page 31 Field constrviolation in Output Structure on page 31

Parallel Computing Toolbox Support in fmincon, fminimax, and fgoalattain


fmincon, fminimax, and fgoalattain can take finite differences in parallel

in order to speed the estimation of gradients. For details on how to use this parallel gradient estimation, see the Parallel Computing for Optimization chapter in the Users Guide.

Combined and Extended optimtool


The Global Optimization Toolbox GUIs gatool and psearchtool have been combined into the Optimization Tool GUI. To access these GUIs, type optimtool at the command line, and choose the appropriate solver.

29

Optimization Toolbox Release Notes

Furthermore, three new Global Optimization Toolbox solvers were added to Optimization Tool: gamultiobj, simulannealbnd, and threshacceptbnd. Optimization Tool shows Global Optimization Toolbox solvers only if these solvers are licensed.

New fmincon Solver, New Option Algorithm for fmincon, Option LargeScale Changed
The new interior-point algorithm is a large-scale algorithm that can handle all types of constraints. It has several new options, explained in the fmincon function reference pages.
fmincon now has three algorithms. Choose between them by setting the new option Algorithm to:

'trust-region-reflective' (formerly known as 'large scale') 'active-set' (formerly known as 'medium scale') 'interior-point' By default, Algorithm = 'trust-region-reflective'.

Compatibility Considerations
The previous way of choosing the algorithm at the command line was to set option LargeScale to 'on' or 'off'. LargeScale is now ignored, except when LargeScale = 'off' and Algorithm = 'trust-region-reflective'. In this case, the 'active-set' algorithm is used, to minimize backward incompatibility.

External Interface to KNITRO Libraries


Use the new ktrlink function to call KNITRO optimization libraries from Ziena Optimization, Inc. KNITRO libraries must be purchased separately. The External Interface chapter of the Users Guide describes the ktrlink function.

30

Version 4.0 (R2008a) Optimization Toolbox Software

Default PrecondBandWidth = Inf in lsqcurvefit, lsqnonlin, and fsolve


The default value of the PrecondBandWidth option changed from 0 to Inf for the lsqcurvefit, lsqnonlin, and fsolve solvers. This change was beneficial in the vast majority of tested problems. In Optimization Tool, the default in Algorithm settings > Subproblem algorithm is now Cholesky factorization, instead of Preconditioned CG = 0.

Compatibility Considerations
The new default can lead to slower performance for problems with high-dimensional nonlinearities. If this happens, change the default to another value such as 0 (the previous default).

New Option TolConSQP with Incompatible Default Value


The new TolConSQP option exposes a parameter that was fixed at eps before. The parameter is used in the fmincon, fminimax, fgoalattain, and fseminf solvers.

Compatibility Considerations
The new default value is TolConSQP = 1e6. This did not affect a vast majority of tested cases, and was beneficial in some. If you want exactly the same behavior as before, set TolConSQP = eps using optimset.

Field constrviolation in Output Structure


The constrviolation field now exists in the output structure for the fgoalattain, fmincon, fminimax, and fseminf functions; it measures the nonlinear constraint violation.

31

Optimization Toolbox Release Notes

Version 3.1.2 (R2007b) Optimization Toolbox Software


This table summarizes whats new in Version 3.1.2 (R2007b): New Features and Changes No Version Compatibility Considerations No Fixed Bugs and Known Problems Bug Reports Includes fixes

32

Version 3.1.1 (R2007a) Optimization Toolbox Software

Version 3.1.1 (R2007a) Optimization Toolbox Software


This table summarizes whats new in Version 3.1.1 (R2007a): New Features and Changes Yes Details below Version Compatibility Considerations Yes Summary Fixed Bugs and Known Problems Bug Reports Includes fixes

Changes introduced in this version are:

Changes to Outputs of Multiobjective Solvers


fminimax now returns the value of max(fval) in the output maxfval. The iterative display of fminimax and fgoalattain have changed.

Compatibility Considerations
The third output argument of the solver fminimax, maxfval, is described in the documentation as the maximum of the objective functions in the input fun evaluated at the solution x, that is, max(fval). Before this release, fminimax actually returned the maximum of the objective functions in the reformulated minimax problem internally constructed by the algorithm. This value was typically very close to, but not necessarily equal to, max(fval). fminimax now returns the exact value of max(fval) in the output maxfval. The iterative display for fminimax includes a new column with header Objective value that reports the objective function value of the nonlinear programming reformulation of the minimax problem. The column header Max{F,constraints} has been changed to Max constraint, and the column now contains the maximum violation among all constraints, both internally constructed and user-provided. The iterative display for fgoalattain now shows the value of the attainment factor in the Attainment factor column. A new column, Max

33

Optimization Toolbox Release Notes

constraint, contains the maximum violation among all constraints, both

internally constructed and user-provided.

34

Version 3.1 (R2006b) Optimization Toolbox Software

Version 3.1 (R2006b) Optimization Toolbox Software


This table summarizes whats new in Version 3.1 (R2006b): New Features and Changes Yes Details below Version Compatibility Considerations YesDetails labeled as Compatibility Considerations, below. See also Summary. Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are: New Optimization Tool on page 35 Plot Functions Option Added on page 36 Output Function Option Enhanced to Accept Multiple Functions on page 36 Changes to the Output Function on page 36

New Optimization Tool


The Optimization Tool is a graphical user interface (GUI) for performing common optimization tasks with the Optimization Toolbox. Using the optimtool, you can do the following: Select a solver and define your optimization problem. Set and inspect optimization options and their default values. Run problems and visualize results. Import and export problem definitions, algorithm options, and results between the MATLAB workspace and the Optimization Tool. Automatically generate M-code to capture, automate, and recreate your problem. Access built-in help.

35

Optimization Toolbox Release Notes

Plot Functions Option Added


You can now specify the PlotFcns option in the optimset function or using the Optimization Tool for use with an Optimization Toolbox solver. With this option, you can plot various measures of progress while the algorithm executes. You can select from several predefined plots, or you can write your own.

Output Function Option Enhanced to Accept Multiple Functions


You can now specify more than one output function in the OutputFcn option.

Changes to the Output Function


The output function input x and fields in the optimValues structure have the following changes that address bugs in previous releases: residual now returns the residual vector for lsqnonlin and lsqcurvefit. resnorm contains the sum of squares and has been added for lsqnonlin and lsqcurvefit. The previous field fval has been removed for these functions. procedure has been removed for lsqnonlin, lsqcurvefit, and fsolve. x now returns the expected shape and size for fgoalattain and fminimax.

Compatibility Considerations
The above changes to the input x and optimValues structure have the following compatibility considerations in the output function: If you have references to the residual in a previous version, note that the value of this field has changed for lsqnonlin and lsqcurvefit. This fixes the problem addressed by the bug report S-289285. Any references to fval for lsqnonlin and lsqcurvefit need to be updated to resnorm. This fixes the problem addressed by the bug report S-289285. Any references to procedure for lsqnonlin and lsqcurvefit need to be removed. This fixes the problem addressed by the bug report S-291974.

36

Version 3.1 (R2006b) Optimization Toolbox Software

Previously, for fgoalattain and fminimax, x returned a column vector with an additional last element. If you have references to the values for x in a previous version, the extra element must be removed and the output vector may need to be reshaped. This fixes the problem addressed by the bug report S-315658.

37

Optimization Toolbox Release Notes

Version 3.0.4 (R2006a) Optimization Toolbox Software


This table summarizes whats new in Version 3.0.4 (R2006a): New Features and Changes No Version Compatibility Considerations No Fixed Bugs and Known Problems Bug Reports Includes fixes

38

Version 3.0.3 (R14SP3) Optimization Toolbox Software

Version 3.0.3 (R14SP3) Optimization Toolbox Software


This table summarizes whats new in Version 3.0.3 (R14SP3): New Features and Changes Yes Details below Version Compatibility Considerations No Fixed Bugs and Known Problems Bug Reports Includes fixes

New features and changes introduced in this version are:

Notify Parameter Added to Display Option for Five Functions


You can now set the optimization option Display to 'notify' for the functions fmincon, fminunc, fminimax, fgoalattain, and fseminf. When Display is set to 'notify', the output is displayed only if the function does not converge.

39

Optimization Toolbox Release Notes

Compatibility Summary for Optimization Toolbox Software


This table summarizes new features and changes that might cause incompatibilities when you upgrade from an earlier version, or when you use files on multiple versions. Details are provided in the description of the new feature or change. Version (Release) Latest Version V6.2 (R2012a) New Features and Changes with Version Compatibility Impact See the Compatibility Considerations subheading for each of these changes or new features: Enhanced Robustness in fminunc on page 4 Levenberg-Marquardt Algorithm Tweak on page 5 fmincon sqp Algorithm Tweak on page 5 V6.1 (R2011b) See the Compatibility Considerations subheading for each of these changes or new features: Gauss-Newton Algorithm Removed on page 7 DerivativeCheck Changes on page 7 fmincon ScaleProblem Default Changed on page 8 fsolve trust-region-dogleg Algorithm Change on page 8

40

Compatibility Summary for Optimization Toolbox Software

Version (Release)

New Features and Changes with Version Compatibility Impact Conversion of Error and Warning Message Identifiers on page 8

V6.0 (R2011a)

See the Compatibility Considerations subheading for each of these changes or new features: New Quadratic Programming Algorithm on page 10 New Defaults in DiffMinChange and DiffMaxChange Options on page 12 Output Structure Tweak on page 12

V5.1 (R2010b) V5.0 (R2010a)

None See the Compatibility Considerations subheading for this change: lsqnonneg No Longer Uses x0 on page 16

V4.3 (R2009b)

See the Compatibility Considerations subheading for each of these new features or changes: Enhanced Exit Messages in Selected Solvers on page 18 Changes in quadprog on page 19 Changes in linprog on page 19 Multiobjective optimValues Changes on page 19

41

Optimization Toolbox Release Notes

Version (Release) V4.2 (R2009a)

New Features and Changes with Version Compatibility Impact See the Compatibility Considerations subheading for each of these new features or changes: Enhanced Exit Messages in Selected Solvers on page 21 Change in linprog Simplex Algorithm on page 23 Change in fminunc Exit Flag on page 23

V4.1 (R2008b)

See the Compatibility Considerations subheading for each of these new features or changes: fsolve, lsqcurvefit, lsqnonlin Algorithm and Options Changes on page 25 Finite Difference Algorithm Tweaked on page 27 DerivativeCheck Tolerance Changed on page 28

42

Compatibility Summary for Optimization Toolbox Software

Version (Release) V4.0 (R2008a)

New Features and Changes with Version Compatibility Impact See the Compatibility Considerations subheading for each of these new features or changes: New fmincon Solver, New Option Algorithm for fmincon, Option LargeScale Changed on page 30 Default PrecondBandWidth = Inf in lsqcurvefit, lsqnonlin, and fsolve on page 31 New Option TolConSQP with Incompatible Default Value on page 31

V3.1.2 (R2007b) V3.1.1 (R2007a)

None See the Compatibility Considerations subheading for this change: Changes to Outputs of Multiobjective Solvers on page 33

V3.1 (R2006b)

See the Compatibility Considerations subheading for this change: Changes to the Output Function on page 36

V3.0.4 (R2006a) V3.0.3 (R14SP3)

None None

43

Potrebbero piacerti anche