Generated on Fri Jul 13 2018 06:08:30 for Gecode by doxygen 1.8.14
search.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Christian Schulte <schulte@gecode.org>
5  * Guido Tack <tack@gecode.org>
6  *
7  * Copyright:
8  * Christian Schulte, 2002
9  * Guido Tack, 2004
10  *
11  * Last modified:
12  * $Date: 2016-10-25 12:52:26 +0200 (Tue, 25 Oct 2016) $ by $Author: schulte $
13  * $Revision: 15233 $
14  *
15  * This file is part of Gecode, the generic constraint
16  * development environment:
17  * http://www.gecode.org
18  *
19  * Permission is hereby granted, free of charge, to any person obtaining
20  * a copy of this software and associated documentation files (the
21  * "Software"), to deal in the Software without restriction, including
22  * without limitation the rights to use, copy, modify, merge, publish,
23  * distribute, sublicense, and/or sell copies of the Software, and to
24  * permit persons to whom the Software is furnished to do so, subject to
25  * the following conditions:
26  *
27  * The above copyright notice and this permission notice shall be
28  * included in all copies or substantial portions of the Software.
29  *
30  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
34  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
35  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37  *
38  */
39 
40 #ifndef __GECODE_SEARCH_HH__
41 #define __GECODE_SEARCH_HH__
42 
43 #include <gecode/kernel.hh>
44 
45 /*
46  * Configure linking
47  *
48  */
49 #if !defined(GECODE_STATIC_LIBS) && \
50  (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
51 
52 #ifdef GECODE_BUILD_SEARCH
53 #define GECODE_SEARCH_EXPORT __declspec( dllexport )
54 #else
55 #define GECODE_SEARCH_EXPORT __declspec( dllimport )
56 #endif
57 
58 #else
59 
60 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
61 #define GECODE_SEARCH_EXPORT __attribute__ ((visibility("default")))
62 #else
63 #define GECODE_SEARCH_EXPORT
64 #endif
65 
66 #endif
67 
68 // Configure auto-linking
69 #ifndef GECODE_BUILD_SEARCH
70 #define GECODE_LIBRARY_NAME "Search"
72 #endif
73 
74 
75 namespace Gecode { namespace Search {
76 
78  namespace Sequential {}
79 
81  namespace Parallel {}
82 
84  namespace Meta {}
85 
86  namespace Meta {
87 
89  namespace Sequential {}
90 
92  namespace Parallel {}
93 
94  }
95 
96 
102  namespace Config {
104  const bool clone = true;
106  const double threads = 1.0;
107 
109  const unsigned int c_d = 8;
111  const unsigned int a_d = 2;
112 
114  const unsigned int steal_limit = 3;
116  const unsigned int initial_delay = 5;
117 
119  const unsigned int d_l = 5;
120 
122  const double base = 1.5;
124  const unsigned int slice = 250;
125 
127  const unsigned int nogoods_limit = 128;
128  }
129 
130 }}
131 
133 
134 namespace Gecode { namespace Search {
135 
140  class Statistics : public StatusStatistics {
141  public:
143  unsigned long int fail;
145  unsigned long int node;
147  unsigned long int depth;
149  unsigned long int restart;
151  unsigned long int nogood;
153  Statistics(void);
155  void reset(void);
157  Statistics operator +(const Statistics& s);
159  Statistics& operator +=(const Statistics& s);
160  };
161 
162 }}
163 
165 
166 namespace Gecode { namespace Search {
167 
173  public:
175 
176  Cutoff(void);
179  virtual unsigned long int operator ()(void) const = 0;
181  virtual unsigned long int operator ++(void) = 0;
183  virtual ~Cutoff(void);
185 
187  static Cutoff*
189  constant(unsigned long int scale=Config::slice);
191  static Cutoff*
192  linear(unsigned long int scale=Config::slice);
196  static Cutoff*
197  geometric(unsigned long int scale=Config::slice, double base=Config::base);
199  static Cutoff*
200  luby(unsigned long int scale=Config::slice);
205  static Cutoff*
206  rnd(unsigned int seed,
207  unsigned long int min, unsigned long int max,
208  unsigned long int n);
210  static Cutoff*
211  append(Cutoff* c1, unsigned long int n, Cutoff* c2);
213  static Cutoff*
214  merge(Cutoff* c1, Cutoff* c2);
216  static Cutoff*
217  repeat(Cutoff* c, unsigned long int n);
219  };
220 
226  protected:
228  unsigned long int c;
229  public:
231  CutoffConstant(unsigned long int c);
233  virtual unsigned long int operator ()(void) const;
235  virtual unsigned long int operator ++(void);
236  };
237 
243  protected:
245  unsigned long int scale;
247  unsigned long int n;
248  public:
250  CutoffLinear(unsigned long int scale);
252  virtual unsigned long int operator ()(void) const;
254  virtual unsigned long int operator ++(void);
255  };
256 
262  protected:
264  unsigned long int i;
266  unsigned long int scale;
268  static const unsigned long int n_start = 63U;
270  static unsigned long int start[n_start];
272  static unsigned long int log(unsigned long int i);
274  static unsigned long int luby(unsigned long int i);
275  public:
277  CutoffLuby(unsigned long int scale);
279  virtual unsigned long int operator ()(void) const;
281  virtual unsigned long int operator ++(void);
282  };
283 
289  protected:
291  double n;
293  double scale;
295  double base;
296  public:
298  CutoffGeometric(unsigned long int scale, double base);
300  virtual unsigned long int operator ()(void) const;
302  virtual unsigned long int operator ++(void);
303  };
304 
310  protected:
314  unsigned long int min;
316  unsigned long int n;
318  unsigned long int step;
320  unsigned long int cur;
321  public:
323  CutoffRandom(unsigned int seed,
324  unsigned long int min, unsigned long int max,
325  unsigned long int n);
327  virtual unsigned long int operator ()(void) const;
329  virtual unsigned long int operator ++(void);
330  };
331 
337  protected:
343  unsigned long int n;
344  public:
346  CutoffAppend(Cutoff* c1, unsigned long int n, Cutoff* c2);
348  virtual unsigned long int operator ()(void) const;
350  virtual unsigned long int operator ++(void);
352  virtual ~CutoffAppend(void);
353  };
354 
360  protected:
365  public:
367  CutoffMerge(Cutoff* c1, Cutoff* c2);
369  virtual unsigned long int operator ()(void) const;
371  virtual unsigned long int operator ++(void);
373  virtual ~CutoffMerge(void);
374  };
375 
381  protected:
384  // Current cutoff
385  unsigned int cutoff;
386  // Iteration
387  unsigned long int i;
388  // Number of repetitions
389  unsigned long int n;
390  public:
392  CutoffRepeat(Cutoff* c, unsigned long int n);
394  virtual unsigned long int operator ()(void) const;
396  virtual unsigned long int operator ++(void);
398  virtual ~CutoffRepeat(void);
399  };
400 
401 }}
402 
403 #include <gecode/search/cutoff.hpp>
404 
405 namespace Gecode { namespace Search {
406 
407  class Stop;
408 
446  class Options {
447  public:
449  bool clone;
451  double threads;
453  unsigned int c_d;
455  unsigned int a_d;
457  unsigned int d_l;
459  bool share_rbs;
461  bool share_pbs;
463  unsigned int assets;
465  unsigned int slice;
467  unsigned int nogoods_limit;
475  Options(void);
478  expand(void) const;
479  };
480 
481 }}
482 
483 #include <gecode/search/options.hpp>
484 
485 namespace Gecode { namespace Search {
486 
502  public:
504 
505  Stop(void);
508  virtual bool stop(const Statistics& s, const Options& o) = 0;
510  virtual ~Stop(void);
512 
514  static Stop* node(unsigned long int l);
517  static Stop* fail(unsigned long int l);
519  static Stop* time(unsigned long int l);
521  };
522 
532  protected:
534  unsigned long int l;
535  public:
537  NodeStop(unsigned long int l);
539  unsigned long int limit(void) const;
541  void limit(unsigned long int l);
543  virtual bool stop(const Statistics& s, const Options& o);
544  };
545 
555  protected:
557  unsigned long int l;
558  public:
560  FailStop(unsigned long int l);
562  unsigned long int limit(void) const;
564  void limit(unsigned long int l);
566  virtual bool stop(const Statistics& s, const Options& o);
567  };
568 
574  protected:
578  unsigned long int l;
579  public:
581  TimeStop(unsigned long int l);
583  unsigned long int limit(void) const;
585  void limit(unsigned long int l);
587  void reset(void);
589  virtual bool stop(const Statistics& s, const Options& o);
590  };
591 
592 }}
593 
594 #include <gecode/search/stop.hpp>
595 
596 namespace Gecode { namespace Search {
597 
602  public:
604  virtual Space* next(void) = 0;
606  virtual Statistics statistics(void) const = 0;
608  virtual bool stopped(void) const = 0;
610  virtual void constrain(const Space& b);
612  virtual void reset(Space* s);
614  virtual NoGoods& nogoods(void);
616  virtual ~Engine(void);
617  };
618 
619 }}
620 
621 #include <gecode/search/engine.hpp>
622 
623 namespace Gecode { namespace Search {
624 
626  template<class T>
627  class Base : public HeapAllocated {
628  template<class, class>
629  friend Engine* build(Space*, const Options&);
630  template<class, template<class> class>
631  friend Engine* build(Space*, const Options&);
632  protected:
636  Base(Engine* e = NULL);
637  public:
639  virtual T* next(void);
641  virtual Statistics statistics(void) const;
643  virtual bool stopped(void) const;
645  virtual ~Base(void);
646  private:
648  Base(const Base&);
650  Base& operator =(const Base&);
651  };
652 
653 }}
654 
655 #include <gecode/search/base.hpp>
656 
657 namespace Gecode { namespace Search {
658 
660  template<class T, class E>
661  Engine* build(Space* s, const Options& opt);
663  template<class T, template<class> class E>
664  Engine* build(Space* s, const Options& opt);
665 
668  protected:
672  const bool b;
673  public:
675  Builder(const Options& opt, bool best);
677  Options& options(void);
679  const Options& options(void) const;
681  bool best(void) const;
683  virtual Engine* operator() (Space* s) const = 0;
685  virtual ~Builder(void);
686  };
687 
688 }}
689 
690 #include <gecode/search/build.hpp>
691 
692 namespace Gecode {
693 
696 
697 }
698 
699 #include <gecode/search/traits.hpp>
700 
701 namespace Gecode {
702 
704  class SEBs : public PrimArgArray<SEB> {
705  public:
707 
708  SEBs(void);
711  explicit SEBs(int n);
713  SEBs(const std::vector<SEB>& x);
715  template<class InputIterator>
716  SEBs(InputIterator first, InputIterator last);
718  SEBs(const PrimArgArray<SEB>& a);
721  SEBs(int n, SEB b0, ...);
723  };
724 
725 }
726 
727 #include <gecode/search/sebs.hpp>
728 
729 namespace Gecode {
730 
738  template<class T>
739  class DFS : public Search::Base<T> {
740  public:
742  DFS(T* s, const Search::Options& o=Search::Options::def);
744  static const bool best = false;
745  };
746 
748  template<class T>
749  T* dfs(T* s, const Search::Options& o=Search::Options::def);
750 
752  template<class T>
754 
755 }
756 
757 #include <gecode/search/dfs.hpp>
758 
759 namespace Gecode {
760 
772  template<class T>
773  class BAB : public Search::Base<T> {
774  public:
776  BAB(T* s, const Search::Options& o=Search::Options::def);
778  static const bool best = true;
779  };
780 
793  template<class T>
794  T* bab(T* s, const Search::Options& o=Search::Options::def);
795 
797  template<class T>
799 
800 }
801 
802 #include <gecode/search/bab.hpp>
803 
804 namespace Gecode {
805 
810  template<class T>
811  class LDS : public Search::Base<T> {
812  public:
814  LDS(T* s, const Search::Options& o=Search::Options::def);
816  static const bool best = false;
817  };
818 
823  template<class T>
824  T* lds(T* s, const Search::Options& o=Search::Options::def);
825 
827  template<class T>
829 
830 }
831 
832 #include <gecode/search/lds.hpp>
833 
834 namespace Gecode {
835 
854  template<class T, template<class> class E = DFS>
855  class RBS : public Search::Base<T> {
856  using Search::Base<T>::e;
857  public:
859  RBS(T* s, const Search::Options& o);
861  static const bool best = E<T>::best;
862  };
863 
882  template<class T, template<class> class E>
883  T* rbs(T* s, const Search::Options& o);
884 
886  template<class T, template<class> class E>
887  SEB rbs(const Search::Options& o);
888 
889 }
890 
891 #include <gecode/search/rbs.hpp>
892 
893 namespace Gecode { namespace Search { namespace Meta {
894 
896  template<class T, template<class> class E>
897  Engine* sequential(T* master, const Search::Statistics& stat, Options& opt);
898 
900  template<class T, template<class> class E>
901  Engine* sequential(T* master, SEBs& sebs,
902  const Search::Statistics& stat, Options& opt, bool best);
903 
904 #ifdef GECODE_HAS_THREADS
905 
907  template<class T, template<class> class E>
908  Engine* parallel(T* master, const Search::Statistics& stat, Options& opt);
909 
911  template<class T, template<class> class E>
912  Engine* parallel(T* master, SEBs& sebs,
913  const Search::Statistics& stat, Options& opt, bool best);
914 
915 #endif
916 
917 }}}
918 
919 namespace Gecode {
920 
938  template<class T, template<class> class E = DFS>
939  class PBS : public Search::Base<T> {
940  using Search::Base<T>::e;
941  protected:
943  void build(T* s, SEBs& sebs, const Search::Options& o);
944  public:
946  PBS(T* s, const Search::Options& o=Search::Options::def);
948  PBS(T* s, SEBs& sebs, const Search::Options& o=Search::Options::def);
950  PBS(T* s, SEB seb0, SEB seb1,
953  PBS(T* s, SEB seb0, SEB seb1, SEB seb2,
956  PBS(T* s, SEB seb0, SEB seb1, SEB seb2, SEB seb3,
959  static const bool best = E<T>::best;
960  };
961 
979  template<class T, template<class> class E>
980  T* pbs(T* s, const Search::Options& o=Search::Options::def);
981 
983  template<class T>
985 
986 }
987 
988 #include <gecode/search/pbs.hpp>
989 
990 #endif
991 
992 // STATISTICS: search-other
unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance) ...
Definition: search.hh:455
double scale
Scale factor.
Definition: search.hh:293
void build(T *s, SEBs &sebs, const Search::Options &o)
The actual build function.
Definition: pbs.hpp:254
Search engine implementation interface
Definition: search.hh:601
unsigned int nogoods_limit
Depth limit for extraction of no-goods.
Definition: search.hh:467
Limited discrepancy search engine.
Definition: search.hh:811
unsigned long int scale
Scale factor.
Definition: search.hh:245
NNF * l
Left subtree.
Definition: bool-expr.cpp:244
Search engine statistics
Definition: search.hh:140
Stop-object based on number of nodes
Definition: search.hh:531
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
RBS(T *s, const Search::Options &o)
Initialize engine for space s and options o.
Definition: rbs.hpp:87
Meta-engine performing restart-based search.
Definition: search.hh:855
Meta engine using a portfolio of search engines.
Definition: search.hh:939
#define GECODE_SEARCH_EXPORT
Definition: search.hh:63
Cutoff * c1
First cutoff generator.
Definition: search.hh:362
Argument array for primtive types.
Definition: array.hpp:640
unsigned int c_d
Create a clone after every c_d commits (commit distance)
Definition: search.hh:453
Cutoff generator appending two cutoff generators.
Definition: search.hh:336
Search engine options
Definition: search.hh:446
static const bool best
Whether engine does best solution search.
Definition: search.hh:816
static const bool best
Whether engine does best solution search.
Definition: search.hh:778
A class for building search engines.
Definition: search.hh:667
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:53
Options opt
Stored and already expanded options.
Definition: search.hh:670
unsigned long int l
Current limit in milliseconds.
Definition: search.hh:578
void stop(Support::Timer &timer, std::ostream &os)
Get time since start of timer and print user friendly time information.
Definition: script.cpp:46
unsigned long int step
Step size.
Definition: search.hh:318
Engine * build(Space *s, const Options &opt)
Build an engine of type E for a script T.
Definition: build.hpp:62
const unsigned int initial_delay
Initial delay in milliseconds for all but first worker thread.
Definition: search.hh:116
virtual T * next(void)
Return next solution (NULL, if none exists or search has been stopped)
Definition: base.hpp:50
unsigned int slice
Size of a slice in a portfolio (in number of failures)
Definition: search.hh:465
SEBs(void)
Allocate empty array.
Definition: sebs.hpp:41
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
Definition: linear.cpp:45
unsigned long int scale
Scale factor.
Definition: search.hh:266
unsigned long int fail
Number of failed nodes in search tree.
Definition: search.hh:143
unsigned long int nogood
Number of no-goods posted.
Definition: search.hh:151
Support::Timer t
Time when execution should stop.
Definition: search.hh:576
unsigned long int depth
Maximum depth of search stack.
Definition: search.hh:147
Cutoff generator for the Luby sequence.
Definition: search.hh:261
Base class for cutoff generators for restart-based meta engine.
Definition: search.hh:172
Statistics & operator+=(const Statistics &s)
Increment by statistics s.
Definition: statistics.hpp:54
unsigned long int min
Minimum cutoff value.
Definition: search.hh:314
virtual ~Base(void)
Destructor.
Definition: base.hpp:65
unsigned long int c
Constant.
Definition: search.hh:228
Computation spaces.
Definition: core.hpp:1748
unsigned int d_l
Discrepancy limit (for LDS)
Definition: search.hh:457
Options expand(void) const
Expand with real number of threads.
Definition: options.cpp:47
unsigned long int n
Random values.
Definition: search.hh:316
Statistics for execution of status
Definition: core.hpp:1698
Gecode::FloatVal c(-8, 8)
Cutoff generator merging two cutoff generators.
Definition: search.hh:359
Cutoff * cutoff
Cutoff for restart-based search.
Definition: search.hh:471
static const bool best
Whether engine does best solution search.
Definition: search.hh:744
double threads
Number of threads to use.
Definition: search.hh:451
const bool b
Whether engine to be built is a best solution search engine.
Definition: search.hh:672
Gecode::IntArgs i(4, 1, 2, 3, 4)
Cutoff generator for the random sequence.
Definition: search.hh:309
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
bool share_rbs
Whether to share AFC information between restarts.
Definition: search.hh:459
Options opt
The options.
Definition: test.cpp:101
Base-class for search engines.
Definition: search.hh:627
Depth-first branch-and-bound search engine.
Definition: search.hh:773
Engine * sequential(T *master, const Search::Statistics &stat, Options &opt)
Build a sequential engine.
Definition: pbs.hpp:99
Statistics(void)
Initialize.
Definition: statistics.hpp:49
static const Options def
Default options.
Definition: search.hh:473
const unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance) ...
Definition: search.hh:111
unsigned long int i
Definition: search.hh:387
unsigned long int n
How many number to take from the first.
Definition: search.hh:343
unsigned long int cur
Current value.
Definition: search.hh:320
Support::RandomGenerator rnd
Random number generator.
Definition: search.hh:312
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
unsigned long int i
Iteration number.
Definition: search.hh:264
double n
Current cutoff value.
Definition: search.hh:291
bool clone
Whether engines create a clone when being initialized.
Definition: search.hh:449
bool share_pbs
Whether to share AFC information among assets in a portfolio.
Definition: search.hh:461
Template for linear congruential generators.
Definition: random.hpp:50
Search::Builder * SEB
Type for a search engine builder.
Definition: search.hh:695
const unsigned int d_l
Default discrepancy limit for LDS.
Definition: search.hh:119
Cutoff * c2
Second cutoff generators.
Definition: search.hh:341
T * lds(T *s, const Search::Options &o)
Invoke limited-discrepancy search for s as root node and optionso.
Definition: lds.hpp:78
virtual Statistics statistics(void) const
Return statistics.
Definition: base.hpp:55
Cutoff * c1
First cutoff generators.
Definition: search.hh:339
Cutoff generator for linear sequence.
Definition: search.hh:242
const double threads
Number of threads to use.
Definition: search.hh:106
Base(Engine *e=NULL)
Constructor.
Definition: base.hpp:46
T * dfs(T *s, const Search::Options &o)
Invoke depth-first search engine for subclass T of space s with options o.
Definition: dfs.hpp:77
unsigned int assets
Number of assets (engines) in a portfolio.
Definition: search.hh:463
Cutoff generator for the geometric sequence.
Definition: search.hh:288
T * bab(T *s, const Search::Options &o)
Perform depth-first branch-and-bound search for subclass T of space s and options o...
Definition: bab.hpp:80
friend Engine * build(Space *, const Options &)
Build an engine of type E for a script T.
Definition: build.hpp:62
BAB(T *s, const Search::Options &o=Search::Options::def)
Initialize engine for space s and options o.
Definition: bab.hpp:75
LDS(T *s, const Search::Options &o=Search::Options::def)
Initialize engine for space s and options o.
Definition: lds.hpp:73
T * pbs(T *s, const Search::Options &o)
Run a portfolio of search engines.
Definition: pbs.hpp:322
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:71
Cutoff * c
Actual cutoff generator.
Definition: search.hh:383
Cutoff generator for constant sequence.
Definition: search.hh:225
const double base
Base for geometric restart sequence.
Definition: search.hh:122
Engine * parallel(T *master, const Search::Statistics &stat, Options &opt)
Build a parallel engine.
Definition: pbs.hpp:152
static const bool best
Whether engine does best solution search.
Definition: search.hh:959
unsigned long int n
Next number in sequence.
Definition: search.hh:247
No-goods recorded from restarts.
Definition: core.hpp:1595
unsigned long int l
Node limit.
Definition: search.hh:534
Engine * e
The actual search engine.
Definition: search.hh:634
unsigned long int l
Failure limit.
Definition: search.hh:557
Statistics operator+(const Statistics &s)
Return sum with s.
Definition: statistics.hpp:65
virtual bool stopped(void) const
Check whether engine has been stopped.
Definition: base.hpp:60
Cutoff generator that repeats a cutoff from another cutoff generator.
Definition: search.hh:380
const unsigned int c_d
Create a clone after every c_d commits (commit distance)
Definition: search.hh:109
Post propagator for SetVar x
Definition: set.hh:784
unsigned long int restart
Number of restarts.
Definition: search.hh:149
int n
Number of elements.
Definition: array.hpp:527
Passing search engine builder arguments.
Definition: search.hh:704
Stop * stop
Stop object for stopping search.
Definition: search.hh:469
Gecode toplevel namespace
unsigned long int node
Number of nodes expanded.
Definition: search.hh:145
const unsigned int nogoods_limit
Depth limit for no-good generation during search.
Definition: search.hh:127
unsigned long int n
Definition: search.hh:389
Stop-object based on time
Definition: search.hh:573
Base-class for Stop-object.
Definition: search.hh:501
Cutoff * c2
Second cutoff generator.
Definition: search.hh:364
PBS(T *s, const Search::Options &o=Search::Options::def)
Initialize with engines running copies of s with options o.
Definition: pbs.hpp:213
Base class for heap allocated objects.
Definition: heap.hpp:344
const unsigned int steal_limit
Minimal number of open nodes for stealing.
Definition: search.hh:114
T * rbs(T *s, const Search::Options &o)
Perform restart-based search.
Definition: rbs.hpp:114
const unsigned int slice
Size of a slice in a portfolio and scale factor for restarts(in number of failures) ...
Definition: search.hh:124
Depth-first search engine.
Definition: search.hh:739
Stop-object based on number of failures
Definition: search.hh:554
Options(void)
Initialize with default values.
Definition: options.hpp:41
static const bool best
Whether engine does best solution search.
Definition: search.hh:861
DFS(T *s, const Search::Options &o=Search::Options::def)
Initialize search engine for space s with options o.
Definition: dfs.hpp:72
const bool clone
Whether engines create a clone when being initialized.
Definition: search.hh:104
SEB * a
Element array.
Definition: array.hpp:531
void reset(void)
Reset.
Definition: statistics.hpp:43