Changeset 1650 for trunk/Cbc/src/CbcModel.cpp
- Timestamp:
- May 10, 2011 8:33:58 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cbc/src/CbcModel.cpp
r1641 r1650 3357 3357 int lastPrintEvery = 0; 3358 3358 int numberConsecutiveInfeasible = 0; 3359 #define PERTURB_IN_FATHOM 3360 #ifdef PERTURB_IN_FATHOM 3361 // allow in fathom 3362 if ((moreSpecialOptions_& 262144) != 0) 3363 specialOptions_ |= 131072; 3364 #endif 3359 3365 while (true) { 3360 3366 lockThread(); … … 3397 3403 // switch off perturbation 3398 3404 simplex->setPerturbation(100); 3399 #ifdef PERTURB_IN_FATHOM3400 // but allow in fathom3401 specialOptions_ |= 131072;3402 #endif3403 3405 #ifdef CLP_INVESTIGATE 3404 3406 printf("Perturbation switched off\n"); … … 3765 3767 node = tree_->bestNode(cutoff) ; 3766 3768 // Possible one on tree worse than cutoff 3767 // W ierd comparison function can leave ineligible nodes on tree3769 // Weird comparison function can leave ineligible nodes on tree 3768 3770 if (!node || node->objectiveValue() > cutoff) 3769 3771 continue; … … 12945 12947 break; 12946 12948 } 12949 reducedCostFix(); 12947 12950 } else { 12948 12951 // NOT better solution … … 13523 13526 simplex->setLogLevel(0); 13524 13527 clpSolver->setBasis(); 13525 #ifdef PERTURB_IN_FATHOM13526 13528 int perturbation = simplex->perturbation(); 13527 13529 if ((specialOptions_&131072) != 0) { 13528 13530 //assert (perturbation == 100); 13529 13531 simplex->setPerturbation(50); 13530 13532 } 13533 int saveMoreOptions = simplex->moreSpecialOptions(); 13534 int flags = (moreSpecialOptions_>>18)&3; 13535 simplex->setMoreSpecialOptions(saveMoreOptions|flags<<11); 13536 #ifndef NO_FATHOM_PRINT 13537 info->startingDepth_ = node->depth(); 13538 info->nodeCalled_ = numberNodes_; 13539 info->handler_ = handler_; 13531 13540 #endif 13532 13541 feasible = simplex->fathom(info) != 0; 13533 #ifdef PERTURB_IN_FATHOM 13542 simplex->setMoreSpecialOptions(saveMoreOptions); 13534 13543 simplex->setPerturbation(perturbation); 13535 #endif13536 13544 numberExtraNodes_ += info->numberNodesExplored_; 13537 13545 numberExtraIterations_ += info->numberIterations_; 13538 if (info->numberNodesExplored_ > 10000) { 13546 if (info->numberNodesExplored_ > 10000 /* && !feasible */ 13547 && (moreSpecialOptions_&524288) == 0 && info->nNodes_>=0) { 13539 13548 fastNodeDepth_ --; 13549 #ifndef NO_FATHOM_PRINT 13550 if ((moreSpecialOptions_&262144) != 0) 13551 handler_->message(CBC_FATHOM_CHANGE, messages_) << 13552 FATHOM_BIAS - fastNodeDepth_ << CoinMessageEol ; 13553 #endif 13540 13554 #ifdef CLP_INVESTIGATE 13541 13555 printf(">10000 - depth now %d so at depth >= %d\n", … … 13546 13560 // we gave up 13547 13561 //abort(); 13548 fastNodeDepth_ -= 2; 13562 fastNodeDepth_ -= 3; 13563 #ifndef NO_FATHOM_PRINT 13564 if ((moreSpecialOptions_&262144) != 0) 13565 handler_->message(CBC_FATHOM_CHANGE, messages_) << 13566 FATHOM_BIAS - fastNodeDepth_ << CoinMessageEol ; 13567 #endif 13549 13568 #ifdef CLP_INVESTIGATE 13550 13569 printf("fastNodeDepth now %d - so at depth >= %d\n",
Note: See TracChangeset
for help on using the changeset viewer.