nlopt icon indicating copy to clipboard operation
nlopt copied to clipboard

How to get the result when I halt nlopt gracefully by throw a ForcedStop exception in python?

Open ghost opened this issue 7 years ago • 1 comments

        try:
            xopt = opt.optimize(x0)
        except nlopt.ForcedStop as e:
            print('Forced Stopped! But it will stop gracefully.')

Everything is fine. However, when exception occurs, xopt is lost.

My question is: how can i recover the optimal by now result xopt when a ForcedStop is thrown and handled.

ghost avatar Mar 22 '18 03:03 ghost