<div dir="ltr"><div>Hi,</div><div><br></div><div>I am using the OsiSolverGrbInterface and some unexpected things are happened.</div><div><br></div><div>When I use the method deleteCols() and after that I use the method addCol(), I got</div>

<div><br></div><div>        Assertion failed: minsize == 0 || coltype_ != NULL,</div><div>        file OsiGrbSolverInterface.cpp, line 187</div><div><br></div><div>This is because minsize &gt; 0 and coltype_ == NULL, which in turn is due to the fact that in</div>

<div><br></div><div>OsiGrbSolverInterface::deleteCols(const int num, const int * columnIndices)</div><div><br></div><div>at lines 2437 to 2441 the following piece of code</div><div><br></div><div>if( coltype_ )</div><div>

{</div><div> delete[] coltype_;</div><div> coltype_ = NULL;</div><div> }</div><div><br></div><div>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.</div>

<div><br></div><div>Indeed, commenting out these lines the code works well in my application (as checked by comparing with OsiCpx).</div><div><br></div><div>I thought you may want to know. Maybe I&#39;m wrong, and in this case I&#39;d really appreciate if you could give me a hint about why the error may occur, but in the odd chance I&#39;m right you may want to correct the issue.</div>

<div><br></div><div>If you need further details about how the assert() is produced I&#39;ll be happy to provide them.</div><div><br></div><div>Regards,</div><div>Murilo</div></div>