- Timestamp:
- Jul 28, 2009 8:25:35 AM (10 years ago)
- Location:
- stable/1.10/Clp
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/1.10/Clp
-
Property
svn:mergeinfo
set to
/stable/BSP/Clp merged eligible
-
Property
svn:mergeinfo
set to
-
stable/1.10/Clp/src/CbcOrClpParam.cpp
r1344 r1404 232 232 { 233 233 std::string::size_type shriekPos = name_.find('!'); 234 lengthName_ = name_.length();234 lengthName_ = (unsigned int)name_.length(); 235 235 if ( shriekPos==std::string::npos ) { 236 236 //does not contain '!' 237 237 lengthMatch_= lengthName_; 238 238 } else { 239 lengthMatch_= shriekPos;239 lengthMatch_=(unsigned int)shriekPos; 240 240 name_ = name_.substr(0,shriekPos)+name_.substr(shriekPos+1); 241 241 lengthName_--; … … 285 285 CbcOrClpParam::parameterOption ( std::string check ) const 286 286 { 287 int numberItems = definedKeyWords_.size();287 size_t numberItems = definedKeyWords_.size(); 288 288 if (!numberItems) { 289 289 return -1; 290 290 } else { 291 int whichItem=0;291 size_t whichItem=0; 292 292 unsigned int it; 293 293 for (it=0;it<definedKeyWords_.size();it++) { 294 294 std::string thisOne = definedKeyWords_[it]; 295 std::string::size_type 296 unsigned intlength1 = thisOne.length();297 unsigned intlength2 = length1;295 std::string::size_type shriekPos = thisOne.find('!'); 296 std::string::size_type length1 = thisOne.length(); 297 std::string::size_type length2 = length1; 298 298 if ( shriekPos!=std::string::npos ) { 299 299 //contains '!' … … 304 304 } 305 305 if (check.length()<=length1&&length2<=check.length()) { 306 unsigned inti;306 std::string::size_type i; 307 307 for (i=0;i<check.length();i++) { 308 308 if (tolower(thisOne[i])!=tolower(check[i])) … … 319 319 } 320 320 if (whichItem<numberItems) 321 return whichItem;321 return (int)whichItem; 322 322 else 323 323 return -1; … … 364 364 void CoinReadPrintit(const char * input) 365 365 { 366 int length =strlen(input);366 size_t length =strlen(input); 367 367 char temp[101]; 368 int i;368 size_t i; 369 369 int n=0; 370 370 for (i=0;i<length;i++) { … … 1156 1156 afterEquals = ""; 1157 1157 } 1158 int value=0;1158 size_t value=0; 1159 1159 //std::cout<<field<<std::endl; 1160 1160 if (field!="EOL") { … … 1172 1172 *valid=2; 1173 1173 } 1174 return value;1174 return (int)value; 1175 1175 } 1176 1176 double -
stable/1.10/Clp/src/ClpCholeskyDense.cpp
r1321 r1404 780 780 double dropValue = doubleParameters_[10]; 781 781 int firstPositive=integerParameters_[34]; 782 int rowOffset=diagonal-diagonal_;782 size_t rowOffset=diagonal-diagonal_; 783 783 int numberDropped=0; 784 784 int i, j, k; … … 795 795 bool dropColumn=false; 796 796 longDouble useT00=t00; 797 if ( j+rowOffset<firstPositive) {797 if ((int)(j+rowOffset)<firstPositive) { 798 798 // must be negative 799 799 if (t00<=-dropValue) { -
stable/1.10/Clp/src/ClpMain.cpp
r1344 r1404 239 239 int numberQuery=0; 240 240 if (field!="?"&&field!="???") { 241 int length = field.length();242 inti;241 size_t length = field.length(); 242 long i; 243 243 for (i=length-1;i>0;i--) { 244 244 if (field[i]=='?') … … 880 880 { 881 881 const char * c_name = field.c_str(); 882 int length = strlen(c_name);882 size_t length = strlen(c_name); 883 883 if (length>3&&!strncmp(c_name+length-3,".lp",3)) 884 884 gmpl=-1; // .lp … … 909 909 fileName = directory+field; 910 910 // See if gmpl (model & data) - or even lp file 911 int length = field.size();912 int percent = field.find('%');911 size_t length = field.size(); 912 size_t percent = field.find('%'); 913 913 if (percent<length&&percent>0) { 914 914 gmpl=1; 915 915 fileName = directory+field.substr(0,percent); 916 916 gmplData = directory+field.substr(percent+1); 917 if (percent <length-1)917 if (percent+1<length) 918 918 gmpl=2; // two files 919 919 printf("GMPL model file %s and data file %s\n", … … 1432 1432 std::string name = CoinReadGetString(argc,argv); 1433 1433 if (name!="EOL") { 1434 int length=name.length();1434 size_t length=name.length(); 1435 1435 if (name[length-1]==dirsep) { 1436 1436 directory = name; … … 1448 1448 std::string name = CoinReadGetString(argc,argv); 1449 1449 if (name!="EOL") { 1450 int length=name.length();1450 size_t length=name.length(); 1451 1451 if (name[length-1]==dirsep) { 1452 1452 dirSample = name; … … 1464 1464 std::string name = CoinReadGetString(argc,argv); 1465 1465 if (name!="EOL") { 1466 int length=name.length();1466 size_t length=name.length(); 1467 1467 if (name[length-1]==dirsep) { 1468 1468 dirNetlib = name; … … 1480 1480 std::string name = CoinReadGetString(argc,argv); 1481 1481 if (name!="EOL") { 1482 int length=name.length();1482 size_t length=name.length(); 1483 1483 if (name[length-1]==dirsep) { 1484 1484 dirMiplib = name; … … 1689 1689 int iRow; 1690 1690 int numberRows=models[iModel].numberRows(); 1691 int lengthName = models[iModel].lengthNames(); // 0 if no names1691 size_t lengthName = models[iModel].lengthNames(); // 0 if no names 1692 1692 // in general I don't want to pass around massive 1693 1693 // amounts of data but seems simpler here … … 1704 1704 double primalTolerance = models[iModel].primalTolerance(); 1705 1705 char format[6]; 1706 sprintf(format,"%%-%ds", CoinMax(lengthName,8));1706 sprintf(format,"%%-%ds",(int)CoinMax(lengthName,(size_t)8)); 1707 1707 bool doMask = (printMask!=""&&lengthName); 1708 1708 int * maskStarts=NULL; 1709 int maxMasks=0;1709 size_t maxMasks=0; 1710 1710 char ** masks =NULL; 1711 1711 if (doMask) { … … 1713 1713 const char * pMask2 = printMask.c_str(); 1714 1714 char pMask[100]; 1715 int iChar;1716 int lengthMask = strlen(pMask2);1715 size_t iChar; 1716 size_t lengthMask = strlen(pMask2); 1717 1717 assert (lengthMask<100); 1718 1718 if (*pMask2=='"') { … … 1746 1746 } 1747 1747 } 1748 int nEntries = 1;1748 size_t nEntries = 1; 1749 1749 maskStarts = new int[lengthName+2]; 1750 1750 masks = new char * [maxMasks]; 1751 1751 char ** newMasks = new char * [maxMasks]; 1752 int i;1752 size_t i; 1753 1753 for (i=0;i<maxMasks;i++) { 1754 1754 masks[i] = new char[lengthName+1]; … … 1757 1757 strcpy(masks[0],pMask); 1758 1758 for (int iAst=0;iAst<nAst;iAst++) { 1759 int nOldEntries = nEntries;1759 size_t nOldEntries = nEntries; 1760 1760 nEntries=0; 1761 for ( int iEntry = 0;iEntry<nOldEntries;iEntry++) {1761 for (size_t iEntry = 0;iEntry<nOldEntries;iEntry++) { 1762 1762 char * oldMask = masks[iEntry]; 1763 1763 char * ast = strchr(oldMask,'*'); 1764 1764 assert (ast); 1765 int length = strlen(oldMask)-1;1766 int nBefore = ast-oldMask;1767 int nAfter = length-nBefore;1765 size_t length = strlen(oldMask)-1; 1766 size_t nBefore = ast-oldMask; 1767 size_t nAfter = length-nBefore; 1768 1768 // and add null 1769 1769 nAfter++; 1770 for ( int i=0;i<=lengthName-length;i++) {1770 for (size_t i=0;i<=lengthName-length;i++) { 1771 1771 char * maskOut = newMasks[nEntries]; 1772 1772 CoinMemcpyN(oldMask,nBefore,maskOut); 1773 for ( int k=0;k<i;k++)1773 for (size_t k=0;k<i;k++) 1774 1774 maskOut[k+nBefore]='?'; 1775 1775 CoinMemcpyN(ast+1,nAfter,maskOut+nBefore+i); … … 1783 1783 } 1784 1784 // Now extend and sort 1785 int * sort = new int[nEntries];1785 size_t* sort = new size_t[nEntries]; 1786 1786 for (i=0;i<nEntries;i++) { 1787 1787 char * maskThis = masks[i]; 1788 int length = strlen(maskThis);1788 size_t length = strlen(maskThis); 1789 1789 while (maskThis[length-1]==' ') 1790 1790 length--; … … 1793 1793 } 1794 1794 CoinSort_2(sort,sort+nEntries,masks); 1795 intlastLength=-1;1795 long lastLength=-1; 1796 1796 for (i=0;i<nEntries;i++) { 1797 int length = sort[i];1798 while ( length>lastLength)1799 maskStarts[++lastLength] = i;1800 } 1801 maskStarts[++lastLength]= nEntries;1797 size_t length = sort[i]; 1798 while ((long)length>lastLength) 1799 maskStarts[++lastLength] = (int)i; 1800 } 1801 maskStarts[++lastLength]=(int)nEntries; 1802 1802 delete [] sort; 1803 1803 for (i=0;i<maxMasks;i++) … … 1863 1863 if (masks) { 1864 1864 delete [] maskStarts; 1865 for ( int i=0;i<maxMasks;i++)1865 for (size_t i=0;i<maxMasks;i++) 1866 1866 delete [] masks[i]; 1867 1867 delete [] masks; … … 2889 2889 // back to char as I am old fashioned 2890 2890 const char * checkC = check.c_str(); 2891 int length = strlen(checkC);2891 size_t length = strlen(checkC); 2892 2892 while (checkC[length-1]==' ') 2893 2893 length--; 2894 2894 for (int i=starts[length];i<starts[length+1];i++) { 2895 2895 char * thisMask = masks[i]; 2896 int k;2896 size_t k; 2897 2897 for ( k=0;k<length;k++) { 2898 2898 if (thisMask[k]!='?'&&thisMask[k]!=checkC[k]) -
stable/1.10/Clp/src/ClpMatrixBase.hpp
r1302 r1404 99 99 default does not allow scaling 100 100 returns non-zero if no scaling done */ 101 virtual int scale(ClpModel * model, const ClpSimplex * baseModel=NULL) const101 virtual int scale(ClpModel * , const ClpSimplex * =NULL) const 102 102 { return 1;} 103 103 /** Scales rowCopy if column copy scaled 104 104 Only called if scales already exist */ 105 virtual void scaleRowCopy(ClpModel * model) const105 virtual void scaleRowCopy(ClpModel * ) const 106 106 { } 107 107 /// Returns true if can create row copy … … 111 111 Only called if scales already exist. 112 112 Up to user to delete */ 113 inline virtual ClpMatrixBase * scaledColumnCopy(ClpModel * model) const113 inline virtual ClpMatrixBase * scaledColumnCopy(ClpModel * ) const 114 114 { return this->clone();} 115 115 … … 124 124 8 - report on large and small 125 125 */ 126 virtual bool allElementsInRange(ClpModel * model,127 double smallest, double largest,128 int check=15)126 virtual bool allElementsInRange(ClpModel * , 127 double, double, 128 int =15) 129 129 { return true;} 130 130 /** Set the dimensions of the matrix. In effect, append new empty … … 155 155 Returns non-zero if any changes. 156 156 */ 157 virtual int refresh(ClpSimplex * model)157 virtual int refresh(ClpSimplex * ) 158 158 { return 0;} 159 159 … … 295 295 /** Returns true if can combine transposeTimes and subsetTransposeTimes 296 296 and if it would be faster */ 297 virtual bool canCombine(const ClpSimplex * model,298 const CoinIndexedVector * pi) const {return false;}297 virtual bool canCombine(const ClpSimplex * , 298 const CoinIndexedVector * ) const {return false;} 299 299 /// Updates two arrays for steepest and does devex weights (need not be coded) 300 300 virtual void transposeTimes2(const ClpSimplex * model, -
stable/1.10/Clp/src/ClpModel.cpp
r1344 r1404 3275 3275 } 3276 3276 #endif 3277 int size = rowNames_.size();3278 if (size> iRow) {3277 size_t size = rowNames_.size(); 3278 if (size>(size_t)iRow) { 3279 3279 return rowNames_[iRow]; 3280 3280 } else { … … 3295 3295 #endif 3296 3296 unsigned int maxLength=lengthNames_; 3297 int size = rowNames_.size();3298 if (size<= iRow)3297 size_t size = rowNames_.size(); 3298 if (size<=(size_t)iRow) 3299 3299 rowNames_.resize(iRow+1); 3300 3300 rowNames_[iRow]= name; … … 3312 3312 } 3313 3313 #endif 3314 int size = columnNames_.size();3315 if (size> iColumn) {3314 size_t size = columnNames_.size(); 3315 if (size>(size_t)iColumn) { 3316 3316 return columnNames_[iColumn]; 3317 3317 } else { … … 3332 3332 #endif 3333 3333 unsigned int maxLength=lengthNames_; 3334 int size = columnNames_.size();3335 if (size<= iColumn)3334 size_t size = columnNames_.size(); 3335 if (size<=(size_t)iColumn) 3336 3336 columnNames_.resize(iColumn+1); 3337 3337 columnNames_[iColumn]= name; … … 3345 3345 { 3346 3346 unsigned int maxLength=lengthNames_; 3347 int size = rowNames_.size();3348 if (size!= numberRows_)3347 size_t size = rowNames_.size(); 3348 if (size!=(size_t)numberRows_) 3349 3349 rowNames_.resize(numberRows_); 3350 3350 int iRow; … … 3361 3361 { 3362 3362 unsigned int maxLength=lengthNames_; 3363 int size = columnNames_.size();3364 if (size!= numberColumns_)3363 size_t size = columnNames_.size(); 3364 if (size!=(size_t)numberColumns_) 3365 3365 columnNames_.resize(numberColumns_); 3366 3366 int iColumn; … … 3377 3377 { 3378 3378 unsigned int maxLength=lengthNames_; 3379 int size = rowNames_.size();3380 if (size!= numberRows_)3379 size_t size = rowNames_.size(); 3380 if (size!=(size_t)numberRows_) 3381 3381 rowNames_.resize(numberRows_); 3382 3382 int iRow; … … 3400 3400 { 3401 3401 unsigned int maxLength=lengthNames_; 3402 int size = columnNames_.size();3403 if (size!= numberColumns_)3402 size_t size = columnNames_.size(); 3403 if (size!=(size_t)numberColumns_) 3404 3404 columnNames_.resize(numberColumns_); 3405 3405 int iColumn; … … 3635 3635 if (lengthNames()) { 3636 3636 rowNames = new char * [numberRows_+1]; 3637 int numberNames = rowNames_.size();3638 numberNames = CoinMin( numberRows_,numberNames);3639 int iRow;3637 size_t numberNames = rowNames_.size(); 3638 numberNames = CoinMin((size_t)numberRows_,numberNames); 3639 size_t iRow; 3640 3640 for (iRow=0;iRow<numberNames;iRow++) { 3641 3641 rowNames[iRow] = 3642 CoinStrdup(rowName( iRow).c_str());3642 CoinStrdup(rowName((int)iRow).c_str()); 3643 3643 #ifdef STRIPBLANKS 3644 3644 char * xx = rowNames[iRow]; … … 3654 3654 } 3655 3655 char name[9]; 3656 for ( ;iRow< numberRows_;iRow++) {3657 sprintf(name,"R%7.7d", iRow);3656 for ( ;iRow<(size_t)numberRows_;iRow++) { 3657 sprintf(name,"R%7.7d",(int)iRow); 3658 3658 rowNames[iRow]=CoinStrdup(name); 3659 3659 } … … 3669 3669 if (lengthNames()) { 3670 3670 columnNames = new char * [numberColumns_]; 3671 int numberNames = columnNames_.size();3672 numberNames = CoinMin( numberColumns_,numberNames);3673 int iColumn;3671 size_t numberNames = columnNames_.size(); 3672 numberNames = CoinMin((size_t)numberColumns_,numberNames); 3673 size_t iColumn; 3674 3674 for (iColumn=0;iColumn<numberNames;iColumn++) { 3675 3675 columnNames[iColumn] = 3676 CoinStrdup(columnName( iColumn).c_str());3676 CoinStrdup(columnName((int)iColumn).c_str()); 3677 3677 #ifdef STRIPBLANKS 3678 3678 char * xx = columnNames[iColumn]; … … 3688 3688 } 3689 3689 char name[9]; 3690 for ( ;iColumn< numberColumns_;iColumn++) {3691 sprintf(name,"C%7.7d", iColumn);3690 for ( ;iColumn<(size_t)numberColumns_;iColumn++) { 3691 sprintf(name,"C%7.7d",(int)iColumn); 3692 3692 columnNames[iColumn]=CoinStrdup(name); 3693 3693 } … … 3857 3857 char temp[30]; 3858 3858 strcpy(temp,rowName(i).c_str()); 3859 int length = strlen(temp);3860 for ( int j=0;j<length;j++) {3859 size_t length = strlen(temp); 3860 for (size_t j=0;j<length;j++) { 3861 3861 if (temp[j]=='-') 3862 3862 temp[j]='_'; … … 3867 3867 char temp[30]; 3868 3868 strcpy(temp,columnName(i).c_str()); 3869 int length = strlen(temp);3870 for ( int j=0;j<length;j++) {3869 size_t length = strlen(temp); 3870 for (size_t j=0;j<length;j++) { 3871 3871 if (temp[j]=='-') 3872 3872 temp[j]='_'; -
stable/1.10/Clp/src/ClpSimplex.cpp
r1400 r1404 5924 5924 int outDoubleArray(double * array, int length, FILE * fp) 5925 5925 { 5926 int numberWritten;5926 size_t numberWritten; 5927 5927 if (array&&length) { 5928 5928 numberWritten = fwrite(&length,sizeof(int),1,fp); … … 5930 5930 return 1; 5931 5931 numberWritten = fwrite(array,sizeof(double),length,fp); 5932 if (numberWritten!= length)5932 if (numberWritten!=(size_t)length) 5933 5933 return 1; 5934 5934 } else { … … 5947 5947 if (fp) { 5948 5948 Clp_scalars scalars; 5949 CoinBigIndexnumberWritten;5949 size_t numberWritten; 5950 5950 // Fill in scalars 5951 5951 scalars.optimizationDirection = optimizationDirection_; … … 5981 5981 if (numberWritten!=1) 5982 5982 return 1; 5983 CoinBigIndexlength;5983 size_t length; 5984 5984 #ifndef CLP_NO_STD 5985 5985 int i; … … 6059 6059 } 6060 6060 numberWritten = fwrite(array,lengthNames_+1,numberRows_,fp); 6061 if (numberWritten!= numberRows_)6061 if (numberWritten!=(size_t)numberRows_) 6062 6062 return 1; 6063 6063 put=array; … … 6069 6069 } 6070 6070 numberWritten = fwrite(array,lengthNames_+1,numberColumns_,fp); 6071 if (numberWritten!= numberColumns_)6071 if (numberWritten!=(size_t)numberColumns_) 6072 6072 return 1; 6073 6073 delete [] array; … … 6079 6079 numberWritten=fwrite(&marker,sizeof(int),1,fp); 6080 6080 numberWritten = fwrite(integerType_,1,numberColumns_,fp); 6081 if (numberWritten!= numberColumns_)6081 if (numberWritten!=(size_t)numberColumns_) 6082 6082 return 1; 6083 6083 } else { … … 6105 6105 numberWritten = fwrite(matrix_->getVectorStarts(), 6106 6106 sizeof(int),numberColumns_+1,fp); 6107 if (numberWritten!= numberColumns_+1)6107 if (numberWritten!=(size_t)numberColumns_+1) 6108 6108 return 1; 6109 6109 numberWritten = fwrite(matrix_->getVectorLengths(), 6110 6110 sizeof(int),numberColumns_,fp); 6111 if (numberWritten!= numberColumns_)6111 if (numberWritten!=(size_t)numberColumns_) 6112 6112 return 1; 6113 6113 // finished … … 6121 6121 int inDoubleArray(double * &array, int length, FILE * fp) 6122 6122 { 6123 int numberRead;6123 size_t numberRead; 6124 6124 int length2; 6125 6125 numberRead = fread(&length2,sizeof(int),1,fp); … … 6132 6132 array = new double[length]; 6133 6133 numberRead = fread(array,sizeof(double),length,fp); 6134 if (numberRead!= length)6134 if (numberRead!=(size_t)length) 6135 6135 return 1; 6136 6136 } … … 6160 6160 factorization_->sparseThreshold(1); 6161 6161 Clp_scalars scalars; 6162 CoinBigIndexnumberRead;6162 size_t numberRead; 6163 6163 6164 6164 // get scalars … … 6192 6192 specialOptions_ = scalars.specialOptions; 6193 6193 // strings 6194 CoinBigIndexlength;6194 size_t length; 6195 6195 #ifndef CLP_NO_STD 6196 6196 for (i=0;i<ClpLastStrParam;i++) { … … 6255 6255 return 1; 6256 6256 if (length) { 6257 if (length!= numberRows_+numberColumns_)6257 if (length!=(size_t)(numberRows_+numberColumns_)) 6258 6258 return 1; 6259 6259 status_ = new char unsigned[length]; … … 6268 6268 char * get = array; 6269 6269 numberRead = fread(array,lengthNames_+1,numberRows_,fp); 6270 if (numberRead!= numberRows_)6270 if (numberRead!=(size_t)numberRows_) 6271 6271 return 1; 6272 6272 rowNames_ = std::vector<std::string> (); … … 6278 6278 get = array; 6279 6279 numberRead = fread(array,lengthNames_+1,numberColumns_,fp); 6280 if (numberRead!= numberColumns_)6280 if (numberRead!=(size_t)numberColumns_) 6281 6281 return 1; 6282 6282 columnNames_ = std::vector<std::string> (); … … 6300 6300 integerType_ = new char [numberColumns_]; 6301 6301 numberRead = fread(integerType_,1,numberColumns_,fp); 6302 if (numberRead!= numberColumns_)6302 if (numberRead!=(size_t)numberColumns_) 6303 6303 return 1; 6304 6304 } else { … … 6360 6360 return 1; 6361 6361 numberRead = fread(starts, sizeof(int),numberColumns_+1,fp); 6362 if (numberRead!= numberColumns_+1)6362 if (numberRead!=(size_t)numberColumns_+1) 6363 6363 return 1; 6364 6364 numberRead = fread(lengths, sizeof(int),numberColumns_,fp); 6365 if (numberRead!= numberColumns_)6365 if (numberRead!=(size_t)numberColumns_) 6366 6366 return 1; 6367 6367 // assign matrix … … 6373 6373 for (i=0;i<numberColumns_;i++) { 6374 6374 int start = starts[i]; 6375 starts[i]= length;6375 starts[i]=(int)length; 6376 6376 for (CoinBigIndex j=start;j<start+lengths[i];j++) { 6377 6377 elements[length]=elements[j]; 6378 6378 indices[length++]=indices[j]; 6379 6379 } 6380 lengths[i]= length-starts[i];6381 } 6382 starts[numberColumns_]= length;6380 lengths[i]=(int)length-starts[i]; 6381 } 6382 starts[numberColumns_]=(int)length; 6383 6383 matrix->assignMatrix(true, numberRows_, numberColumns_, 6384 length, elements, indices, starts, lengths);6384 (CoinBigIndex)length, elements, indices, starts, lengths); 6385 6385 // and transfer to Clp 6386 6386 matrix_ = new ClpPackedMatrix(matrix); -
stable/1.10/Clp/src/ClpSimplexDual.cpp
r1359 r1404 4325 4325 handler_->message()<<CoinMessageEol; 4326 4326 } 4327 double approximateObjective=objectiveValue_; 4327 4328 #ifdef CLP_REPORT_PROGRESS 4328 4329 if (ixxxxxx>=ixxyyyy-4&&ixxxxxx<=ixxyyyy) { … … 5005 5006 if (alphaAccuracy_>0.0) 5006 5007 alphaAccuracy_=1.0; 5008 // If we are stopping - use plausible objective 5009 // Maybe only in fast dual 5010 if (problemStatus_>2) 5011 objectiveValue_ = approximateObjective; 5007 5012 } 5008 5013 /* While updateDualsInDual sees what effect is of flip -
stable/1.10/Clp/src/Clp_C_Interface.cpp
r1231 r1404 240 240 prefix, numcols, numrows); 241 241 printf("%s model = %p, start = %p, index = %p, value = %p\n", 242 prefix, (void*)model, (void*)start, (void*)index, (void*)value);242 prefix, reinterpret_cast<const void *>(model), reinterpret_cast<const void *>(start), reinterpret_cast<const void *>(index), reinterpret_cast<const void *>(value)); 243 243 printf("%s collb = %p, colub = %p, obj = %p, rowlb = %p, rowub = %p\n", 244 prefix, (void*)collb, (void*)colub, (void*)obj, (void*)rowlb, (void*)rowub);244 prefix, reinterpret_cast<const void *>(collb), reinterpret_cast<const void *>(colub), reinterpret_cast<const void *>(obj), reinterpret_cast<const void *>(rowlb), reinterpret_cast<const void *>(rowub)); 245 245 } 246 246 model->model_->loadProblem(numcols,numrows,start,index,value, … … 1130 1130 prefix, numcols, numrows, numelem); 1131 1131 printf("%s model = %p, start = %p, index = %p, value = %p\n", 1132 prefix, (void*)model, (void*)start, (void*)index, (void*)value);1132 prefix, reinterpret_cast<const void *>(model), reinterpret_cast<const void *>(start), reinterpret_cast<const void *>(index), reinterpret_cast<const void *>(value)); 1133 1133 clp_simplex->matrix()->dumpMatrix(NULL); 1134 1134 { … … 1142 1142 1143 1143 printf("%s collb = %p, colub = %p, obj = %p, rowlb = %p, rowub = %p\n", 1144 prefix, (void*)collb, (void*)colub, (void*)obj, (void*)rowlb, (void*)rowub);1144 prefix, reinterpret_cast<const void *>(collb), reinterpret_cast<const void *>(colub), reinterpret_cast<const void *>(obj), reinterpret_cast<const void *>(rowlb), reinterpret_cast<const void *>(rowub)); 1145 1145 printf("%s optimization direction = %g\n",prefix, Clp_optimizationDirection(model)); 1146 1146 printf(" (1 - minimize, -1 - maximize, 0 - ignore)\n"); -
stable/1.10/Clp/src/Makefile.am
r1344 r1404 162 162 ClpQuadraticObjective.hpp \ 163 163 ClpSimplex.hpp \ 164 ClpSimplexDual.hpp \ 164 165 ClpSimplexNonlinear.hpp \ 165 166 ClpSimplexOther.hpp \ … … 167 168 ClpSolve.hpp \ 168 169 CbcOrClpParam.hpp \ 170 CbcOrClpParam.cpp \ 169 171 Idiot.hpp 170 172 -
stable/1.10/Clp/src/Makefile.in
r1344 r1404 412 412 ClpQuadraticObjective.hpp \ 413 413 ClpSimplex.hpp \ 414 ClpSimplexDual.hpp \ 414 415 ClpSimplexNonlinear.hpp \ 415 416 ClpSimplexOther.hpp \ … … 417 418 ClpSolve.hpp \ 418 419 CbcOrClpParam.hpp \ 420 CbcOrClpParam.cpp \ 419 421 Idiot.hpp 420 422 -
stable/1.10/Clp/src/MyMessageHandler.cpp
r1321 r1404 126 126 127 127 // Want maximum of 10 solutions, so if more then 10 get rid of oldest 128 int numExtremePointsSaved = feasibleExtremePoints_.size();128 size_t numExtremePointsSaved = feasibleExtremePoints_.size(); 129 129 if ( numExtremePointsSaved>=10 ) { 130 130 feasibleExtremePoints_.pop_back(); 131 assert( feasibleExtremePoints_.size() == 132 static_cast<unsigned int> (numExtremePointsSaved)-1 ); 131 assert( feasibleExtremePoints_.size() + 1 == numExtremePointsSaved ); 133 132 }; 134 133 -
stable/1.10/Clp/src/unitTest.cpp
r1344 r1404 820 820 // Write saved solutions 821 821 int nc = model.getNumCols(); 822 int s;822 size_t s; 823 823 std::deque<StdVectorDouble> fep = messageHandler.getFeasibleExtremePoints(); 824 int numSavedSolutions = fep.size();824 size_t numSavedSolutions = fep.size(); 825 825 for ( s=0; s<numSavedSolutions; ++s ) { 826 826 const StdVectorDouble & solnVec = fep[s]; … … 1968 1968 // Create a structured model 1969 1969 CoinStructuredModel structured; 1970 intnumberBlocks=5;1971 for ( inti=0;i<numberBlocks;i++) {1970 char numberBlocks=5; 1971 for (char i=0;i<numberBlocks;i++) { 1972 1972 std::string topName="row_master"; 1973 1973 std::string blockName="block_"; 1974 char bName = 'a'+i;1974 char bName = (char)('a'+i); 1975 1975 blockName.append(1,bName); 1976 1976 structured.addBlock(topName,blockName,top); … … 1996 1996 CoinStructuredModel structured2; 1997 1997 numberBlocks=3; 1998 for ( inti=0;i<numberBlocks;i++) {1998 for (char i=0;i<numberBlocks;i++) { 1999 1999 std::string blockName="block_"; 2000 char bName = 'a'+i;2000 char bName = (char)('a'+i); 2001 2001 blockName.append(1,bName); 2002 2002 structured2.addBlock(blockName,blockName,structured);
Note: See TracChangeset
for help on using the changeset viewer.