Changeset 2354
 Timestamp:
 Jan 2, 2018 6:34:25 AM (7 weeks ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcHeuristic.cpp
r2344 r2354 1048 1048 // move seed across 1049 1049 model.randomNumberGenerator()>setSeed(model_>randomNumberGenerator()>getSeed()); 1050 #ifdef COIN_HAS_CLP 1051 // redo SOS 1052 OsiClpSolverInterface * clpSolver 1053 = dynamic_cast<OsiClpSolverInterface *> (model.solver()); 1054 if (clpSolver && clpSolver>numberSOS()) { 1055 int numberColumns = clpSolver>getNumCols(); 1056 const int * originalColumns = process.originalColumns(); 1057 CoinSet * setInfo = 1058 const_cast<CoinSet *>(clpSolver>setInfo()); 1059 int numberSOS = clpSolver>numberSOS(); 1060 for (int iSOS = 0; iSOS < numberSOS; iSOS++) { 1061 //int type = setInfo[iSOS].setType(); 1062 int n = setInfo[iSOS].numberEntries(); 1063 int * which = setInfo[iSOS].modifiableWhich(); 1064 double * weights = setInfo[iSOS].modifiableWeights(); 1065 int n2=0; 1066 for (int j=0;j<n;j++) { 1067 int iColumn=which[j]; 1068 int i; 1069 for (i = 0; i < numberColumns; i++) { 1070 if (originalColumns[i] == iColumn) 1071 break; 1072 } 1073 if (i < numberColumns) { 1074 which[n2] = i; 1075 weights[n2++] = weights[j]; 1076 } 1077 } 1078 setInfo[iSOS].setNumberEntries(n2); 1079 } 1080 } 1081 #endif 1050 1082 if (numberNodes >= 0) { 1051 1083 // normal
Note: See TracChangeset
for help on using the changeset viewer.