Skip to content

cobyla returns last evaluated function which might not be minimum #57

@ericjster

Description

@ericjster

COBYLA returns the wrong value for minimum.
It returns the last evaluated function value, but that last value might not be the return value.
Attached is an example of minimizing a test function ("Powell's Badly Scaled Function").
NEWUOA and BOBYQA do well.

The output shows the minima is found (close to 0.0), but then some additional evaluations are done and it seems to forget the best value.
...
myfunc: x: [ 5.39347657e+00 2.17974583e-05] , val: 0.0308692676819
myfunc: x: [ 5.39307750e+00 -2.79444985e-04] , val: 258.266926113
myfunc: x: [ 5.39385142e+00 -3.09088486e-04] , val: 312.291607364
optimum at 5.39385141967 -0.000309088485691
minimum value = 312.291607364
result code = 4

nlopt_cobyla_bug.py.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions