Generated on Sat Feb 7 2015 02:01:50 for Gecode by doxygen 1.8.9.1
Gecode::Search::Options Class Reference

Search engine options More...

#include <search.hh>

Public Member Functions

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

Public Attributes

bool clone
 Whether engines create a clone when being initialized. More...
 
double threads
 Number of threads to use. More...
 
unsigned int c_d
 Create a clone after every c_d commits (commit distance) More...
 
unsigned int a_d
 Create a clone during recomputation if distance is greater than a_d (adaptive distance) More...
 
unsigned int nogoods_limit
 Depth limit for extraction of no-goods. More...
 
Stopstop
 Stop object for stopping search. More...
 
Cutoffcutoff
 Cutoff for restart-based search. More...
 

Static Public Attributes

static const Options def
 Default options. More...
 

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 204 of file search.hh.

Constructor & Destructor Documentation

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

Initialize with default values.

Definition at line 41 of file options.hpp.

Member Function Documentation

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

Expand with real number of threads.

Definition at line 47 of file options.cpp.

Member Data Documentation

bool Gecode::Search::Options::clone

Whether engines create a clone when being initialized.

Definition at line 207 of file search.hh.

double Gecode::Search::Options::threads

Number of threads to use.

Definition at line 209 of file search.hh.

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

Create a clone after every c_d commits (commit distance)

Definition at line 211 of file search.hh.

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

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

Definition at line 213 of file search.hh.

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

Depth limit for extraction of no-goods.

Definition at line 215 of file search.hh.

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

Stop object for stopping search.

Definition at line 217 of file search.hh.

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

Cutoff for restart-based search.

Definition at line 219 of file search.hh.

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

Default options.

Definition at line 221 of file search.hh.


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