Changes in stable/2.8/Cbc/src/CbcModel.cpp [1973:2002]
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

stable/2.8/Cbc/src/CbcModel.cpp
r1973 r2002 2039 2039 flipModel(); 2040 2040 return ; 2041 } else if (!numberObjects_ && (!strategy_  strategy_>preProcessState() <= 0)) {2041 } else if (!numberObjects_) { 2042 2042 // nothing to do 2043 // Undo preprocessing performed during BaB. 2044 if (strategy_ && strategy_>preProcessState() > 0) { 2045 // undo preprocessing 2046 CglPreProcess * process = strategy_>process(); 2047 assert (process); 2048 int n = originalSolver>getNumCols(); 2049 if (bestSolution_) { 2050 delete [] bestSolution_; 2051 bestSolution_ = new double [n]; 2052 process>postProcess(*solver_); 2053 } 2054 strategy_>deletePreProcess(); 2055 // Solution now back in originalSolver 2056 delete solver_; 2057 solver_ = originalSolver; 2058 if (bestSolution_) { 2059 bestObjective_ = solver_>getObjValue() * solver_>getObjSense(); 2060 memcpy(bestSolution_, solver_>getColSolution(), n*sizeof(double)); 2061 } 2062 // put back original objects if there were any 2063 if (originalObject) { 2064 int iColumn; 2065 assert (ownObjects_); 2066 for (iColumn = 0; iColumn < numberObjects_; iColumn++) 2067 delete object_[iColumn]; 2068 delete [] object_; 2069 numberObjects_ = numberOriginalObjects; 2070 object_ = originalObject; 2071 delete [] integerVariable_; 2072 numberIntegers_ = 0; 2073 for (iColumn = 0; iColumn < n; iColumn++) { 2074 if (solver_>isInteger(iColumn)) 2075 numberIntegers_++; 2076 } 2077 integerVariable_ = new int[numberIntegers_]; 2078 numberIntegers_ = 0; 2079 for (iColumn = 0; iColumn < n; iColumn++) { 2080 if (solver_>isInteger(iColumn)) 2081 integerVariable_[numberIntegers_++] = iColumn; 2082 } 2083 } 2084 } 2043 2085 if (flipObjective) 2044 2086 flipModel(); … … 10795 10837 void CbcModel::synchronizeModel() 10796 10838 { 10839 if (!numberObjects_) 10840 return; 10797 10841 int i; 10798 10842 for (i = 0; i < numberHeuristics_; i++)
Note: See TracChangeset
for help on using the changeset viewer.