BBSolution

Declared in bnb/BranchAndBound.h; the same struct on the site of Doxygen.

template<class Node, class V = double>
struct BBSolution

the outcome of a B&B

value is the incumbent value and bound a bound on the optimum, both in the sense of the problem, and the gap, value minus bound in absolute value, is valid whatever the status; value is none() of BBValueTraits if no feasible value is known, and node is the incumbent node, empty if no feasible node was found (even when an initial incumbent value was given).

With BBOptions::keep_frontier, frontier holds the leaves of the tree explored, in no particular order: the nodes pruned, feasible or infeasible, and those left open by a limit. Their subtrees cover the subtrees of the nodes the search started from, so that a search started from them [see BranchAndBoundSearch::solve()] explores the same region, e.g., after a change of the data that leaves the branching valid.

Public Functions

inline bool feasible(void) const noexcept

true if a feasible value is known

Public Members

BBStatus status = BBStatus::infeasible

how the search ended

std::optional<Node> node

the incumbent node

V value = BBValueTraits<V>::none()

its value

V bound = BBValueTraits<V>::none()

the bound

V gap = BBValueTraits<V>::infinity()

the gap

BBStats stats

the counters

std::vector<BBLeaf<Node, V>> frontier

the leaves, if kept