[Coin-lpsolver] possible bug in OsiClp

Matthew Saltzman mjs at CLEMSON.EDU
Thu Jul 26 01:22:18 EDT 2007


Anureet-

Please file a ticket at https://projects.coin-or.org/Osi.  You'll need
to register (if you have not) and log in in order to create a ticket.

Thanks.

On Wed, 2007-07-25 at 19:47 -0700, Anureet Saxena wrote:
> hi,
>  
> I am using the latest version of Cgl, and the accompanying OsiClp
> code. I beleive there is a problem on 1665 of the file
> OsiClpSolverInterface.cpp. I hereby reproduce the relevent code.
>  
> void
> OsiClpSolverInterface::loadProblem(const CoinPackedMatrix& matrix,
>                        const double* collb, const double* colub,
>                        const double* obj,
>                        const char* rowsen, const double* rowrhs,
>                        const double* rowrng)
> {
>   // Get rid of integer information (modelPtr will get rid of its
> copy)
>   assert( rowsen != NULL );
>   assert( rowrhs != NULL );
>   int numrows = matrix.getNumRows();
>   double * rowlb = new double[numrows];
>   double * rowub = new double[numrows];
>   for (int i = numrows-1; i >= 0; --i) {
> 
> convertSenseToBound(rowsen[i],rowrhs[i],rowrng[i],rowlb[i],rowub[i]); /** PROBLEM */
>   }
>   loadProblem(matrix, collb, colub, obj, rowlb, rowub);
>   delete [] rowlb;
>   delete [] rowub;
> }
> 
> Note that the above code will give a segmentation fault if
> rowrng=NULL. However the documentation in OsiClpSolverInterface.hpp
> says that rowrng=NULL is allowed, and in that case rowrng[i]=0 is
> assumed for all ranged rows. Thus we either need to change the
> documentation or modify the above function to account for the
> possibility rowrng=NULL.
>  
> regards,
> anureet
>  
> 
> 
> Anureet Saxena
> anureet at cmu.edu
> anureet at yahoo.com
> 
> --This mail was delivered to you on 100% recyclable electrons.
> 
> 
> ______________________________________________________________________
> Pinpoint customers who are looking for what you sell. 
> _______________________________________________
> Coin-lpsolver mailing list
> Coin-lpsolver at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-lpsolver
-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the Clp mailing list