BBIncumbent
Declared in bnb/ParallelBranchAndBound.h; the same class on the site of Doxygen.
-
template<class Node, class V = double>
class BBIncumbent the incumbent shared by the workers of a parallel B&B
The value (in the minimization) is atomic when V has a lock-free std::atomic, so that the workers read it without a lock when they prune; an improvement takes the lock, checks the value again, and stores the node and calls the callback under it. For another V (e.g., the rationals of an exact arithmetic) the value is read under the lock too.
Public Functions
-
inline explicit BBIncumbent(V v)
constructor, taking the initial value (infinity() of BBValueTraits if none)
-
template<class P>
inline bool improve(V v, const Node &n, const BasicBBOptions<V> &o) offers the value v of the node n of the problem P; true if it is a new incumbent
-
inline explicit BBIncumbent(V v)