[Coin-discuss] small MPS IO issue

Livio Bertacco livio at bertacco.it
Fri Jan 16 14:20:35 EST 2004


Hello,

Is this the proper place to submit bug/fixes?

There is a small issue with the MPS reader (CoinMpsIO.cpp).
If the NAME card isn't followed by a name (specifications say the name
is optional), then the reader gets the following LF or CRLF sequence as
the name. This is a bug (eol_ is not properly initialized) since in this
case, the name "no_name" should be used. 
Also this makes OsiGlpkSolverInterface fail since Glpk aborts when Osi
tries to set the name to LF or CRLF.

A quick fix is to change CoinMpsIO.cpp as:
237a238
>       position_ = eol_ = card_ + strlen ( card_ );
241c242
<       while ( next != eol_ ) {
---
>       while ( next < eol_ ) {
248c249
<       if ( next != eol_ ) {
---
>       if ( next < eol_ ) {

Livio






More information about the Coin-discuss mailing list