Opened 3 years ago
Closed 3 years ago
#185 closed defect (migrated)
Preprocessing Error with CBC in pyomo
Reported by: | adimodi610 | Owned by: | tkr |
---|---|---|---|
Priority: | major | Component: | Cbc |
Version: | 2.9.8 | Keywords: | CCCC |
Cc: |
Description
Hi
I am solving a integer programming problem with CBC using pyomo in python.
When i am not specifying Preprocessing= "off" in model. CBC is giving following output.
Cbc0004I Integer solution of -18673.699 found after 106285 iterations and 5977 nodes (26.18 seconds) Cbc0010I After 6000 nodes, 172 on tree, -18673.699 best solution, best possible -19341.306 (26.40 seconds) Cbc0038I Full problem 487 rows 665 columns, reduced to 98 rows 123 columns Cbc0010I After 7000 nodes, 606 on tree, -18673.699 best solution, best possible -19341.306 (30.37 seconds) Cbc0038I Full problem 487 rows 665 columns, reduced to 97 rows 122 columns Cbc0038I Full problem 487 rows 665 columns, reduced to 97 rows 122 columns Cbc0010I After 8000 nodes, 1036 on tree, -18673.699 best solution, best possible -19341.306 (33.06 seconds) Cbc0038I Full problem 487 rows 665 columns, reduced to 99 rows 124 columns Cbc0012I Integer solution of -19005.863 found by rounding after 135072 iterations and 8417 nodes (34.26 seconds) Cbc0012I Integer solution of -19165.821 found by rounding after 135100 iterations and 8424 nodes (34.28 seconds) Cbc0038I Full problem 487 rows 665 columns, reduced to 66 rows 90 columns Cbc0010I After 9000 nodes, 437 on tree, -19165.821 best solution, best possible -19341.306 (37.47 seconds) Cbc0010I After 10000 nodes, 501 on tree, -19165.821 best solution, best possible -19341.306 (40.19 seconds) Cbc0038I Full problem 487 rows 665 columns, reduced to 61 rows 83 columns Cbc0010I After 11000 nodes, 522 on tree, -19165.821 best solution, best possible -19341.306 (42.42 seconds) Cbc0010I After 12000 nodes, 878 on tree, -19165.821 best solution, best possible -19248.291 (56.64 seconds) Cbc0010I After 13000 nodes, 1118 on tree, -19165.821 best solution, best possible -19232.913 (66.89 seconds) Cbc0004I Integer solution of -19176.303 found after 304826 iterations and 13286 nodes (67.40 seconds) Cbc0004I Integer solution of -19201.71 found after 309361 iterations and 13492 nodes (68.12 seconds) Cbc0010I After 14000 nodes, 571 on tree, -19201.71 best solution, best possible -19232.913 (69.75 seconds) Cbc0038I Full problem 487 rows 665 columns, reduced to 99 rows 136 columns Cbc0010I After 15000 nodes, 577 on tree, -19201.71 best solution, best possible -19219.817 (79.08 seconds) Cbc0011I Exiting as integer gap of 18.106987 less than 1e-10 or 0.1% Cbc0001I Search completed - best objective -19201.70987434507, took 378930 iterations and 15001 nodes (79.10 seconds) Cbc0032I Strong branching done 19396 times (255204 iterations), fathomed 333 nodes and fixed 2694 variables Cbc0035I Maximum depth 151, 35742 variables fixed on reduced cost 0 Obj -21105.956 Primal inf 4822.701 (250) Dual inf 9.2984993e+13 (172) End of values pass after 86 iterations 86 Obj -19926.913 Primal inf 455.19681 (89) Dual inf 5.1983959e+13 (105) Perturbing problem by 0.001 % of 108.83248 - largest nonzero change 0.00080540261 (% 0.00085681129) - largest zero change 1.9933183e-05 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) 167 Obj -19201.71 Primal inf 8.1575092e-07 (1) Primal infeasible - objective value -19201.71 Cuts at root node changed objective from -22813.4 to -19341.3 Probing was tried 16542 times and created 78915 cuts of which 109 were active after adding rounds of cuts (4.173 seconds) Gomory was tried 15528 times and created 31132 cuts of which 0 were active after adding rounds of cuts (5.924 seconds) Knapsack was tried 15529 times and created 16043 cuts of which 0 were active after adding rounds of cuts (9.498 seconds) Clique was tried 15 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.001 seconds) MixedIntegerRounding2 was tried 15529 times and created 19002 cuts of which 0 were active after adding rounds of cuts (4.872 seconds) FlowCover was tried 15 times and created 39 cuts of which 0 were active after adding rounds of cuts (0.008 seconds) TwoMirCuts was tried 15528 times and created 6703 cuts of which 0 were active after adding rounds of cuts (2.403 seconds) ImplicationCuts was tried 501 times and created 6044 cuts of which 0 were active after adding rounds of cuts (0.034 seconds) Cgl0014I Postprocessing changed objective from -19201.71 to 0 - possible tolerance issue - try without preprocessing Result - Optimal solution found (within gap tolerance) Objective value: -19201.70987435 Lower bound: -19219.817 Gap: 0.00 Enumerated nodes: 15001 Total iterations: 378930 Time (CPU seconds): 78.91 Time (Wallclock seconds): 79.12 Total time (CPU seconds): 78.97 (Wallclock seconds): 79.18
But when i am specifying, Preprocessing = "off" in model, getting following output.
Cbc0010I After 1400 nodes, 501 on tree, -17956.092 best solution, best possible -19454.06 (57.00 seconds) Cbc0038I Full problem 10441 rows 10504 columns, reduced to 49 rows 72 columns Cbc0012I Integer solution of -18008.126 found by RINS after 42458 iterations and 1500 nodes (62.35 seconds) Cbc0010I After 1500 nodes, 544 on tree, -18008.126 best solution, best possible -19454.06 (62.35 seconds) Cbc0010I After 1600 nodes, 595 on tree, -18008.126 best solution, best possible -19454.06 (67.16 seconds) Cbc0010I After 1700 nodes, 645 on tree, -18008.126 best solution, best possible -19454.06 (71.17 seconds) Cbc0038I Full problem 10441 rows 10504 columns, reduced to 44 rows 71 columns Cbc0012I Integer solution of -18277.113 found by RINS after 52959 iterations and 1800 nodes (75.27 seconds) Cbc0010I After 1800 nodes, 634 on tree, -18277.113 best solution, best possible -19454.06 (75.27 seconds) Cbc0010I After 1900 nodes, 679 on tree, -18277.113 best solution, best possible -19454.06 (80.47 seconds) Cbc0010I After 2000 nodes, 727 on tree, -18277.113 best solution, best possible -19454.06 (84.79 seconds) Cbc0010I After 2100 nodes, 777 on tree, -18277.113 best solution, best possible -19454.06 (89.12 seconds) Cbc0010I After 2200 nodes, 820 on tree, -18277.113 best solution, best possible -19454.06 (93.46 seconds) Cbc0010I After 2300 nodes, 863 on tree, -18277.113 best solution, best possible -19454.06 (97.97 seconds) Cbc0038I Full problem 10441 rows 10504 columns, reduced to 42 rows 63 columns Cbc0010I After 2400 nodes, 908 on tree, -18277.113 best solution, best possible -19454.06 (102.29 seconds) Cbc0010I After 2500 nodes, 957 on tree, -18277.113 best solution, best possible -19454.06 (106.65 seconds) Cbc0010I After 2600 nodes, 1005 on tree, -18277.113 best solution, best possible -19454.06 (111.13 seconds) Cbc0010I After 2700 nodes, 1051 on tree, -18277.113 best solution, best possible -19454.06 (115.26 seconds) Cbc0010I After 2800 nodes, 1099 on tree, -18277.113 best solution, best possible -19454.06 (119.16 seconds) Cbc0020I Exiting on maximum time Cbc0005I Partial search - best objective -18277.113 (best possible -19454.06), took 97910 iterations and 2822 nodes (120.03 seconds) Cbc0032I Strong branching done 11466 times (68270 iterations), fathomed 17 nodes and fixed 157 variables Cbc0035I Maximum depth 147, 2435 variables fixed on reduced cost Cuts at root node changed objective from -25143.8 to -19454.1 Probing was tried 5616 times and created 41164 cuts of which 31 were active after adding rounds of cuts (6.332 seconds) Gomory was tried 5611 times and created 12474 cuts of which 0 were active after adding rounds of cuts (14.109 seconds) Knapsack was tried 5611 times and created 2807 cuts of which 0 were active after adding rounds of cuts (36.735 seconds) Clique was tried 20 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.003 seconds) MixedIntegerRounding2 was tried 5611 times and created 9514 cuts of which 0 were active after adding rounds of cuts (8.361 seconds) FlowCover was tried 5611 times and created 988 cuts of which 0 were active after adding rounds of cuts (1.096 seconds) TwoMirCuts was tried 5611 times and created 1985 cuts of which 0 were active after adding rounds of cuts (10.246 seconds) ImplicationCuts was tried 34 times and created 198 cuts of which 0 were active after adding rounds of cuts (0.003 seconds) Result - Stopped on time limit Objective value: -18277.11318678 Lower bound: -19454.060 Gap: 0.06 Enumerated nodes: 2822 Total iterations: 97910 Time (CPU seconds): 119.41 Time (Wallclock seconds): 120.04 Total time (CPU seconds): 119.47 (Wallclock seconds): 120.10
The main problem is why do we need to specify preprocessing = "off" to get solution?
and when preprocessing is on, why it is converting optimal solution (objective) to 0.
Cgl0014I Postprocessing changed objective from -19201.71 to 0 - possible tolerance issue - try without preprocessing
I am also attaching LP problem file for your reference.
Attachments (1)
Change History (2)
Changed 3 years ago by adimodi610
comment:1 Changed 3 years ago by stefan
- Resolution set to migrated
- Status changed from new to closed
This ticket has been migrated to GitHub and will be resolved there: https://github.com/coin-or/Cbc/issues/185
LP Problem File