coin-or / Cbc.old

This is a mirror of the subversion repository on COIN-OR
https://projects.coin-or.org/Cbc
Other
86 stars 31 forks source link

Make seconds parameter work on Wallclock #2

Closed routexl closed 8 years ago

routexl commented 8 years ago

When using the command line solver on Windows (cbc.exe) with multiple threads, the -seconds parameter which sets the time limit gets applied to the CPU seconds. On single thread CPU seconds equals Wallclock seconds.

It may be more usable when the seconds parameter sets the time limit for Wallclock seconds. The time used for the optimization may require more accurate steering, instead of the resource time.

With -seconds 7200 on single thread cbc.exe runs for almost 2 hours:

Total time (CPU seconds): 7175.61 (Wallclock seconds): 7175.61

With -threads 4 -seconds 7200 it stops after 36 minutes:

Total time (CPU seconds): 7166.48 (Wallclock seconds): 2170.56

tkralphs commented 8 years ago

Sorry for the delay in responding to this issue. For some reason, I missed it when it came in. To get what you want, there is an additional parameter -timeMode elapsed that should do the trick.