8 const bool between_phases);
27 TM: before starting the new phase, \n\
28 %i nodes were trimmed from the tree.\n", trimmed);
38 while (nodep != lastnodep) {
39 if ((*nodep)->index() == -1) {
40 *nodep = *--lastnodep;
54 if (node->
index() != -1)
58 lastnodep = cands.
end();
59 for (nodep = cands.
begin(); nodep != lastnodep; ++nodep)
66 while (nodep != lastnodep) {
68 if (node->
index() == -1) {
71 if (node->
lp != -1 || node->
cg != -1 || node->
vg != -1)
73 TM: At least on of lp/cg/vg of a trimmed node is non-0.\n");
81 TM: non-existing CP is assigned to a leaf.\n");
91 TM: non-existing VP is assigned to a leaf.\n");
101 #if ! defined(BCP_ONLY_LP_PROCESS_HANDLING_WORKS)
108 if (proc->second == 0)
109 p.slaves.cp->set_proc_free(proc->first);
113 if (proc->second == 0)
114 p.slaves.vp->set_proc_free(proc->first);
122 const bool between_phases)
145 if (node->
cp != -1) {
151 TM: An internal node is assigned to a non-existing CP.\n");
155 if (node->
vp != -1) {
161 TM: An internal node is assigned to a non-existing VP.\n");
170 for (child = node->
_children.
begin(); child != lastchild; ++child)
Print the number of nodes trimmed between phases.
void remove(int index)
Return the worst true lower bound in the search tree.
double granularity() const
BCP_vec< BCP_tm_node * > _children
void enumerate_leaves(BCP_tm_node *node, const double obj_limit)
Return the worst true lower bound in the search tree.
BCP_vec< std::pair< int, int > > leaves_per_cp
iterator begin()
Return an iterator to the beginning of the object.
CoinSearchTreeManager candidate_list
BCP_vec< BCP_tm_node * > next_phase_nodes
a vector of nodes to be processed in the next phase
BCP_vec< BCP_tm_node * >::iterator end()
void push_back(const_reference x)
Append x to the end of the vector.
BCP_vec< BCP_tm_node * >::iterator begin()
void pop_back()
Delete the last entry.
BCP_vec< std::pair< int, int > > leaves_per_vp
void BCP_tm_trim_tree_wrapper(BCP_tm_prob &p, const bool between_phases)
int mark_descendants_for_deletion()
void remove_child(BCP_tm_node *node)
Currently there isn't any error handling in BCP.
Indicates whether that part of the tree that's completely explored should be freed as soon as possibl...
iterator end()
Return an iterator to the end of the object.
The class BCP_vec serves the same purpose as the vector class in the standard template library...
void BCP_tm_remove_explored(BCP_tm_prob &p, BCP_tm_node *node)
static int BCP_tm_trim_tree(BCP_tm_prob &p, BCP_tm_node *node, const bool between_phases)
BCP_vec< std::pair< int, int > >::iterator BCP_tm_identify_process(BCP_vec< std::pair< int, int > > &proclist, int proc)
char param(BCP_tm_par::chr_params key) const