PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
BranchAndBoundScheme.h File Reference

Header file for the choice of the Branch-and-Bound (B&B) by its scheme: BBScheme names the searches of the core of PBeFS, bb_scheme() reads it from its name (e.g., from a file of parameters), and parallel_branch_and_bound() runs the search of the scheme of the options on a runtime, so that a caller chooses the search by a value rather than by a type. More...

#include <array>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "PBeFS/bnb/DeterministicBranchAndBound.h"
#include "PBeFS/bnb/MultiQueueBranchAndBound.h"
#include "PBeFS/bnb/ParallelBranchAndBound.h"
#include "PBeFS/bnb/SelfSplitBranchAndBound.h"
#include "PBeFS/bnb/StealingBranchAndBound.h"

Go to the source code of this file.

Namespaces

namespace  PBeFS_di_unipi_it
 namespace for the Parallel Best-First Search library

Enumerations

enum class  BBScheme {
  sequential , shared , distributed , deterministic ,
  selfsplit , stealing , multiqueue
}
 the schemes of the B&B of the core More...

Functions

std::string_view bb_scheme_name (BBScheme s)
 the name of the scheme s
BBScheme bb_scheme (std::string_view name)
 the scheme of the given name; throws std::invalid_argument if there is none
template<BranchAndBound P, ADS::WorkerExecutor Executor = ADS::ThreadPool>
BBSolution< typename P::node_type, bb_value_t< P > > parallel_branch_and_bound (const P &problem, BBScheme s, const BasicParallelBBOptions< bb_value_t< P > > &o={}, std::optional< std::vector< BBLeaf< typename P::node_type, bb_value_t< P > > > > seeds=std::nullopt)
 the B&B of the problem by the scheme s on the given runtime, with the given options, from the given nodes [see BranchAndBoundSearch::solve()] or from the root if none; throws std::invalid_argument for the scheme multiqueue if the values are not atomic with no lock [see MultiQueueValue]

Detailed Description

Header file for the choice of the Branch-and-Bound (B&B) by its scheme: BBScheme names the searches of the core of PBeFS, bb_scheme() reads it from its name (e.g., from a file of parameters), and parallel_branch_and_bound() runs the search of the scheme of the options on a runtime, so that a caller chooses the search by a value rather than by a type.

The searches that need an external library, i.e., the farm of FastFlow and the B&B over MPI, are not among them, and they are used by their own classes [see FarmBranchAndBound.h and MPIBranchAndBound.h].

Author
Donato Meoli
Dipartimento di Informatica
Università di Pisa