Ignore:
Timestamp:
Apr 28, 2008 11:41:02 AM (11 years ago)
Author:
forrest
Message:

changes to try and improve performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcTree.cpp

    r838 r931  
    9393    if (best&&best->objectiveValue()!=COIN_DBL_MAX&&best->nodeInfo())
    9494      assert (best->nodeInfo()->numberBranchesLeft());
     95    if (best&&best->objectiveValue()>=cutoff) {
     96      // double check in case node can change its mind!
     97      best->checkIsCutoff(cutoff);
     98    }
    9599    if (!best||best->objectiveValue()>=cutoff) {
    96100#if 0
     
    191195CbcTree::getBestPossibleObjective(){
    192196  double r_val = 1e100;
    193   for(int i = 0 ; i < nodes_.size() ; i++){
     197  for(int i = 0 ; i < (int) nodes_.size() ; i++){
    194198    if(nodes_[i] && nodes_[i]->objectiveValue() < r_val){
    195199      r_val = nodes_[i]->objectiveValue();
     
    223227    pop();
    224228    double value = node ? node->objectiveValue() : COIN_DBL_MAX;
     229    if (node&&value>=cutoff) {
     230      // double check in case node can change its mind!
     231      value=node->checkIsCutoff(cutoff);
     232    }
    225233    bestPossibleObjective = CoinMin(bestPossibleObjective,value);
    226234    if (value >= cutoff||!node->active()) {
     
    380388    if (best&&best->objectiveValue()!=COIN_DBL_MAX&&best->nodeInfo())
    381389      assert (best->nodeInfo()->numberBranchesLeft());
     390    if (best&&best->objectiveValue()>=cutoff) {
     391      // double check in case node can change its mind!
     392      best->checkIsCutoff(cutoff);
     393    }
    382394    if (!best||best->objectiveValue()>=cutoff) {
    383395#if 0
     
    504516    pop();
    505517    double value = node ? node->objectiveValue() : COIN_DBL_MAX;
     518    if (node&&value>=cutoff) {
     519      // double check in case node can change its mind!
     520      value=node->checkIsCutoff(cutoff);
     521    }
    506522    bestPossibleObjective = CoinMin(bestPossibleObjective,value);
    507523    if (value >= cutoff) {
Note: See TracChangeset for help on using the changeset viewer.