Generated on Sat May 25 2013 18:00:50 for Gecode by doxygen 1.8.3.1
Gecode::Search::Parallel::BAB::Worker Class Reference

Parallel branch-and-bound search worker More...

#include <bab.hh>

Public Member Functions

 Worker (Space *s, size_t sz, BAB &e)
 Initialize for space s (of size sz) with engine e. More...
 
BABengine (void) const
 Provide access to engine. More...
 
virtual void run (void)
 Start execution of worker. More...
 
void better (Space *b)
 Accept better solution b. More...
 
void find (void)
 Try to find some work. More...
 
void reset (Space *s)
 Reset engine to restart at space s. More...
 
virtual ~Worker (void)
 Destructor. More...
 
- Public Member Functions inherited from Gecode::Search::Parallel::Engine::Worker
 Worker (Space *s, size_t sz, Engine &e)
 Initialize for space s (of size sz) with engine e. More...
 
Spacesteal (unsigned long int &d)
 Hand over some work (NULL if no work available) More...
 
Statistics statistics (void)
 Return statistics. More...
 
Engineengine (void) const
 Provide access to engine. More...
 
- Public Member Functions inherited from Gecode::Search::Worker
 Worker (size_t sz)
 Initialize with space size sz. More...
 
void start (void)
 Reset stop information. More...
 
bool stop (const Options &o, size_t sz)
 Check whether engine must be stopped (with additional stackspace sz) More...
 
bool stopped (void) const
 Check whether engine has been stopped. More...
 
void push (const Space *s, const Choice *c)
 New space s and choice c get pushed on stack. More...
 
void constrained (const Space *s1, const Space *s2)
 Space s1 is replaced by space s2 due to constraining. More...
 
void adapt (const Space *s)
 New space s is added for adaptive recomputation. More...
 
void pop (const Space *s, const Choice *c)
 Space s and choice c get popped from stack. More...
 
void lao (const Space *s)
 Space s gets used for LAO (removed from stack) More...
 
void current (const Space *s)
 Space s becomes current space (s = NULL: current space deleted) More...
 
void reset (const Space *s, unsigned long int d=0)
 Reset statistics for space s with root depth d. More...
 
void reset (void)
 Reset statistics for failed space. More...
 
void stack_depth (unsigned long int d)
 Record stack depth d. More...
 
unsigned long int steal_depth (unsigned long int d) const
 Return steal depth. More...
 
- Public Member Functions inherited from Gecode::Search::Statistics
 Statistics (void)
 Initialize. More...
 
void reset (void)
 Reset. More...
 
Statistics operator+ (const Statistics &s)
 Return sum with s. More...
 
Statisticsoperator+= (const Statistics &s)
 Increment by statistics s. More...
 
- Public Member Functions inherited from Gecode::StatusStatistics
 StatusStatistics (void)
 Initialize. More...
 
void reset (void)
 Reset information. More...
 
StatusStatistics operator+ (const StatusStatistics &s)
 Return sum with s. More...
 
StatusStatisticsoperator+= (const StatusStatistics &s)
 Increment by statistics s. More...
 
- Public Member Functions inherited from Gecode::Support::Runnable
virtual ~Runnable (void)
 Destructor. More...
 

Protected Attributes

int mark
 Number of entries not yet constrained to be better. More...
 
Spacebest
 Best solution found so far. More...
 
- Protected Attributes inherited from Gecode::Search::Parallel::Engine::Worker
Engine_engine
 Reference to engine. More...
 
Support::Mutex m
 Mutex for access to worker. More...
 
Path path
 Current path ins search tree. More...
 
Spacecur
 Current space being explored. More...
 
unsigned int d
 Distance until next clone. More...
 
bool idle
 Whether worker is currently idle. More...
 
- Protected Attributes inherited from Gecode::Search::Worker
bool _stopped
 Whether engine has been stopped. More...
 
size_t mem_space
 Memory required for a single space. More...
 
size_t mem_cur
 Memory for the current space (including memory for caching) More...
 
size_t mem_total
 Current total memory. More...
 
unsigned long int root_depth
 Depth of root node (for work stealing) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Support::Runnable
static void * operator new (size_t s)
 Allocate memory from heap. More...
 
static void operator delete (void *p)
 Free memory allocated from heap. More...
 
- Public Attributes inherited from Gecode::Search::Statistics
unsigned long int fail
 Number of failed nodes in search tree. More...
 
unsigned long int node
 Number of nodes expanded. More...
 
unsigned long int depth
 Maximum depth of search stack. More...
 
size_t memory
 Peak memory allocated. More...
 
unsigned long int restart
 Number of restarts. More...
 

Detailed Description

Parallel branch-and-bound search worker

Definition at line 49 of file bab.hh.

Constructor & Destructor Documentation

Gecode::Search::Parallel::BAB::Worker::Worker ( Space s,
size_t  sz,
BAB e 
)
inline

Initialize for space s (of size sz) with engine e.

Definition at line 135 of file bab.hh.

Gecode::Search::Parallel::BAB::Worker::~Worker ( void  )
virtual

Destructor.

Reimplemented from Gecode::Search::Parallel::Engine::Worker.

Definition at line 200 of file bab.cpp.

Member Function Documentation

BAB & Gecode::Search::Parallel::BAB::Worker::engine ( void  ) const
inline

Provide access to engine.

Definition at line 104 of file bab.hh.

void Gecode::Search::Parallel::BAB::Worker::run ( void  )
virtual

Start execution of worker.

Implements Gecode::Support::Runnable.

Definition at line 61 of file bab.cpp.

void Gecode::Search::Parallel::BAB::Worker::better ( Space b)
inline

Accept better solution b.

Definition at line 161 of file bab.hh.

void Gecode::Search::Parallel::BAB::Worker::find ( void  )
inline

Try to find some work.

Definition at line 201 of file bab.hh.

void Gecode::Search::Parallel::BAB::Worker::reset ( Space s)
inline

Reset engine to restart at space s.

Definition at line 113 of file bab.hh.

Member Data Documentation

int Gecode::Search::Parallel::BAB::Worker::mark
protected

Number of entries not yet constrained to be better.

Definition at line 52 of file bab.hh.

Space* Gecode::Search::Parallel::BAB::Worker::best
protected

Best solution found so far.

Definition at line 54 of file bab.hh.


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