|
PBeFS
Parallel Best-First Search
|
the incumbent shared by the workers of a parallel B&B More...
#include <PBeFS/bnb/ParallelBranchAndBound.h>
Public Member Functions | |
| BBIncumbent (V v) | |
| constructor, taking the initial value (infinity() of BBValueTraits if none) | |
| V | value (void) const |
| the current value | |
| template<class P> | |
| 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 | |
| std::optional< Node > | take_node (void) |
| moves out the node of the incumbent, if any | |
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.
|
inlineexplicit |
constructor, taking the initial value (infinity() of BBValueTraits if none)
|
inline |
offers the value v of the node n of the problem P; true if it is a new incumbent
moves out the node of the incumbent, if any
|
inlinenodiscard |
the current value