Generated on Fri Aug 24 2012 04:52:32 for Gecode by doxygen 1.8.1.1
Gecode::Search::Parallel::Restart Class Reference

Depth-first restart best solution search engine implementation. More...

#include <restart.hh>

List of all members.

Public Member Functions

 Restart (Space *s, size_t sz, const Search::Options &o)
 Initialize engine for space s (with size sz) and options o.
virtual Spacenext (void)
 Return next better solution (NULL, if none exists or search has been stopped)
virtual ~Restart (void)
 Destructor.
- Public Member Functions inherited from Gecode::Search::Parallel::DFS
Workerworker (unsigned int i) const
 Provide access to worker i.
void solution (Space *s)
 Report solution s.
Spacereset (Space *s)
 Reset engine to restart at space s and return new root space.
 DFS (Space *s, size_t sz, const Options &o)
 Initialize for space s (of size sz) with options o.
virtual Statistics statistics (void) const
 Return statistics.
virtual ~DFS (void)
 Destructor.
- Public Member Functions inherited from Gecode::Search::Parallel::Engine
const Optionsopt (void) const
 Provide access to search options.
unsigned int workers (void) const
 Return number of workers.
Cmd cmd (void) const
 Return current command.
void block (void)
 Block all workers.
void release (Cmd c)
 Release all workers.
void wait (void)
 Ensure that worker waits.
void ack_terminate (void)
 For worker to acknowledge termination command.
void terminated (void)
 For worker to register termination.
void wait_terminate (void)
 For worker to wait until termination is legal.
void terminate (void)
 For engine to peform thread termination.
void ack_reset_start (void)
 For worker to acknowledge start of reset cycle.
void ack_reset_stop (void)
 For worker to acknowledge stop of reset cycle.
void wait_reset (void)
 For worker to wait for all workers to reset.
void idle (void)
 Report that worker is idle.
void busy (void)
 Report that worker is busy.
void stop (void)
 Report that worker has been stopped.
 Engine (const Options &o)
 Initialize with options o.
virtual bool stopped (void) const
 Check whether engine has been stopped.
- Public Member Functions inherited from Gecode::Search::Engine
virtual ~Engine (void)
 Destructor.

Protected Attributes

Spaceroot
 Root node.
Spacebest
 So-far best solution.
bool reset_needed
 Whether a reset is needed.
- Protected Attributes inherited from Gecode::Search::Parallel::DFS
Worker ** _worker
 Array of worker references.
- Protected Attributes inherited from Gecode::Search::Parallel::Engine
const Options _opt
 Search options.
volatile Cmd _cmd
 The current command.
Support::Mutex _m_wait
 Mutex for forcing workers to wait.
Support::Mutex _m_term
 Mutex for access to termination information.
volatile unsigned int _n_term_not_ack
 Number of workers that have not yet acknowledged termination.
Support::Event _e_term_ack
 Event for termination acknowledgment.
Support::Mutex _m_wait_terminate
 Mutex for waiting for termination.
volatile unsigned int _n_not_terminated
 Number of not yet terminated workers.
Support::Event _e_terminate
 Event for termination (all threads have terminated)
Support::Mutex _m_reset
 Mutex for access to reset information.
volatile unsigned int _n_reset_not_ack
 Number of workers that have not yet acknowledged reset.
Support::Event e_reset_ack_start
 Event for reset acknowledgment started.
Support::Event e_reset_ack_stop
 Event for reset acknowledgment stopped.
Support::Mutex m_wait_reset
 Mutex for waiting for reset.
Support::Mutex m_search
 Mutex for search.
Support::Event e_search
 Event for search (solution found, no more solutions, search stopped)
Support::DynamicQueue< Space
*, Heap
solutions
 Queue of solutions.
volatile unsigned int n_busy
 Number of busy workers.
volatile bool has_stopped
 Whether a worker had been stopped.

Detailed Description

Depth-first restart best solution search engine implementation.

Definition at line 46 of file restart.hh.


Constructor & Destructor Documentation

Gecode::Search::Parallel::Restart::Restart ( Space s,
size_t  sz,
const Search::Options o 
)
inline

Initialize engine for space s (with size sz) and options o.

Definition at line 64 of file restart.hh.

Gecode::Search::Parallel::Restart::~Restart ( void  )
virtual

Destructor.

Definition at line 158 of file restart.cpp.


Member Function Documentation

Space * Gecode::Search::Parallel::Restart::next ( void  )
virtual

Return next better solution (NULL, if none exists or search has been stopped)

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

Definition at line 47 of file restart.cpp.


Member Data Documentation

Space* Gecode::Search::Parallel::Restart::root
protected

Root node.

Definition at line 49 of file restart.hh.

Space* Gecode::Search::Parallel::Restart::best
protected

So-far best solution.

Definition at line 51 of file restart.hh.

bool Gecode::Search::Parallel::Restart::reset_needed
protected

Whether a reset is needed.

Definition at line 53 of file restart.hh.


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