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.
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.