coin-or / Cbc

COIN-OR Branch-and-Cut solver
Other
814 stars 115 forks source link

missing Result after TimeOut #621

Closed raller09 closed 1 year ago

raller09 commented 1 year ago

Hi,

i'm testing with cbc master branch a long runnig model on Windows:

lpi583A.zip

with the cli or interactive i wont get Result - ... and following lines or the solution files.

It is a long running model but after some moments a first solution is found. So i tryed to set a time out with the "sec 10" command.

In interactive mode:

import lpi583A.mps
sec 10
solve

cbc quits after 10 seconds (same behavior without sec but pressing ctrl+c):

D:\git\coin-or\coinbrew\Cbc\MSVisualStudio\v17\x64\Release>cbc
Welcome to the CBC MILP Solver
Version: trunk
Build Date: Sep 25 2023
Cbc takes input from arguments ( - switches to stdin)
Enter ? for list of commands or help
Cbc: import lpi583A.mps
At line 9 NAME          20230927 120707 074
At line 10 ROWS
At line 4554 COLUMNS
At line 32526 RHS
At line 34726 RANGES
At line 35413 BOUNDS
At line 42177 ENDATA
Problem 20230927 has 4542 rows, 4596 columns and 49074 elements
2037 semi-continuous variables - report odd behavior
Coin0008I 20230927 read with 0 errors
Cbc: sec 10
seconds was changed from 1e+08 to 10
Cbc: solve
Continuous objective value is 60199.1 - 0.063 seconds
No integer variables
Cgl0004I processed model has 3003 rows, 3778 columns (0 integer (0 of which binary)) and 40417 elements
Cbc3007W No integer variables
Pre-processing reduced number of SC variables from 2037 to 1960
Coin3009W Conflict graph built in 0.002 seconds, density: 0.000%
Cgl0015I Clique Strengthening extended 0 cliques, 0 were dominated
Cbc0036I Heuristics switched off as 1960 branching objects are of wrong type
Cbc0013I At root node, 0 cuts changed objective from 60199.175 to 60199.175 in 1 passes
Cbc0014I Cut generator 0 (Probing) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.001 seconds - new frequency is -100
Cbc0014I Cut generator 1 (Gomory) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.002 seconds - new frequency is -100
Cbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.007 seconds - new frequency is -100
Cbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is -100
Cbc0014I Cut generator 4 (OddWheel) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is -100
Cbc0014I Cut generator 5 (MixedIntegerRounding2) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.001 seconds - new frequency is -100
Cbc0014I Cut generator 6 (FlowCover) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.006 seconds - new frequency is -100
Cbc0010I After 0 nodes, 1 on tree, 1e+50 best solution, best possible 60199.552 (0.23 seconds)
Cbc0010I After 36 nodes, 37 on tree, 1e+50 best solution, best possible 60199.552 (0.94 seconds)
Cbc0016I Integer solution of 60252.883 found by strong branching after 89 iterations and 72 nodes (1.57 seconds)
Cbc0016I Integer solution of 60230.113 found by strong branching after 89 iterations and 72 nodes (1.61 seconds)
Cbc0010I After 74 nodes, 70 on tree, 60230.113 best solution, best possible 60199.552 (1.68 seconds)
Cbc3008W Strong branching is fixing too many variables, too expensively!
Cbc0010I After 88 nodes, 58 on tree, 60230.113 best solution, best possible 60199.552 (2.40 seconds)
Cbc0010I After 100 nodes, 52 on tree, 60230.113 best solution, best possible 60199.552 (3.11 seconds)
Cbc0010I After 120 nodes, 49 on tree, 60230.113 best solution, best possible 60199.552 (3.83 seconds)
Cbc0010I After 144 nodes, 49 on tree, 60230.113 best solution, best possible 60199.552 (4.55 seconds)
Cbc0010I After 175 nodes, 54 on tree, 60230.113 best solution, best possible 60199.552 (5.26 seconds)
Cbc0010I After 206 nodes, 65 on tree, 60230.113 best solution, best possible 60199.552 (5.96 seconds)
Cbc0010I After 241 nodes, 83 on tree, 60230.113 best solution, best possible 60199.552 (6.67 seconds)
Cbc0010I After 271 nodes, 96 on tree, 60230.113 best solution, best possible 60199.552 (7.40 seconds)
Cbc0010I After 294 nodes, 99 on tree, 60230.113 best solution, best possible 60199.552 (8.14 seconds)
Cbc0010I After 327 nodes, 114 on tree, 60230.113 best solution, best possible 60199.552 (8.89 seconds)
Cbc0010I After 359 nodes, 126 on tree, 60230.113 best solution, best possible 60199.552 (9.60 seconds)
Cbc0020I Exiting on maximum time
Cbc0005I Partial search - best objective 60230.113 (best possible 60199.552), took 575 iterations and 378 nodes (10.00 seconds)
Cbc0032I Strong branching done 5756 times (8259 iterations), fathomed 55 nodes and fixed 323 variables
Cbc0035I Maximum depth 71, 0 variables fixed on reduced cost
Cuts at root node changed objective from 60199.2 to 60199.6
Probing was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.001 seconds)
Gomory was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.002 seconds)
Knapsack was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.007 seconds)
Clique was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0 seconds)
OddWheel was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0 seconds)
MixedIntegerRounding2 was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.001 seconds)
FlowCover was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.006 seconds)
TwoMirCuts was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.002 seconds)
ZeroHalf was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0 seconds)
Cgl0013I Postprocessed model is infeasible - possible tolerance issue - try without preprocessing

the commans line call CBC.exe "lpi583A.mps" -directory "%Temp%" -sec 10 -solve -solution "solution.cbc" -printingOptions all -solution "all.cbc" -printingOptions objective -solution "objectiveranges.cbc" -printingOptions rhs -solution "rhsranges.cbc" -printingOptions bound -solution "boundranges.cbc" produces the same output and will not create the solution files.

i thought that "60230.113 best solution, best possible 60199.552" meant that a solution was found and could be used.

I looked with my limited c skills into the source code and assume there is an exception in CglPreProcess.cpp Line 5748-5757 on the 2 pass of the loop -> in "if (deleteStuff) {"

Should there the "Result - ..." lines in the output?

Thank you,

Ralf

jjhforrest commented 1 year ago

There is a clue in the line

2037 semi-continuous variables - report odd behavior

semi-continuous variables are not much used and it looks as if there is a bug in pre or post processing.

I will look into it. For the moment take the advice given - Cgl0013I Postprocessed model is infeasible - possible tolerance issue - try without preprocessing

so add -preprocess off. That seems to work but will be somewhat slower.

raller09 commented 1 year ago

HI,

thank you very much for the very quick response.

Then this could be "odd behavior" :) Thanks a lot for your help.

Ralf

jjhforrest commented 1 year ago

Hopefully fixed now (in master)

raller09 commented 1 year ago

Hi, it works with my examples.

Thank you, Ralf