Stop CLP after a given amount of time #186
-
I would like to see a way to stop CLP after a given amount of time (clock time or CPU time) has elapsed, and return with the best solution so far and a status indicating that CLP ran out of time. We use Clp in a production environment, with a periodic calibration run that does thousands of similar but independent LPs, usually scheduled for a weekend and taking all available cores (~ 100). Most of the LPs solve in under 2 minutes but several take over half an hour of computation to return a solution. Today I killed one LP that was still running after using over 10 hours of CPU time without returning from the call to CLP Simplex solver. Solving this particular LP with the Barrier method returned a solution in under 5 minutes. Currently the only way I see of implementing this time limit is by imposing an external CPU time limit on the process performing the computation and then detecting that the operating system killed the process when it has used up its time quota. This is not an ideal (portable) solution. Portability is highly desired, since this mission-critical application is over 30 years old and has survived porting across 4 different CPU architectures (currently running on x86-64-bit Linux). It started using CLP as the solver around 8 years ago. Originally posted by @ralacroix in #168 (comment) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@ralacroix Is using setMaximumSeconds not an option?
(Discussion moved from comment on #168) |
Beta Was this translation helpful? Give feedback.
@ralacroix Is using setMaximumSeconds not an option?
(Discussion moved from comment on #168)