CBC Solver Hangs on Certain MPS Problems -- PuLP Should Handle More Gracefully #698
Unanswered
TCRichards
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I’m working on a real-time decision making tool that uses PuLP with the CBC solver to solve optimization problems.
I occasionally encounter problems where CBC does not solve the problem in any reasonable amount of time, and hangs on a pre-processing step before the cut step begins. Even when I pass a time limit to CBC, the solver hangs without honoring the time limit. I see some other posts about the time limit not being honored in pre-processing steps, so this is a known issue: #456.
My issue seems very similar to coin-or/python-mip#145, but I’m using Pulp version 2.7.0 and CBC version 2.10.3 and it still occurs (whereas the other issue is resolved). I regularly solve problems of comparable size in seconds, but this problem hangs for at least a day before I gave up and killed it.
The most recent logging that I see before CBC hangs is:
Here's the MPS file that causes the hang:
cbc_hang.txt
I forked PuLP and added a fix for my version that addresses this issue for my use case. For my application, it's MUCH better for the solver to fail quickly and raise an Exception than hang for multiple hours, since I'm using PuLP for real-time decision making. My approach involves using a timer in PuLP's main thread that will kill the CBC solver process if it takes >10 seconds longer than the specified time limit if a new argument
killOnTimeLimit
.Forked code is here: https://github.com/TCRichards/pulp
I'm happy to make a Pull Request for this issue if the maintainers agree others would benefit from this ability.
Beta Was this translation helpful? Give feedback.
All reactions