numericalalgorithmsgroup / dfols

Python-based Derivative-Free Optimizer for Least-Squares
https://numericalalgorithmsgroup.github.io/dfols/
GNU General Public License v3.0
40 stars 15 forks source link

Manual termination #15

Open lindonroberts opened 3 years ago

lindonroberts commented 3 years ago

Implement a custom exception which allows the manual termination of the solver within an objective evaluation.

i.e. If evaluating objfun(x) raises a "TerminationException", then just terminate the solver immediately (returning the best point so far, etc.). Then users can put a "rase TerminationException" into their objective function code to quit for any reason.

jeancroy commented 11 months ago

If the objective function decides that, then maybe the objective function could have some report of the progress ?