[Cbc] Possible bug in Cbc-2.1.0

John J Forrest jjforre at us.ibm.com
Fri Jul 11 10:06:11 EDT 2008






Mikhail,

The error from valgrind is a genuine error if you enter branch and bound
twice - thanks.

The main problem is that too much information has been set up after a call
to branchAndBound (which also causes valgrind error).  One thing was that
the value of best solution has been set to -3e10 so solution on second
entry of -2e10 is rejected.

The simplest thing to do is change your driver to make changes to one copy
and then create another model for each entry to branchAndBound -


#include "OsiCbcSolverInterface.hpp"
#include <iostream>
using namespace std;

int main()
{
  OsiCbcSolverInterface testSave;
  testSave.readMps("mik.mps");
  OsiCbcSolverInterface test=testSave;
  test.branchAndBound();
  int ind[] = {0};
  double val[] = {1.0};
  testSave.addRow(CoinShallowPackedVector(1,ind,val),-1e10,4504.05);
  test=testSave;
  test.branchAndBound();
  return 0;
}

John Forrest


                                                                                                                        
  From:       Mikhail Nediak <MNediak at business.queensu.ca>                                                              
                                                                                                                        
  To:         cbc at list.coin-or.org                                                                                      
                                                                                                                        
  Date:       07/10/2008 08:46 PM                                                                                       
                                                                                                                        
  Subject:    [Cbc] Possible bug in Cbc-2.1.0                                                                           
                                                                                                                        





Hi,

I am using Cbc-2.1.0 via OSI on a 64-bit version of Fedora Core 7. Cbc was
compiled with debug info on.

I solve the problem with branchAndBound(), modify it by adding a feasible
constraint and then call branchAndBound() again. The solver complains about
infeasibility and, moreover, shows a memory handling issue when run through
valgrind. A bug?

I attach an example reproducing the problem and an accompanying mps file.

Thanks,
Mikhail


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20080711/965e17ab/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20080711/965e17ab/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cbc/attachments/20080711/965e17ab/attachment-0001.gif 


More information about the Cbc mailing list