Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::Search::Seq::PBS< best > Class Template Reference

Sequential portfolio engine implementation. More...

#include <pbs.hh>

Public Member Functions

 PBS (Engine **slaves, Stop **stops, unsigned int n, const Statistics &stat, const Search::Options &opt)
 Initialize.
virtual Spacenext (void)
 Return next solution (NULL, if none exists or search has been stopped)
virtual Statistics statistics (void) const
 Return statistics.
virtual bool stopped (void) const
 Check whether engine has been stopped.
virtual void constrain (const Space &b)
 Constrain future solutions to be better than b.
virtual ~PBS (void)
 Destructor.
Public Member Functions inherited from Gecode::Search::Engine
virtual void reset (Space *s)
 Reset engine to restart at space s (does nothing)
virtual NoGoodsnogoods (void)
 Return no-goods (the no-goods are empty)
virtual ~Engine (void)
 Destructor.

Protected Attributes

Statistics stat
 Master statistics.
SharedStopInfo ssi
 Shared slave information.
unsigned int slice
 Size of a slice.
Slaveslaves
 Slaves.
unsigned int n_slaves
 Number of slave engines.
unsigned int cur
 Current slave to run.
bool slave_stop
 Whether a slave has been stopped.

Additional Inherited Members

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

template<bool best>
class Gecode::Search::Seq::PBS< best >

Sequential portfolio engine implementation.

Definition at line 98 of file pbs.hh.

Constructor & Destructor Documentation

◆ PBS()

template<bool best>
Gecode::Search::Seq::PBS< best >::PBS ( Engine ** slaves,
Stop ** stops,
unsigned int n,
const Statistics & stat,
const Search::Options & opt )
inline

Initialize.

Definition at line 80 of file pbs.hpp.

◆ ~PBS()

template<bool best>
Gecode::Search::Seq::PBS< best >::~PBS ( void )
virtual

Destructor.

Definition at line 163 of file pbs.hpp.

Member Function Documentation

◆ next()

template<bool best>
Space * Gecode::Search::Seq::PBS< best >::next ( void )
virtual

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

Implements Gecode::Search::Engine.

Definition at line 97 of file pbs.hpp.

◆ statistics()

template<bool best>
Statistics Gecode::Search::Seq::PBS< best >::statistics ( void ) const
virtual

Return statistics.

Implements Gecode::Search::Engine.

Definition at line 146 of file pbs.hpp.

◆ stopped()

template<bool best>
bool Gecode::Search::Seq::PBS< best >::stopped ( void ) const
virtual

Check whether engine has been stopped.

Implements Gecode::Search::Engine.

Definition at line 140 of file pbs.hpp.

◆ constrain()

template<bool best>
void Gecode::Search::Seq::PBS< best >::constrain ( const Space & b)
virtual

Constrain future solutions to be better than b.

Reimplemented from Gecode::Search::Engine.

Definition at line 155 of file pbs.hpp.

Member Data Documentation

◆ stat

template<bool best>
Statistics Gecode::Search::Seq::PBS< best >::stat
protected

Master statistics.

Definition at line 101 of file pbs.hh.

◆ ssi

template<bool best>
SharedStopInfo Gecode::Search::Seq::PBS< best >::ssi
protected

Shared slave information.

Definition at line 103 of file pbs.hh.

◆ slice

template<bool best>
unsigned int Gecode::Search::Seq::PBS< best >::slice
protected

Size of a slice.

Definition at line 105 of file pbs.hh.

◆ slaves

template<bool best>
Slave* Gecode::Search::Seq::PBS< best >::slaves
protected

Slaves.

Definition at line 107 of file pbs.hh.

◆ n_slaves

template<bool best>
unsigned int Gecode::Search::Seq::PBS< best >::n_slaves
protected

Number of slave engines.

Definition at line 109 of file pbs.hh.

◆ cur

template<bool best>
unsigned int Gecode::Search::Seq::PBS< best >::cur
protected

Current slave to run.

Definition at line 111 of file pbs.hh.

◆ slave_stop

template<bool best>
bool Gecode::Search::Seq::PBS< best >::slave_stop
protected

Whether a slave has been stopped.

Definition at line 113 of file pbs.hh.


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