PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
BBIncumbent< Node, V > Class Template Reference

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

Detailed Description

template<class Node, class V = double>
class PBeFS_di_unipi_it::BBIncumbent< Node, V >

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.

Constructor & Destructor Documentation

◆ BBIncumbent()

template<class Node, class V = double>
BBIncumbent ( V v)
inlineexplicit

constructor, taking the initial value (infinity() of BBValueTraits if none)

Member Function Documentation

◆ improve()

template<class Node, class V = double>
template<class P>
bool improve ( V v,
const Node & n,
const BasicBBOptions< V > & o )
inline

offers the value v of the node n of the problem P; true if it is a new incumbent

◆ take_node()

template<class Node, class V = double>
std::optional< Node > take_node ( void )
inline

moves out the node of the incumbent, if any

◆ value()

template<class Node, class V = double>
V value ( void ) const
inlinenodiscard

the current value


The documentation for this class was generated from the following file: