Difference between fmincon 'TolFun' and 'FunctionTolerance'

14 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Alan Weiss
Alan Weiss el 16 de Mzo. de 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
  1 comentario
Laurent Keersmaekers
Laurent Keersmaekers el 16 de Mzo. de 2017
Thank you very much for your advice, this has indeed solved the issue.
Kind regards,
Laurent Keersmaekers

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by