 Timestamp:
 Apr 10, 2008 11:55:40 AM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/heur/Cbc/src/CbcHeuristic.cpp
r906 r910 105 105 lastRunDeep_(0), 106 106 numRuns_(0), 107 numCouldRun_(0),108 107 minDistanceToRun_(1), 109 runNodes_() 108 runNodes_(), 109 numCouldRun_(0) 110 110 { 111 111 // As CbcHeuristic virtual need to modify .cpp if above change … … 128 128 lastRunDeep_(0), 129 129 numRuns_(0), 130 numCouldRun_(0),131 130 minDistanceToRun_(1), 132 runNodes_() 131 runNodes_(), 132 numCouldRun_(0) 133 133 {} 134 134 … … 311 311 #if 1 312 312 double minDistance = nodeDesc>minDistance(runNodes_); 313 double minDistanceToRun = 1.5 * log( depth) / log(2);313 double minDistanceToRun = 1.5 * log((double)depth) / log((double)2); 314 314 std::cout<<"minDistance = "<<minDistance 315 315 <<", minDistanceToRun = "<<minDistanceToRun<<std::endl; … … 339 339 340 340 if(depth != 0) { 341 342 double probability = pow(depth,2) / pow(2,depth); 341 const double numerator = depth * depth; 342 const double denominator = exp(depth * log((double)2)); 343 double probability = numerator / denominator; 343 344 double randomNumber = randomNumberGenerator_.randomDouble(); 344 345 if (randomNumber>probability)
Note: See TracChangeset
for help on using the changeset viewer.