[Coin-lpsolver] bug in ClpModel

John J Forrest jjforre at us.ibm.com
Wed Jun 29 08:54:18 EDT 2005


Thanks Francois.

John Forrest



François Galea <Francois.Galea at prism.uvsq.fr> 
Sent by: coin-lpsolver-bounces at list.coin-or.org
06/27/2005 12:54 PM

To
coin-lpsolver at list.coin-or.org
cc

Subject
[Coin-lpsolver] bug in ClpModel






there is a small bug in the copyColumnNames / copyRowNames methods in 
ClpModel.cpp.

I corrected it in the attached patch.


-- 
François Galea
Equipe OPALE - Laboratoire PRiSM
Université de Versailles-Saint Quentin en Yvelines
45 av Etats-Unis F-78035 Versailles CEDEX
Tél. : +33 1 39 25 40 50
--- COIN/Clp/ClpModel.cpp.orig           2005-06-27 18:46:56.000000000 
+0200
+++ COIN/Clp/ClpModel.cpp                2005-06-27 18:47:32.000000000 
+0200
@@ -2806,7 +2806,7 @@
   int iRow;
   for (iRow=first; iRow<last;iRow++) {
     rowNames_[iRow]= rowNames[iRow-first];
-    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(rowNames_[iRow].c_str()));
+    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(rowNames_[iRow-first].c_str()));
   }
   // May be too big - but we would have to check both rows and columns to 
be exact
   lengthNames_=(int) maxLength;
@@ -2822,7 +2822,7 @@
   int iColumn;
   for (iColumn=first; iColumn<last;iColumn++) {
     columnNames_[iColumn]= columnNames[iColumn-first];
-    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(columnNames_[iColumn].c_str()));
+    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(columnNames_[iColumn-first].c_str()));
   }
   // May be too big - but we would have to check both rows and columns to 
be exact
   lengthNames_=(int) maxLength;
@@ -2838,7 +2838,7 @@
   int iRow;
   for (iRow=first; iRow<last;iRow++) {
     rowNames_[iRow]= rowNames[iRow-first];
-    maxLength = CoinMax(maxLength,(unsigned int) strlen(rowNames[iRow]));
+    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(rowNames[iRow-first]));
   }
   // May be too big - but we would have to check both rows and columns to 
be exact
   lengthNames_=(int) maxLength;
@@ -2854,7 +2854,7 @@
   int iColumn;
   for (iColumn=first; iColumn<last;iColumn++) {
     columnNames_[iColumn]= columnNames[iColumn-first];
-    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(columnNames[iColumn]));
+    maxLength = CoinMax(maxLength,(unsigned int) 
strlen(columnNames[iColumn-first]));
   }
   // May be too big - but we would have to check both rows and columns to 
be exact
   lengthNames_=(int) maxLength;
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20050629/2dde6934/attachment.html>


More information about the Clp mailing list