Changeset 616
- Timestamp:
- Jun 4, 2007 4:53:44 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/devel/Cbc/src/CbcModel.cpp
r607 r616 902 902 int value=131072; 903 903 clpSolver->setSpecialOptions(clpSolver->specialOptions()|value); 904 simplex->setSpecialOptions(simplex->specialOptions()|value); 904 if ((clpSolver->specialOptions()&value)!=0) 905 simplex->setSpecialOptions(simplex->specialOptions()|value); 905 906 //if (simplex->numberRows()<50) 906 907 //simplex->setAlphaAccuracy(1.0); … … 1056 1057 } 1057 1058 currentNumberCuts_ = numberNewCuts_ ; 1059 // See if can stop on gap 1060 stoppedOnGap_ = false ; 1061 bestPossibleObjective_ = solver_->getObjValue()*solver_->getObjSense(); 1062 double testGap = CoinMax(dblParam_[CbcAllowableGap], 1063 CoinMax(fabs(bestObjective_),fabs(bestPossibleObjective_)) 1064 *dblParam_[CbcAllowableFractionGap]); 1065 if (bestObjective_-bestPossibleObjective_ < testGap && getCutoffIncrement()>=0.0) { 1066 if (bestPossibleObjective_<getCutoff()) { 1067 stoppedOnGap_ = true ; 1068 messageHandler()->message(CBC_GAP,messages()) 1069 << bestObjective_-bestPossibleObjective_ 1070 << dblParam_[CbcAllowableGap] 1071 << dblParam_[CbcAllowableFractionGap]*100.0 1072 << CoinMessageEol ; 1073 secondaryStatus_ = 2; 1074 } 1075 feasible = false; 1076 } 1058 1077 /* 1059 1078 We've taken the continuous relaxation as far as we can. Time to branch. … … 1222 1241 for (i = 0;i < numberObjects_;i++) 1223 1242 object_[i]->resetBounds(solver_) ; } 1224 stoppedOnGap_ = false ;1225 1243 /* 1226 1244 Feasible? Then we should have either a live node prepped for future … … 1957 1975 else 1958 1976 { 1959 tree_->cleanTree(this,-COIN_DBL_MAX,bestPossibleObjective_) ; 1977 if (tree_->size()) 1978 tree_->cleanTree(this,-COIN_DBL_MAX,bestPossibleObjective_) ; 1960 1979 delete nextRowCut_; 1961 1980 // We need to get rid of node if is has already been popped from tree
Note: See TracChangeset
for help on using the changeset viewer.