Generated on for Gecode by doxygen 1.17.0

Search engine options More...

#include <gecode/search.hh>

Public Member Functions

 Options (void)
 Initialize with default values.
Options expand (void) const
 Expand with real number of threads.

Public Attributes

bool clone
 Whether engines create a clone when being initialized.
double threads
 Number of threads to use.
WorkerControl worker_control
unsigned int c_d
 Create a clone after every c_d commits (commit distance).
unsigned int a_d
 Create a clone during recomputation if distance is greater than a_d (adaptive distance).
unsigned int d_l
 Discrepancy limit (for LDS, reaching it does not stop the engine).
unsigned int assets
 Number of assets (engines) in a portfolio.
unsigned int slice
 Size of a slice in a portfolio (in number of failures).
unsigned int nogoods_limit
 Depth limit for extraction of no-goods.
Stop * stop
 Stop object for stopping search.
Cutoff * cutoff
 Cutoff for restart-based search.
SearchTracer * tracer
 Tracer object for tracing search.
const HeuristicGuidance * guidance
 Guidance for heuristic search (AStar and CABS, not copied).
unsigned long int max_width
 Maximal beam width for CABS (zero for no limit).
unsigned long int frontier_limit
 Maximal number of stored nodes for CABS (zero for no limit).

Static Public Attributes

static const Options def
 Default options.

Detailed Description

Search engine options

Defines options for search engines. Not all search engines might honor all option values.

  • c_d as minimal recomputation distance: this guarantees that a path between two nodes in the search tree for which copies are stored has at least length c_d. That is, in order to recompute a node in the search tree, c_d recomputation steps are needed. The minimal recomputation distance yields a guarantee on saving memory compared to full copying: it stores c_d times less nodes than full copying.
  • a_d as adaptive recomputation distance: when a node needs to be recomputed and the path is longer than a_d, an intermediate copy is created (approximately in the middle of the path) to speed up future recomputation. Note that small values of a_d can increase the memory consumption considerably.

Full copying corresponds to a maximal recomputation distance c_d of 1.

All recomputation performed is based on batch recomputation: batch recomputation performs propagation only once for an entire path used in recomputation.

The number of threads to be used is controlled by a double \(n\) (assume that \(m\) is the number of processing units available). If \(1 \leq n\), \(n\) threads are chosen (of course with rounding). If \(n \leq -1\), then \(m + n\) threads are chosen (all but \(-n\) processing units get a thread). If \(n\) is zero, \(m\) threads are chosen. If \(0<n<1\), \(n \times m\) threads are chosen. If \(-1 <n<0\), \((1+n)\times m\) threads are chosen.

Definition at line 848 of file search.hh.

Constructor & Destructor Documentation

◆ Options()

Gecode::Search::Options::Options ( void )
inline

Initialize with default values.

Definition at line 37 of file options.hpp.

Member Function Documentation

◆ expand()

Options Gecode::Search::Options::expand ( void ) const

Expand with real number of threads.

Definition at line 43 of file options.cpp.

Member Data Documentation

◆ clone

bool Gecode::Search::Options::clone

Whether engines create a clone when being initialized.

Definition at line 851 of file search.hh.

◆ threads

double Gecode::Search::Options::threads

Number of threads to use.

Definition at line 853 of file search.hh.

◆ worker_control

WorkerControl Gecode::Search::Options::worker_control

External worker control

After option expansion, threads is the immutable worker capacity. Requests through this handle never change threads. An empty handle disables adjustment; see WorkerControl for lifetime and scheduling rules.

Definition at line 861 of file search.hh.

◆ c_d

unsigned int Gecode::Search::Options::c_d

Create a clone after every c_d commits (commit distance).

Definition at line 863 of file search.hh.

◆ a_d

unsigned int Gecode::Search::Options::a_d

Create a clone during recomputation if distance is greater than a_d (adaptive distance).

Definition at line 865 of file search.hh.

◆ d_l

unsigned int Gecode::Search::Options::d_l

Discrepancy limit (for LDS, reaching it does not stop the engine).

Definition at line 867 of file search.hh.

◆ assets

unsigned int Gecode::Search::Options::assets

Number of assets (engines) in a portfolio.

Definition at line 869 of file search.hh.

◆ slice

unsigned int Gecode::Search::Options::slice

Size of a slice in a portfolio (in number of failures).

Definition at line 871 of file search.hh.

◆ nogoods_limit

unsigned int Gecode::Search::Options::nogoods_limit

Depth limit for extraction of no-goods.

Definition at line 873 of file search.hh.

◆ stop

Stop* Gecode::Search::Options::stop

Stop object for stopping search.

Definition at line 875 of file search.hh.

◆ cutoff

Cutoff* Gecode::Search::Options::cutoff

Cutoff for restart-based search.

Definition at line 877 of file search.hh.

◆ tracer

SearchTracer* Gecode::Search::Options::tracer

Tracer object for tracing search.

Definition at line 879 of file search.hh.

◆ guidance

const HeuristicGuidance* Gecode::Search::Options::guidance

Guidance for heuristic search (AStar and CABS, not copied).

Definition at line 882 of file search.hh.

◆ max_width

unsigned long int Gecode::Search::Options::max_width

Maximal beam width for CABS (zero for no limit).

Definition at line 884 of file search.hh.

◆ frontier_limit

unsigned long int Gecode::Search::Options::frontier_limit

Maximal number of stored nodes for CABS (zero for no limit).

Definition at line 886 of file search.hh.

◆ def

const Options Gecode::Search::Options::def
static

Default options.

Definition at line 889 of file search.hh.


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