10 #ifndef CMR_BRANCH_NODE_H 11 #define CMR_BRANCH_NODE_H 44 double tourlen_,
double estimate_);
50 using Split = std::array<BranchNode, 2>;
67 bool is_root()
const {
return parent ==
nullptr; }
71 {
return stat == Status::Pruned || stat == Status::Done; }
93 static bool tour_worse(
const std::list<BranchNode>::iterator &A,
94 const std::list<BranchNode>::iterator &B);
97 static bool bound_worse(
const std::list<BranchNode>::iterator &A,
98 const std::list<BranchNode>::iterator &B);
100 using Pref = decltype(&tour_worse);
111 std::ostream &operator<<(std::ostream &os,
const BranchNode::Dir &dir);
112 std::ostream &operator<<(std::ostream &os,
const BranchNode &B);
114 using BranchHistory = std::list<BranchNode>;
117 using EndsDir = std::pair<EndPts, BranchNode::Dir>;
int depth
Search tree depth of this node.
Definition: branch_node.hpp:58
Miscellaneous functions, structs/enums, and constants for LPs.
Status stat
The type of processing required by the node.
Definition: branch_node.hpp:55
static bool tour_worse(const std::list< BranchNode >::iterator &A, const std::list< BranchNode >::iterator &B)
Returns true if A has a worse tour than B.
Definition: branch_node.cpp:92
BranchNode()
Construct a root node.
Definition: branch_node.cpp:24
LP::Basis::Ptr price_basis
A starting basis for if Status is NeedsPrice or NeedsRecover.
Definition: branch_node.hpp:63
bool is_root() const
Is this the root problem.
Definition: branch_node.hpp:67
EndPts ends
The endpoints of the branch edge.
Definition: branch_node.hpp:52
Utility functions, macros, and structures.
BranchNode::Dir dir_from_int(int entry)
Turn a 0-1 value entry into a BranchNode::Dir.
Definition: branch_node.cpp:113
Dir direction
Down branch or up branch.
Definition: branch_node.hpp:53
std::array< BranchNode, 2 > Split
Alias declaration for returning two split child problems.
Definition: branch_node.hpp:50
The namespace for this project.
Definition: abc_nodesel.hpp:20
static bool bound_worse(const std::list< BranchNode >::iterator &A, const std::list< BranchNode >::iterator &B)
Returns true if A has a worse (higher) SB estimate than B.
Definition: branch_node.cpp:106
bool visited() const
Has the problem been processed.
Definition: branch_node.hpp:70
std::string bnode_brief(const BranchNode &B)
A concise "label" for the BranchNode B.
Definition: branch_node.cpp:125
Definition: branch_node.hpp:25
Simple base class for storing edge of a graph as a sorted pair of nodes.
Definition: util.hpp:239
double estimate
The objective value estimate from edge selection.
Definition: branch_node.hpp:64
std::pair< EndPts, BranchNode::Dir > EndsDir
Alias declaration for EndPts and branching direction.
Definition: branch_node.hpp:117
double tourlen
Estimated best tour length for this node.
Definition: branch_node.hpp:60