[Osi] OsiGrb assertion failed
Murilo Reolon Scuzziato
muriloscz at gmail.com
Fri Jan 17 05:00:56 EST 2014
Hi,
I am using the OsiSolverGrbInterface and some unexpected things are
happened.
When I use the method deleteCols() and after that I use the method
addCol(), I got
Assertion failed: minsize == 0 || coltype_ != NULL,
file OsiGrbSolverInterface.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 * columnIndices)
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.
Regards,
Murilo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20140117/bcf52bba/attachment.html>
More information about the Osi
mailing list