40 namespace Gecode {
namespace Search {
namespace Meta {
namespace Sequential {
89 for (
unsigned int i=
n;
i--; ) {
99 unsigned int n_exhausted = 0;
100 while (n_slaves > 0) {
101 if (
Space* s = slaves[cur].next()) {
104 for (
unsigned int i=0;
i<cur;
i++)
105 slaves[
i].constrain(*s);
106 for (
unsigned int i=cur+1;
i<n_slaves;
i++)
107 slaves[
i].constrain(*s);
111 if (slaves[cur].stopped()) {
113 cur++; n_exhausted++;
120 stat += slaves[cur].statistics();
121 slaves[cur].~Slave();
122 slaves[cur] = slaves[--n_slaves];
127 if (n_exhausted == n_slaves) {
148 for (
unsigned int i=n_slaves;
i--; )
149 s += slaves[
i].statistics();
157 throw NoBest(
"PBS::constrain");
158 for (
unsigned int i=0;
i<n_slaves;
i++)
159 slaves[
i].constrain(
b);
164 for (
unsigned int i=n_slaves;
i--; )
Search engine implementation interface
void rfree(void *p)
Free memory block starting at p.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
virtual Space * next(void)=0
Return next solution (NULL, if none exists or search has been stopped)
Heap heap
The single global heap.
virtual void constrain(const Space &b)
Constrain future solutions to be better than b (raises exception)
Exception: Best solution search is not supported
virtual Statistics statistics(void) const =0
Return statistics.
Gecode toplevel namespace
Base-class for Stop-object.
const unsigned int slice
Size of a slice in a portfolio and scale factor for restarts(in number of failures) ...
virtual bool stopped(void) const =0
Check whether engine has been stopped.