Changeset 2144
 Timestamp:
 May 20, 2015 11:49:41 AM (4 years ago)
 Location:
 trunk/Clp/src
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/Idiot.cpp
r2078 r2144 498 498 numberSlacks++; 499 499 } 500 if (!numberSlacks ) {500 if (!numberSlacks  (strategy_&524288)!=0) { 501 501 whenUsed_ = new int[ncols]; 502 502 } else { … … 676 676 scaled = model_>clpMatrix()>scale(model_) == 0; 677 677 if (scaled) { 678 #define IDIOT_SCALE 2 679 #ifndef IDIOT_SCALE 678 680 const double * rowScale = model_>rowScale(); 681 #else 682 double * rowScale = model_>mutableRowScale(); 683 #endif 679 684 const double * columnScale = model_>columnScale(); 680 685 double * oldLower = lower; … … 688 693 CoinMemcpyN(oldCost, ncols, cost); 689 694 int icol, irow; 695 #if IDIOT_SCALE<0 696 for (irow = 0; irow < nrows; irow++) { 697 rowlower[irow]=1.0e100; 698 rowupper[irow]=1.0e100; 699 } 700 #endif 690 701 for (icol = 0; icol < ncols; icol++) { 691 702 double multiplier = 1.0 / columnScale[icol]; … … 696 707 colsol[icol] *= multiplier; 697 708 cost[icol] *= columnScale[icol]; 698 } 709 #if IDIOT_SCALE<0 710 CoinBigIndex j; 711 double scale = columnScale[i]; 712 for (j = columnStart[i]; j < columnStart[i] + columnLength[i]; j++) { 713 int jrow = row[j]; 714 double scaledValue = fabs(scale*element[j]); 715 rowlower[jrow]=CoinMin(rowlower[jrow],scaledValue); 716 rowupper[jrow]=CoinMax(rowupper[jrow],scaledValue); 717 } 718 #endif 719 } 720 #ifdef IDIOT_SCALE 721 #if IDIOT_SCALE>1IDIOT_SCALE<1 722 const double * rowLower=model_>rowLower(); 723 const double * rowUpper=model_>rowUpper(); 724 #endif 725 for (irow = 0; irow < nrows; irow++) { 726 #if IDIOT_SCALE<0 727 double multiplier = 1.0/sqrt(rowlower[irow]*rowupper[irow]); 728 #else 729 double multiplier = rowScale[irow]; 730 #endif 731 #if IDIOT_SCALE>1IDIOT_SCALE<1 732 #define EQUALITY_MULTIPLIER 2 733 if (rowLower[irow]==rowUpper[irow]) 734 multiplier *= EQUALITY_MULTIPLIER; 735 #if IDIOT_SCALE>2IDIOT_SCALE<2 736 if (rowLower[irow]==rowUpper[irow]&&!rowlower[irow]) 737 multiplier *= EQUALITY_MULTIPLIER; 738 #endif 739 #endif 740 rowScale[irow]=multiplier; 741 } 742 CoinMemcpyN(model_>rowUpper(), nrows, rowupper); 743 #endif 699 744 CoinMemcpyN(model_>rowLower(), nrows, rowlower); 700 745 for (irow = 0; irow < nrows; irow++) { … … 1366 1411 } 1367 1412 #if 0 1368 maybe put back  but just get feasible ?1413 //maybe put back  but just get feasible ? 1369 1414 // If not many fixed then just exit 1370 1415 int numberFixed = 0; … … 1375 1420 numberFixed++; 1376 1421 } 1377 if (numberFixed < ncols / 2) {1422 if (numberFixed < ncols / 3) { 1378 1423 addAll = 3; 1379 1424 presolve = 0; 
trunk/Clp/src/Idiot.hpp
r2078 r2144 291 291 65536  experimental 2 292 292 131072  experimental 3 293 262144  just values pass etc */ 293 262144  just values pass etc 294 524288  don't treat structural slacks as slacks */ 294 295 295 296 int lightWeight_; // 0  normal, 1 lightweight
Note: See TracChangeset
for help on using the changeset viewer.