patternsearch - ignoring TolFun

2 次查看(过去 30 天)
William
William 2011-10-19
I have a detailed function which I'm trying to optimise. The first step is to use patternsearch from the global optimisation toolbox. Within the options structure I've passed in parameter values TolX = 0.01 and TolFun = 0.01. I've verified that these are indeed the values within the option structure at the point where patternsearch is called. However, this is the information it then outputs:
Iter f-count f(x) MeshSize Method
0 1 2.78578e-007 1
1 2 2.78578e-007 0.5 Refine Mesh
2 6 2.78578e-007 0.25 Refine Mesh
3 10 2.78578e-007 0.125 Refine Mesh
4 14 2.78578e-007 0.0625 Refine Mesh
5 18 2.78578e-007 0.03125 Refine Mesh
6 21 1.56899e-007 0.0625 Successful Poll
7 25 1.56899e-007 0.03125 Refine Mesh
8 30 1.56899e-007 0.01563 Refine Mesh
9 35 5.555e-008 0.03125 Successful Poll
10 39 5.555e-008 0.01563 Refine Mesh
11 44 5.555e-008 0.007813 Refine Mesh
Optimization terminated: change in X less than options.TolX.
The values of f(x) (let alone the changes in f(x)) are well below the tolerance level, but the optimisation doesn't terminate until TolX is breached. Does anyone have any ideas as to why this would be the case?

回答(1 个)

Grzegorz Knor
Grzegorz Knor 2011-11-16
Algorithm stops when change in the objective function in two consecutive iterations and the mesh size are both less than Function tolerance.
So result is correct, in 11 iteration change in the objective function and mesh size are both less than 0.01.

类别

Help CenterFile Exchange 中查找有关 Direct Search 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by