Changeset 2164
 Timestamp:
 Mar 17, 2015 4:33:10 AM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcModel.cpp
r2146 r2164 2089 2089 } 2090 2090 originalContinuousObjective_ = COIN_DBL_MAX; 2091 if (bestSolution_ && 2092 ((specialOptions_&8388608)==0(specialOptions_&2048)!=0)) { 2093 // best solution found by various heuristics  set solution 2094 char general[200]; 2095 sprintf(general,"Solution of %g already found by heuristic", 2096 bestObjective_); 2097 messageHandler()>message(CBC_GENERAL, 2098 messages()) 2099 << general << CoinMessageEol ; 2100 setCutoff(1.0e50) ; // As best solution should be worse than cutoff 2101 // change cutoff as constraint if wanted 2102 if (cutoffRowNumber_>=0) { 2103 if (solver_>getNumRows()>cutoffRowNumber_) 2104 solver_>setRowUpper(cutoffRowNumber_,1.0e50); 2105 } 2106 // also in continuousSolver_ 2107 if (continuousSolver_) { 2108 // Solvers know about direction 2109 double direction = solver_>getObjSense(); 2110 continuousSolver_>setDblParam(OsiDualObjectiveLimit, 1.0e50*direction); 2111 } else { 2112 continuousSolver_ = solver_>clone(); 2113 } 2114 phase_ = 5; 2115 double increment = getDblParam(CbcModel::CbcCutoffIncrement) ; 2116 if ((specialOptions_&4) == 0) 2117 bestObjective_ += 100.0 * increment + 1.0e3; // only set if we are going to solve 2118 setBestSolution(CBC_END_SOLUTION, bestObjective_, bestSolution_, 1) ; 2119 continuousSolver_>resolve() ; 2120 if (!continuousSolver_>isProvenOptimal()) { 2121 continuousSolver_>messageHandler()>setLogLevel(2) ; 2122 continuousSolver_>initialSolve() ; 2123 } 2124 delete solver_ ; 2125 solver_ = continuousSolver_ ; 2126 setPointers(solver_); 2127 continuousSolver_ = NULL ; 2128 } 2091 2129 solverCharacteristics_ = NULL; 2092 2130 if (flipObjective)
Note: See TracChangeset
for help on using the changeset viewer.