Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best solution not reported when stopped on time limit #358

Closed
Dx-Wang opened this issue Jan 26, 2021 · 2 comments
Closed

Best solution not reported when stopped on time limit #358

Dx-Wang opened this issue Jan 26, 2021 · 2 comments

Comments

@Dx-Wang
Copy link

Dx-Wang commented Jan 26, 2021

I have a MILP that sometimes takes a very long time to solve. So I set a time limit to the solver (1200 seconds in this case). From the log (attached below), I see some feasible solutions were found. However, when the solver stops as the time limit is reached (as expected), the best solution currently available is not reported. This is the expected behavior or a bug? Any help is really appreciated.

Cbc0010I After 3000 nodes, 1337 on tree, 1944379 best solution, best possible 1911366.5 (1133.55 seconds)
Cbc0010I After 3100 nodes, 1269 on tree, 1944379 best solution, best possible 1911366.5 (1146.47 seconds)
Cbc0010I After 3200 nodes, 1169 on tree, 1944379 best solution, best possible 1911366.5 (1158.33 seconds)
Cbc0010I After 3300 nodes, 1069 on tree, 1944379 best solution, best possible 1911366.5 (1171.06 seconds)
Cbc0010I After 3400 nodes, 969 on tree, 1944379 best solution, best possible 1911366.5 (1183.59 seconds)
Cbc0020I Exiting on maximum time
Cbc0005I Partial search - best objective 1944379 (best possible 1911366.5), took 17987 iterations and 3496 nodes (1195.81 seconds)
Cbc0032I Strong branching done 2026 times (26893 iterations), fathomed 0 nodes and fixed 0 variables
Cbc0035I Maximum depth 1208, 9 variables fixed on reduced cost
Cuts at root node changed objective from 1.89712e+06 to 1.91129e+06
Probing was tried 16 times and created 0 cuts of which 1390 were active after adding rounds of cuts (1.375 seconds)
Gomory was tried 608 times and created 2742 cuts of which 0 were active after adding rounds of cuts (49.328 seconds)
Knapsack was tried 16 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.699 seconds)
Clique was tried 16 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.027 seconds)
MixedIntegerRounding2 was tried 608 times and created 669 cuts of which 0 were active after adding rounds of cuts (31.155 seconds)
FlowCover was tried 16 times and created 0 cuts of which 0 were active after adding rounds of cuts (1.540 seconds)
TwoMirCuts was tried 608 times and created 3623 cuts of which 0 were active after adding rounds of cuts (23.419 seconds)
ZeroHalf was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Stopped on time limit

Objective value:                -100000000000000007629769841091887003294964970946560.00000000
Upper bound:                    -1911366.499
Gap:                            -52318589899578552273037687760527490690318336.00
Enumerated nodes:               3496
Total iterations:               17987
Time (CPU seconds):             1196.45
Time (Wallclock seconds):       1218.29

Total time (CPU seconds):       1196.47   (Wallclock seconds):       1218.31
@jjhforrest
Copy link
Contributor

jjhforrest commented Jan 27, 2021 via email

@Dx-Wang
Copy link
Author

Dx-Wang commented Jan 28, 2021

Thanks for the tips.
For version 2.10.3, which is the version used by JuMP through Cbc.jl:

  • I tried turning the problem to a minimization one, and got the same behavior.
  • I tried with presolve off, the problem is gone (for both minimization and maximization versions of the problem).

For the master branch, this doesn't seems to be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants