FunctionTolerance parameter has no effect on fmincon - is it a bug?

조회 수: 21 (최근 30일)
The FunctionTolerance parameter specified with the optimoptions function has no effect on the fmincon solver. Here is an example:
options = optimoptions(@fmincon, 'FunctionTolerance', 1, 'Display', 'iter');
fmincon(@(x) rastriginsfcn (x), [4, 4], [], [], [], [], [-5.12, -5.12], ...
[5.12, 5.12], [], options)
The solver produces the following output:
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 3 3.200000e+01 0.000e+00 7.947e+00
1 7 2.972638e+01 0.000e+00 5.588e+01 5.192e+00
2 12 2.384965e+00 0.000e+00 1.253e+01 1.917e+00
3 17 2.350732e+00 0.000e+00 1.182e+01 8.742e-02
4 20 1.989923e+00 0.000e+00 3.434e-02 4.261e-02
5 23 1.989918e+00 0.000e+00 4.849e-03 1.484e-04
6 26 1.989918e+00 0.000e+00 4.849e-05 4.239e-06
7 29 1.989918e+00 0.000e+00 4.848e-07 5.641e-08
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the optimality tolerance,
and constraints are satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
ans =
-0.9950 -0.9950
If the FunctionTolerance parameter were considered, then the optimization would stop at the third iteration because the difference between the objective function values was less than 1. However, that did not happen.
Is such behavior a bug?

채택된 답변

John D'Errico
John D'Errico 2016년 5월 20일
I'm not sure I've call it a bug.
optimoptions('fmincon','functionTolerance',1)
ans =
fmincon options:
Options used by current Algorithm ('interior-point'):
(Other available algorithms: 'active-set', 'sqp', 'trust-region-reflective')
Set properties:
No options set.
Default properties:
Algorithm: 'interior-point'
CheckGradients: 0
ConstraintTolerance: 1e-06
Display: 'final'
FiniteDifferenceStepSize: 'sqrt(eps)'
FiniteDifferenceType: 'forward'
HessianApproximation: 'bfgs'
HessianFcn: []
HessianMultiplyFcn: []
HonorBounds: 1
MaxFunctionEvaluations: 3000
MaxIterations: 1000
ObjectiveLimit: -1e+20
OptimalityTolerance: 1e-06
OutputFcn: []
PlotFcn: []
ScaleProblem: 0
SpecifyConstraintGradient: 0
SpecifyObjectiveGradient: 0
StepTolerance: 1e-10
SubproblemAlgorithm: 'factorization'
TypicalX: 'ones(numberOfVariables,1)'
UseParallel: 0
Note that FunctionTolerance is NOT in the list. While you may WANT it to use that parameter, it appears that fmincon will blithely ignore you.
  댓글 수: 3
Steve Grikschat
Steve Grikschat 2016년 5월 20일
By the way, if you want fmincon to not ignore you, try setting options.Algorithm to trust-region-reflective.
Gaik Tamazian
Gaik Tamazian 2016년 5월 20일
Steve, thanks. I have already realized that the interior-point algorithm does not support the function value stopping criterion. Alan Weiss described how various algorithms implemented in fmincon treat the criterion in this thread .

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Gaik Tamazian
Gaik Tamazian 2016년 5월 20일
I found a post by Alan Weiss who explained that the function value stopping criterion depends on the algorithm used. Indeed, the interior-point algorithm does not support it at all.

Alan Weiss
Alan Weiss 2016년 5월 20일
The documentation is certainly lacking on this subject. Sorry about this lacuna. I will correct the documentation in a future release.
Meanwhile, as John showed, the optimoptions function enables you to check which options are used by each solver and each algorithm.
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
Gaik Tamazian
Gaik Tamazian 2016년 5월 20일
Thank you, Alan. It will be great to have the updated documentation in a future MATLAB release.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by