 Timestamp:
 Jan 2, 2018 6:31:02 AM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

stable/2.9/Cbc/src/CbcHeuristic.cpp
r2324 r2353 35 35 #include "CbcBranchActual.hpp" 36 36 #include "CbcCutGenerator.hpp" 37 #include "CoinMpsIO.hpp" 37 38 //============================================================================== 38 39 … … 999 1000 // move seed across 1000 1001 model.randomNumberGenerator()>setSeed(model_>randomNumberGenerator()>getSeed()); 1002 #ifdef COIN_HAS_CLP 1003 // redo SOS 1004 OsiClpSolverInterface * clpSolver 1005 = dynamic_cast<OsiClpSolverInterface *> (model.solver()); 1006 if (clpSolver && clpSolver>numberSOS()) { 1007 int numberColumns = clpSolver>getNumCols(); 1008 const int * originalColumns = process.originalColumns(); 1009 CoinSet * setInfo = 1010 const_cast<CoinSet *>(clpSolver>setInfo()); 1011 int numberSOS = clpSolver>numberSOS(); 1012 for (int iSOS = 0; iSOS < numberSOS; iSOS++) { 1013 //int type = setInfo[iSOS].setType(); 1014 int n = setInfo[iSOS].numberEntries(); 1015 int * which = setInfo[iSOS].modifiableWhich(); 1016 double * weights = setInfo[iSOS].modifiableWeights(); 1017 int n2=0; 1018 for (int j=0;j<n;j++) { 1019 int iColumn=which[j]; 1020 int i; 1021 for (i = 0; i < numberColumns; i++) { 1022 if (originalColumns[i] == iColumn) 1023 break; 1024 } 1025 if (i < numberColumns) { 1026 which[n2] = i; 1027 weights[n2++] = weights[j]; 1028 } 1029 } 1030 setInfo[iSOS].setNumberEntries(n2); 1031 } 1032 } 1033 #endif 1001 1034 if (numberNodes >= 0) { 1002 1035 // normal
Note: See TracChangeset
for help on using the changeset viewer.