FunctionTolerance parameter has no effect on fmincon - is it a bug?
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (2)
Gaik Tamazian
el 20 de Mayo de 2016
0 votos
Alan Weiss
el 20 de Mayo de 2016
0 votos
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 comentario
Gaik Tamazian
el 20 de Mayo de 2016
Categorías
Más información sobre Solver Outputs and Iterative Display en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!