Ignore:
Timestamp:
Sep 27, 2010 12:55:11 PM (9 years ago)
Author:
lou
Message:

Fix `Invalid heap' error in cl debug builds. Add validateHeap method to CbcTree? for future debugging.

File:
1 edited

Legend:

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

    r1500 r1506  
    36243624            }
    36253625            lockThread();
    3626             // Do from deepest (clean tree w.r.t. new solution)
    3627             tree_->cleanTree(this, newCutoff, bestPossibleObjective_) ;
    3628             nodeCompare_->newSolution(this) ;
    3629             nodeCompare_->newSolution(this, continuousObjective_,
    3630                                       continuousInfeasibilities_) ;
    3631             // side effect: redo heap
    3632             tree_->setComparison(*nodeCompare_) ;
     3626            /*
     3627              Clean the tree to reflect the new solution, then see if the
     3628              node comparison predicate wants to make any changes. If so,
     3629              call setComparison for the side effect of rebuilding the heap.
     3630            */
     3631            tree_->cleanTree(this,newCutoff,bestPossibleObjective_) ;
     3632            if (nodeCompare_->newSolution(this) ||
     3633                nodeCompare_->newSolution(this,continuousObjective_,
     3634                                          continuousInfeasibilities_)) {
     3635              tree_->setComparison(*nodeCompare_) ;
     3636            }
    36333637            if (tree_->empty()) {
    36343638                continue;
Note: See TracChangeset for help on using the changeset viewer.