stevengj / nlopt

library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization
Other
1.9k stars 594 forks source link

Increase frequency of Sbplx change without triggering early termination #577

Open A-J-F-Mackintosh opened 1 week ago

A-J-F-Mackintosh commented 1 week ago

Hi,

Thanks for all your work on nlopt, it is an excellent library.

I am interested in using the Sbplx algorithm for gradient-free optimisation of functions with high dimensions (e.g. 3 < n < 12) in python. I was hoping that SBPLX would perform better than Nelder-Mead on such problems, but so far I have found that it is less efficient and more likely to get stuck in local optima.

I have observed that the SBPLX algorithm can spend a long time optimising a single sub-space of the problem, even if it is making very little progress. Increasing the ftol or xtol leads to a more dynamic algorithm that will more frequently move between subspaces rather than use many iterations optimising a single one. However, increasing those tolerances also leads to the algorithm terminating before it has found the true optimum value.

I think that a more agile Sbplx behaviour would be helpful for my optimisation problem. So, is there a way to set different stopping criteria for the optimisation of sub-spaces and the problem as a whole? For example, could I set two different maxeval values, one to tell the Sbplx algorithm to switch subspaces and another to stop the optimisation as a whole? Or two ftol values?

Many thanks,

Alex

stevengj commented 1 week ago

One could add an algorithm-specific parameter for this.