[Osi-tickets] [COIN-OR Open Solver Interface] #108: OsiSolverGrbInterface assertion failed

COIN-OR Open Solver Interface coin-trac at coin-or.org
Thu Jan 9 05:32:23 EST 2014

#108: OsiSolverGrbInterface assertion failed
 Reporter:  Murilo.R.S  |      Owner:  mjs
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:
Component:  OsiGrb      |    Version:  0.105
 Keywords:              |
 I am using the !OsiSolverGrbInterface and some unexpected things are

 When I use the method deleteCols() and after that I use the method
 addCol(), I got

         Assertion failed: minsize == 0 !|| coltype_ != NULL,
         file [https://projects.coin-
 OsiSolverGrbInterface.cpp], line 187

 This is because minsize > 0 and coltype_ == NULL, which in turn is due to
 the fact that in

 OsiGrbSolverInterface::deleteCols(const int num, const int *

 at lines 2437 to 2441 the following piece of code
 if( coltype_ )
  delete[] coltype_;
  coltype_ = NULL;
 deletes it. Although I cannot be sure, it seems to me that code is wrong,
 as coltype_ should only be deleted when *the last column* is deleted,
 leaving an empty problem; however, this is not the case.

 Indeed, commenting out these lines the code works well in my application
 (as checked by comparing with !OsiCpx).

 I thought you may want to know. Maybe I'm wrong, and in this case I'd
 really appreciate if you could give me a hint about why the error may
 occur, but in the odd chance I'm right you may want to correct the issue.

 If you need further details about how the assert() is produced I'll be
 happy to provide them.

Ticket URL: <https://projects.coin-or.org/Osi/ticket/108>
COIN-OR Open Solver Interface <http://projects.coin-or.org/Osi>
An API for a variety of LP and MIP solvers (and more).

More information about the Osi-tickets mailing list