Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing callbacks #1905

Open
few opened this issue Sep 1, 2024 · 5 comments
Open

Missing callbacks #1905

few opened this issue Sep 1, 2024 · 5 comments

Comments

@few
Copy link
Contributor

few commented Sep 1, 2024

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
Copy link
Contributor Author

few commented Sep 1, 2024

See the EDIT on #1886 (comment) for why 3) is a real problem.

@jajhall
Copy link
Member

jajhall commented Sep 2, 2024

OK These are soon added.

@jajhall
Copy link
Member

jajhall commented Sep 4, 2024

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
Copy link
Contributor Author

few commented Sep 4, 2024

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
Copy link
Member

jajhall commented Sep 4, 2024

I want an "enable all interrupt callbacks".

Of course, sorry

I may be able to implement them this week

mathgeekcoder added a commit to mathgeekcoder/HiGHS that referenced this issue Sep 16, 2024
Major highspy update:
* changed `highs_linear_expression` to be immutable by default
* improved callback support
* improved test coverage (99%)
* performance and usability enhancements
* Support `__iadd__`, `__imul__`, etc.
* Updated chain comparison support in immutable setting
* `h.val()` can take `highs_linear_expression`
* `expr == [lb,ub]` -> `lb <= expr <= ub` syntax
* `qsum`
* added pretty print `__repr__` and `__str__`
* added KeyboardInterrupt support
* added user interrupt
* fixed slicing issues with numpy and highs
* added `resetGlobalScheduler`
* released GIL for `Presolve`
* fixed issues with deadlock on Windows
* fixed MIP solution callback issue
* support `getExpr` that creates a `highs_linear_expression` from existing row

Should address multiple issues: ERGO-Code#1865, ERGO-Code#1882, ERGO-Code#1888, ERGO-Code#1892, ERGO-Code#1903, ERGO-Code#1904, and perhaps ERGO-Code#1905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants