HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

Missing callbacks

Open few opened this issue 1 year ago • 5 comments

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 avatar Sep 01 '24 05:09 few

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

few avatar Sep 01 '24 06:09 few

OK These are soon added.

jajhall avatar Sep 02 '24 11:09 jajhall

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()?

jajhall avatar Sep 04 '24 12:09 jajhall

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.

few avatar Sep 04 '24 18:09 few

I want an "enable all interrupt callbacks".

Of course, sorry

I may be able to implement them this week

jajhall avatar Sep 04 '24 19:09 jajhall