libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
304 stars 40 forks source link

Implement recursive test #84

Open zaikunzhang opened 1 year ago

zaikunzhang commented 1 year ago

PRIMA should support recursive calling. For example, cobyla should be able to minimize a function whose definition involves cobyla. The depth of the recursion can be larger than one. We have to test this.

The recursive test has been implemented in MATLAB:

https://github.com/libprima/prima/blob/main/matlab/tests/recursive.m

The MATLAB interface passes the recursive test on Linux, but not on Windows or macOS. I am not sure whether this is a limitation of MATLAB, OS, or PRIMA.

The same test should be conducted on the Fortran implementation, the C interface, and any other implementation or interface added in the future.