Difference between fmincon 'TolFun' and 'FunctionTolerance'
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Laurent Keersmaekers
am 16 Mär. 2017
Kommentiert: Laurent Keersmaekers
am 16 Mär. 2017
Hi all,
Recently I moved from Matlab R2015b to R2016b. One of the functions I use is fmincon. According to the help files for R2015b and R2016b, I conclude that the following options should be equivalent:
optimoptions(...
@fmincon,...
'Algorithm', 'interior-point',...
'Display', 'off',...
'TolFun', 1.0e-4,...
'StepTolerance', 1.0e-4,...
'ConstraintTolerance', 1.0e-2,...
'SpecifyObjectiveGradient', true,...
'SpecifyConstraintGradient', true,...
'HessianFcn', "MyHessian");
or:
optimoptions(...
@fmincon,...
'Algorithm', 'interior-point',...
'Display', 'off',...
'FunctionTolerance', 1.0e-4,...
'StepTolerance', 1.0e-4,...
'ConstraintTolerance', 1.0e-2,...
'SpecifyObjectiveGradient', true,...
'SpecifyConstraintGradient', true,...
'HessianFcn', "MyHessian");
However, when I simulate my program with 'FunctionTolerance' I obtain different results in comparison to 'TolFun'.
Can anyone explain why this is happening?
Kind regards, Laurent Keersmaekers
0 Kommentare
Akzeptierte Antwort
Alan Weiss
am 16 Mär. 2017
I think that you forgot to specify OptimalityTolerance = 1e-4. The former TolFun was split into two new tolerances. As you see in the Current and Legacy Option Name Tables, the old TolFun option had two meanings: change in function value, and size of first-order optimality measure. These meanings are now codified in FunctionTolerance and OptimalityTolerance. OK?
Alan Weiss
MATLAB mathematical toolbox documentation
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!