Expose various additional HiGHS features#33
Conversation
lovasoa
left a comment
There was a problem hiding this comment.
Thank you for your contribution ! Could you add tests, including for edge cases/concurrency scenarios, and safety comments above the unsafe blocks explaining the reasoning of why they are safe ?
I'm a little bit scared of merging potential undefined behavior
src/callback.rs
Outdated
| _ctx: CbCtxMipDefineLazyConstraints, | ||
| }) | ||
| } | ||
| _ => unreachable!(), |
There was a problem hiding this comment.
can we add an explicit message about what went wrong here ?
src/callback.rs
Outdated
| /// User callbacks while solving | ||
| pub trait Callback { | ||
| /// The main callback routine | ||
| fn callback(&mut self, context: CallbackOuterContext<'_>) -> CallbackReturn; | ||
| } |
There was a problem hiding this comment.
Could we handle the state saving and passing logic internally so that the rust user can just pass an Fn() (or even an FnMut if that's safe in highs) ?
|
Thanks for the feedback. Your comments seem to mainly be about the callback commit. Would it make sense to split that change out into a separate PR, since it's the biggest change with the most design decisions? |
|
Yes, good, let's do that ! |
|
Alright, tests are done, I'll open another draft PR for the callbacks. |
I've been using this crate in a project I'm working on, and I ran into some functionality I required from HiGHS that this crate was not exposing yet. This is a random collection of different things, but the commits should be reasonably logically split, I think. Let me know if you want me to break this out into separate PRs.