<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Kish,<br>
<br>
This was more difficult to fix than I expected. The coding for
readLp uses fscanf("%s") which is totally dependent on space as a
separator. <br>
<br>
I think I have fixed in trunk (you can just copy over CoinLpIO.?pp
to stable. I have tried it on all the .lp files I have - which is
not that many. Some files had lines with more than 100K
characters which caused some problems.<br>
<br>
Please can people check I have not introduced any bugs. Also if
you want any other cosmetic changes - now is the time to ask for
them.<br>
<br>
John Forrest<br>
On 16/02/18 11:51, Kish Shen wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHM-QAsgM8FZoHL68LrW8a3JJ4LQ9EipiFsUnmJMzpHhCPX+cQ@mail.gmail.com">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>
<div>Hi,<br>
<br>
</div>
I posted about this to coin-discuss mailing list yesterday,
but it has not appear there, and there seems to be no messages
for the list since Sept 2017, so I am posting this here as
well, in case something is wrong with the coin-discuss mailing
list.<br>
<br>
I am getting errors from Cbc when reading an LP format file
generated by CPLEX 12:<br>
<br>
### CoinLpIO::readLp(): bad SOS item S1<br>
<br>
I assume this is from reading the SOS items in the LP file
like:<br>
<br>
s999: S1 :: x1154 : 1 x5539 : 2<br>
<br>
Looking at CoinLpIO.cpp, the code expects no space between S1
and ::<br>
<br>
if (next>=buff&&(!strncmp(next,"<wbr>S1::",4)||!strncmp(next,"S2::"<wbr>,4)))
{<br>
setType = next[1]-'0';<br>
gotStart=true;<br>
} else {<br>
// error<br>
goodLine=0;<br>
}<br>
<br>
<div>I edited the LP file and changed all the 'S1 ::' to
'S1::', and I then got errors about x1154: repeatedly.<br>
</div>
<div>So it looks like the error handling does not advance to
the next line after finding an error.<br>
<br>
</div>
<div>I edited removed all the spaces before ':' for the SOS
items, and the file was then read without errors.<br>
</div>
<div> <br>
</div>
<div>Should ReadLp be changed to read the SOS items generated
by CPLEX with the extra spaces?<br>
<br>
</div>
I am running the latest stable branch of Cbc 2.9, downloaded
via svn co about 2 days ago.<br>
<br>
</div>
<div>Thanks and cheers,<br>
<br>
</div>
<div>Kish<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="https://list.coin-or.org/mailman/listinfo/cbc">https://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>