Why doesn't my installation include the option "SpecifyConstraintGradient" for the solver fmincon?
2 次查看(过去 30 天)
显示 更早的评论
I am trying to fit a function with nonlinear inequality constraints, for which I will also provide the gradient. Following the example "Nonlinear Constraints - Including Gradients in Constraint Functions" , I am attempting to set options for the optimizer (fmincon) but am running into the following error:
options = optimoptions(@fmincon,'SpecifyConstraintGradient',true);
Error using optimoptions (line 105)
'SpecifyConstraintGradient' is not an option for FMINCON.
A list of options can be found on the FMINCON documentation page.
(After several attempts, I copied and pasted this command directly from the example, with the same result, and I have ensured that the algorithm is not "trust-region-reflective".)
I do have the global optimization toolbox, verified with 'ver' at the commandline. However, I also noticed that the help documentation for this toolbox is missing from the default location (the only two "...MATLAB_R2015b.app/help/toolbox/" directories that I see are 'coder' and 'stats').
Are these problems related, and if so, is there a way to fix it without reinstallation of Matlab?
If they are not related, how can I set the optimizer to use the supplied gradients?
I am running Matlab 2015b on MacOSX El Capitan, and intend to run the same routine with minimal changes on a machine running Scientific Linux and Matlab 2013a.
Many thanks, D. H. S.
0 个评论
采纳的回答
Steven Lord
2016-10-31
Many of the options were renamed in release R2016a, as indicated by the first item in the Release Notes for that release of Optimization Toolbox. See the "Current and Legacy Option Name Tables" in that item for the equivalent names you should use in your release.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!