<br><font size=2 face="sans-serif">Anureet,</font>
<br>
<br><font size=2 face="sans-serif">The coding in ClpModel could lead to
problems and I have changed it but that was not the problem here. &nbsp;There
is no efficient way for the code to know what names already exist when
it adds rows and so you will get two rows called R0000007 with your test
case. &nbsp;You could of course drop all names at the beginning which would
make adding cuts slightly faster and then the writeMps would generate names
each time.</font>
<br>
<br><font size=2 face="sans-serif">What I have done is to modify writeMps
in CoinMpsIO.cpp so that it will check for duplicate names (only of the
type Rnnnnnnn or Cnnnnnnn) and change them with a message. &nbsp;With your
test case you now get R0000005, R0000007, R0000009, R0000008 as the last
4 row names. &nbsp;That is the best I can think of for now. &nbsp;As a
user you could also note the number of original rows and then rename any
additional cuts left at time of writeMps.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Anureet Saxena &lt;anureet@yahoo.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: coin-discuss-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">02/21/2006 09:44 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Discussions about open source software for Operations Research &nbsp; &nbsp;
&nbsp; &nbsp;&lt;coin-discuss@list.coin-or.org&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">coin-discuss@list.coin-or.org, anureet@yahoo.com,
anureet@cmu.com, fmargot@andrew.cmu.edu</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Coin-discuss] Problem with row names
in ClpModel</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>hi,</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>I think there is an error in the row (re)naming routines
of ClpModel. I am using the latest version of Clp, which I downloaded today
(Feb 21, 2006).</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>There is a small code with 5 variables and 5 constraints
which captures this error and is available at </font>
<br><font size=3>&nbsp;</font>
<br><a href=http://www.andrew.cmu.edu/user/anureets/workspace.tgz><font size=3 color=blue><u>http://www.andrew.cmu.edu/user/anureets/workspace.tgz</u></font></a>
<br><font size=3>&nbsp;</font>
<br><font size=3>A README file in the above .tgz directory contains a brief
message describing the code. In particular, after the following operations
the test3.mps file generated by the code is corrupted (it has two rows
with the same name):</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>o 3 cuts added</font>
<br><font size=3>o 1 cut is removed</font>
<br><font size=3>o 2 cuts added</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>The bug seems to be related to the following piece of
code from ClpModel::resize()</font>
<br><font size=3>--------------------------------------</font>
<br><font size=3>#ifndef CLP_NO_STD<br>
 &nbsp;if (lengthNames_) {<br>
 &nbsp; &nbsp;// reduce row and column names vectors only if necessary<br>
 &nbsp; &nbsp;if (rowNames_.size() &lt; (unsigned int)numberRows_)<br>
 &nbsp; &nbsp; &nbsp;rowNames_.resize(numberRows_);<br>
 &nbsp; &nbsp;if (columnNames_.size() &lt; (unsigned int)numberColumns_)<br>
 &nbsp; &nbsp; &nbsp;columnNames_.resize(numberColumns_);<br>
 &nbsp;}<br>
#endif</font>
<br><font size=3>-------------------------------------------------------</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>I guess the row and column names vectors should be resized
&quot;always&quot; irrespective of whether </font>
<br><font size=3>&nbsp;</font>
<br><font size=3>&quot;rowNames_.size() &lt; (unsigned int)numberRows_)
&quot;</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>or not. I would greatly appreciate any help in this regard.</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>Thanking You,</font>
<br><font size=3>Anureet Saxena</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>&nbsp;</font>
<br><font size=3><br>
<br>
Anureet Saxena<br>
anureet@cmu.edu<br>
anureet@yahoo.com<br>
<br>
--This mail was delivered to you on 100% recyclable electrons.</font>
<p><font size=3>__________________________________________________<br>
Do You Yahoo!?<br>
Tired of spam? Yahoo! Mail has the best spam protection around <br>
http://mail.yahoo.com </font><tt><font size=2>_______________________________________________<br>
Coin-discuss mailing list<br>
Coin-discuss@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-discuss<br>
</font></tt>
<p>