coin-or / Cbc.old

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

[Trac #105] CBC 2.6 returns incorrect objective for small MIP #99

Open s-c-e opened 5 years ago

s-c-e commented 5 years ago

image

Attachment: https://github.com/s-c-e/cbc-trac-migration-attachments/blob/master/trac-ticket-105.zip

For the attached small MIP model CBC 2.6 returns an incorrect objective of -4 while the correct optimal objective is -4.5 (with x0 = -1.5, x1 = -3 and x2 = 1).

Cbc version 2.6, build Nov 23 2010
command line - cbcSolve semi4.lp -solve (default strategy 1)
Continuous objective value is -4.5 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0004I processed model has 3 rows, 3 columns (2 integer) and 7 elements
Cbc0038I Solution found of -4.5
Cbc0038I Branch and bound needed to clear up 1 general integers
Cbc0038I Full problem 3 rows 3 columns, reduced to 1 rows 2 columns
Cbc0038I Cleaned solution of -4.5
Cbc0038I Before mini branch and bound, 1 integers at bound fixed and 0 continuous
Cbc0038I Mini branch and bound did not improve solution (0.00 seconds)
Cbc0038I After 0.00 seconds - Feasibility pump exiting with objective of -4.5 - took 0.00 seconds
Cbc0012I Integer solution of -4.5 found by feasibility pump after 0 iterations and 0 nodes (0.00 seconds)
Cbc0009I Objective coefficients multiple of 1
Cbc0001I Search completed - best objective -4.5, took 0 iterations and 0 nodes (0.00 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from -4.5 to -4.5
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover? was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts? was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Cgl0014I Postprocessing changed objective from -4 to -4.5 - possible tolerance issue - try without preprocessing
Result - Finished objective -4 after 0 nodes and 0 iterations - took 0.00 seconds (total time 0.00)
Total time 0.00
Also without preprocessing CBC returned -4. (The "Postprocessing changed objective from -4 to -4.5" seems a bit confusing because it looks like Postprocessing changed the objective from -4.5 to -4.)

Thanks,

Marcel

s-c-e commented 5 years ago

I used this version and build of CBC here:

Welcome to the CBC MILP Solver 
Version: 2.8.12 
Build Date: Feb 22 2016 

And I run this command, yielding this log file:

a@A:~/Documents/cbc-debug$ cbc -import semi4.lp solve > log.log 2>&1
Welcome to the CBC MILP Solver 
Version: 2.8.12 
Build Date: Feb 22 2016 

command line - cbc -import semi4.lp solve (default strategy 1)
Continuous objective value is -4.5 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
Cgl0004I processed model has 3 rows, 3 columns (2 integer) and 7 elements
Cbc0038I Solution found of -4.5
Cbc0038I Branch and bound needed to clear up 1 general integers
Cbc0038I Full problem 3 rows 3 columns, reduced to 1 rows 2 columns
Cbc0038I Cleaned solution of -4.5
Cbc0038I Before mini branch and bound, 1 integers at bound fixed and 0 continuous
Cbc0038I Mini branch and bound did not improve solution (0.00 seconds)
Cbc0038I After 0.00 seconds - Feasibility pump exiting with objective of -4.5 - took 0.00 seconds
Cbc0012I Integer solution of -4.5 found by feasibility pump after 0 iterations and 0 nodes (0.00 seconds)
Cbc0001I Search completed - best objective -4.5, took 0 iterations and 0 nodes (0.00 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from -4.5 to -4.5
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                -4.50000000
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.00

Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00
s-c-e commented 5 years ago

@tkralphs and @h-g-s given that this newer version of CBC returns the objective value -4.5, I think this ticket can be marked as resolved/closed.