ERGO-Code / HiGHS

Linear optimization software
MIT License
957 stars 177 forks source link

Missing callbacks #1905

Open few opened 1 month ago

few commented 1 month ago

There are currently three callbacks to interrupt highs: kCallbackSimplexInterrupt kCallbackIpmInterrupt kCallbackMipInterrupt

1) There is no interrupt callback for presolve 2) A single "interrupt everything" callback would be nice. That way a user who is only interested in interrupting highs without caring for the solver state (i.e. on keyboard interrupt), wouldn't have to keep track of newly added interrupt callbacks. 3) A "finished" callback, that gets called after the solving process has stopped. Currently one does not know when highs will finish after a callback sets user_interrupt=true.

few commented 1 month ago

See the EDIT on https://github.com/ERGO-Code/HiGHS/pull/1886#issuecomment-2323191530 for why 3) is a real problem.

jajhall commented 1 month ago

OK These are soon added.

jajhall commented 1 month ago

If I understand correctly, as well as a blanket "enable all callbacks", you also want a callback that is executed just before the return from Highs::run()?

few commented 1 month ago

If I understand correctly, as well as a blanket "enable all callbacks",

While an "enable all callbacks" might be useful for some, I want an "enable all interrupt callbacks".

you also want a callback that is executed just before the return from Highs::run()?

That sounds right.

jajhall commented 1 month ago

I want an "enable all interrupt callbacks".

Of course, sorry

I may be able to implement them this week