saezlab / CARNIVAL

CAusal Reasoning for Network Identification with integer VALue programming in R
https://saezlab.github.io/CARNIVAL/
57 stars 29 forks source link

cbc error : 'data' must be of a vector type, was 'NULL' despite solution found #72

Closed laylagerami closed 2 years ago

laylagerami commented 3 years ago

Me again...

I can't get cbc solver to work. Not sure if it isn't generating results due to the nature of the error message, but it still says "Result - Optimal solution found". Have tried with InvCarnival only for now, with two different data inputs (both of which worked w/ Cplex) and a toy example.

The error message is below - the output starts with the usual text and then continually outputs the solving process as expected, then ends with:

Result - Optimal solution found

Objective value:                1.53549443
Enumerated nodes:               18300
Total iterations:               9011546
Time (CPU seconds):             47645.70
Time (Wallclock seconds):       2513.40

Total time (CPU seconds):       47647.50   (Wallclock seconds):      2513.99 
10:41:44 27.07.2021 Done: solving LP problem. 
10:41:44 27.07.2021 Getting the solution matrix 
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL' 

I used the same settings as I usually do with Cplex:

> carnivalOptions
$solverPath
[1] "/usr/bin/cbc"

$timelimit
[1] 3600

$threads
[1] 20

$solver
[1] "cbc"

$betaWeight
[1] 0.2

$poolrelGap
[1] 0.0001

$lpFilename
[1] ""

$workdir
[1] "output/"

$outputFolder
[1] "temp_carnival"

$cleanTmpFiles
[1] TRUE

$keepLPFiles
[1] FALSE

I also tried increasing/decreasing number of threads (including using 1 thread only) and time limit - still I get the same error.

The result file looks like this, not sure if a symptom or cause of the issue?

Status unknown - objective value 0.00000000

Layla

gabora commented 2 years ago

Hi @laylagerami I recently fixed a few things around CBC. If still interested, please give a try.

I used the CBC binary file from here: https://ampl.com/products/solvers/open-source/#cbc (macos version) For me it was working with 100 nodes, and 250ish edges. Not sure how well it scales beyond that.

best,