-
Notifications
You must be signed in to change notification settings - Fork 184
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
highspy: Passing user_callback_data to setCallback raises exception #1904
Comments
This is done so that users can pass data required in a callback. It works fine in C++ (and C, I think). I've got no idea how to make it work in Python |
I found a workaround:
This way one can store arbitrary data in the CallbackManager object. Maybe user_callback_data is not needed in highspy? |
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
Closed by #1942 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code raises an exception (at least on the
latest
branch):Passing None as user_callback_data works.
The text was updated successfully, but these errors were encountered: