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
290 stars 35 forks source link

Add options.ctol to `prima_is_success` #195

Open nbelakovski opened 2 months ago

nbelakovski commented 2 months ago

This was discussed in the Python binding PR but not implemented. Something that would need to change to accommodate this would be setting the default options.ctol in C to sqrt(eps), which means we could no longer pass it to Fortran as an optional parameter.

Alternatively, in prima_is_success we could check if option.ctol is NaN and use sqrt(eps) if so, but I seem to recall there were some issues with NaN checks with certain compilers and options?

zaikunzhang commented 2 months ago

I see the issue ...