AndreyBychkov / QBee

Quadratization of differential equations
MIT License
7 stars 2 forks source link

Return current best on keyboard interruption #5

Closed pogudingleb closed 2 years ago

pogudingleb commented 2 years ago

It would be great if there will be some hot-key (maybe just Ctrl + C) to stop the computation and return the currently optimal quadratization (maybe not a globally optimal one).

AndreyBychkov commented 2 years ago

Added feature in a1aa865215f433548ac6c68dab2c227320d51782

It's quite a messy solution with the global variable in it, but it was much more performant than using try-except with KeyboardInterruption.