Generated on for Gecode by doxygen 1.17.0
Gecode::Search::Par::PortfolioStop Class Reference

Stop object used for controlling slaves in a portfolio. More...

#include <gecode/search/par/pbs.hh>

Public Member Functions

 PortfolioStop (Stop *so, Stop *po, const WorkerControl &control)
 Initialize with slave stop so, portfolio stop po, and control.
void share (std::atomic< bool > *ts)
 Set pointer to shared tostop variable.
virtual bool stop (const Statistics &s, const Options &o)
 Return true if portfolio engine must be stopped.
void wake (void)
 Wake workers so that a paused asset can observe the portfolio stop.
void stop (bool s)
 Signal whether search must be stopped.
bool stop (void) const
 Whether search must be stopped.
 Stop (void)
 Default constructor.
virtual ~Stop (void)
 Destructor.

Additional Inherited Members

static Stop * node (unsigned long long int l)
 Stop if node limit l has been exceeded.
static Stop * fail (unsigned long long int l)
 Stop if failure limit l has been exceeded.
static Stop * time (double l)
 Stop if time limit l (in milliseconds) has been exceeded.
static Stop * restart (unsigned long long int l)
 Stop if restart limit l has been exceeded.
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.

Detailed Description

Stop object used for controlling slaves in a portfolio.

Definition at line 47 of file pbs.hh.

Constructor & Destructor Documentation

◆ PortfolioStop()

Gecode::Search::Par::PortfolioStop::PortfolioStop ( Stop * so,
Stop * po,
const WorkerControl & control )
inline

Initialize with slave stop so, portfolio stop po, and control.

Definition at line 142 of file pbs.hpp.

Member Function Documentation

◆ share()

void Gecode::Search::Par::PortfolioStop::share ( std::atomic< bool > * ts)
inline

Set pointer to shared tostop variable.

Definition at line 147 of file pbs.hpp.

◆ stop() [1/3]

bool Gecode::Search::Par::PortfolioStop::stop ( const Statistics & s,
const Options & o )
virtual

Return true if portfolio engine must be stopped.

Implements Gecode::Search::Stop.

Definition at line 44 of file pbs.cpp.

◆ wake()

void Gecode::Search::Par::PortfolioStop::wake ( void )

Wake workers so that a paused asset can observe the portfolio stop.

Definition at line 51 of file pbs.cpp.

◆ stop() [2/3]

void Gecode::Search::Par::PortfolioStop::stop ( bool s)

Signal whether search must be stopped.

◆ stop() [3/3]

bool Gecode::Search::Par::PortfolioStop::stop ( void ) const

Whether search must be stopped.


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