ls-cwi / heinz

Single species module discovery
MIT License
13 stars 8 forks source link

unconnected solution after preprocessing #2

Closed assaron closed 9 years ago

assaron commented 9 years ago

Hey,

Current version of heinz (master-747cf66) still sometimes gives unconnected solution if there is a time limit.

I'm running heinz -n nodes.txt -e edges.txt -o out.txt -t 1 for the files from the example https://www.dropbox.com/s/hmm6aluh6jzgnax/graph3d3733dc3423.tar.gz?dl=0. As far as I understand time limit is so small it basically makes heinz to output solution just after preprocessing. And this solution (with weight 4.2218) is unconnected.

Here is relevant part of log:

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap         Variable B NodeID Parent  Depth

*     0+    0                            4.2218        4.7250      360   11.92%
      0     0        4.7250    28        4.2218        4.7250      360   11.92%
      0     2        4.7250    28        4.2218        4.7248      360   11.91%                        0             0
Elapsed time = 0.31 sec. (167.16 ticks, tree = 0.01 MB, solutions = 0)
...
     38    40        4.6789     4        4.2218        4.6789      707   10.83%        x_C06141 U     38     36      5
     39    41        4.6789     4        4.2218        4.6789      709   10.83%        x_C06140 D     39     37      6

GUB cover cuts applied:  3                       
Cover cuts applied:  18                          
Zero-half cuts applied:  17                      
Gomory fractional cuts applied:  12              
User cuts applied:  1254                         

Root node processing (before b&c):               
  Real time             =    0.30 sec. (167.15 ticks)
Sequential b&c:                                  
  Real time             =    0.71 sec. (188.08 ticks)
                          ------------           
Total (root+branch&cut) =    1.01 sec. (355.24 ticks)
[4.22175, 4.6789]      
melkebir commented 9 years ago

Thanks for reporting this. This is indeed due to the time limit. With a time limit of 1 sec CPLEX does not get to identifying violated connectivity constraints for this instance. I don't see an easy way of overriding the specified time-limit to allow for exactly enough time for CPLEX to start separating cuts.

assaron commented 9 years ago

Can sugest to select the biggest connected component from the CPLEX solution? Probably, it should not be very hard to do. When using the solver with time limit, I'm not expecting the solution to be invalid: may be not optimal, but valid.

assaron commented 9 years ago

Also, I forgot to mention, that I sometimes have this problem even for 20 seconds time limit with 6 threads.