Luke Marshall
Luke Marshall
> I can create an optional callback that can be enabled with an option to handle keyboard interrupts? Yeah I agree. Thinking on this further, I think we can have...
I have an approach that seems reasonable to me. For example: ```python h = highspy.Highs() h.readModel('30n20b8.mps') h.HandleKeyboardInterrupt = True solutions = [] h.cbMipImprovingSolution.subscribe(lambda e: solutions.append(e.data_out.mip_solution)) h.solve() print(solutions) ``` The `HandleKeyboardInterrupt...
Great questions! > What happens from the POV of the python script when a KeyboardInterrupt occurs during `h.solve()`? I'd assume there is no KeyboardInterrupt to capture and `h.solve()` just finishes...
FYI @michaelbynum, @jajhall, and @few, I found the cause of deadlocking when running HiGHS in a temporary thread. e.g., the following code will randomly deadlock. **Note:** this is not just...
Good point! I hadn't made that connection, but after looking at the history, it's very possibly related. I've also noticed the deadlock is more likely to occur if `numThreads` is...
This might be related to #1670. I believe TeeStream just duplicates and redirects the stdout and stderr streams. It could be a HiGHS issue. I just got back from travel,...
> I can't comment on the implementation (I don't know Python well), other than to say that, at minimum, this needs a bunch of tests. Agreed. Working on this now,...
Abandoning this PR, as it has been replaced by #1942.
Thanks @BenChampion for the heads up. I had a quick look and can somewhat reproduce too. I'm not seeing it with the mps file via python, but with the highspy...
Ah!! You're correct @BenChampion, it wasn't finding the `.mps` file. My silly mistake. Fixing that helped replicate the issue with mps. That said, I believe I can also replicate this...