Generated on for Gecode by doxygen 1.17.0

Complete anytime beam search engine (experimental). More...

#include <gecode/search.hh>

Public Member Functions

 CABS (T *s, const Search::Options &o=Search::Options::def)
 Initialize engine for space s and options o.
Public Member Functions inherited from Gecode::Search::Base< T >
virtual T * next (void)
 Return next solution (nullptr, if none exists or search has been stopped).
virtual Statistics statistics (void) const
 Return statistics.
virtual bool stopped (void) const
 Check whether engine has been stopped.
virtual ~Base (void)
 Destructor.

Static Public Attributes

static const bool best = true
 Whether engine does best solution search.

Additional Inherited Members

Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management.
static void operator delete (void *p)
 Free memory allocated from heap.
Protected Member Functions inherited from Gecode::Search::Base< T >
 Base (Engine *e=nullptr)
 Constructor.
Protected Attributes inherited from Gecode::Search::Base< T >
Engine * e
 The actual search engine.

Detailed Description

template<class T>
class Gecode::CABS< T >

Complete anytime beam search engine (experimental).

Explores the tree layer by layer and keeps the best nodes of each layer, ordered by rank or, without rank, by bound. The first pass keeps one node per layer. If a pass discarded nodes that could improve the incumbent, the search restarts with twice the width. The guidance is taken from Search::Options::guidance. Like BAB, next() returns improving solutions and exhausting the search proves the last solution optimal.

Search stops when the width would exceed Search::Options::max_width or the stored nodes would exceed Search::Options::frontier_limit. Nodes are stored as clones, so c_d and a_d are ignored. Tracing is not supported. Statistics::restart counts the restarts.

Definition at line 1337 of file search.hh.

Constructor & Destructor Documentation

◆ CABS()

template<class T>
Gecode::CABS< T >::CABS ( T * s,
const Search::Options & o = Search::Options::def )
inline

Initialize engine for space s and options o.

Definition at line 69 of file cabs.hpp.

Member Data Documentation

◆ best

template<class T>
const bool Gecode::CABS< T >::best = true
static

Whether engine does best solution search.

Definition at line 1342 of file search.hh.


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