[Osi] OsiGrb assertion failed

Murilo Reolon Scuzziato muriloscz at gmail.com
Fri Jan 17 08:04:38 EST 2014


Hi,

Yes, I tried the patch and it worked well. Thank you!

Regards,
Murilo


2014/1/17 Stefan Vigerske <stefan at math.hu-berlin.de>

> Hi,
>
> thanks for the bugreport.
>
> I agree that coltype_ should not be just deleted there, but it may need to
> be updated.
> It works fine if you remove only last columns, but if one removes some in
> the middle, the holes need to be filled with values from later positions.
>
> Can you try if the attached patch also works for you?
>
> Thanks,
> Stefan
>
>
> On 01/17/2014 11:00 AM, Murilo Reolon Scuzziato wrote:
>
>> 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
>>
>>
>>
>> _______________________________________________
>> Osi mailing list
>> Osi at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/osi
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20140117/ba48881c/attachment-0001.html>


More information about the Osi mailing list