44 return x.assigned() && (
x.val() == v);
85 int s0,
int t0,
int b,
int g)
88 for (
int i=0; i<
x.size(); i++)
90 x[i].subscribe(home,*
new (home)
Index(home,*
this,
c,i));
131 alpha(p.alpha), beta(p.beta), gamma(p.gamma) {
163 x[as.advisor().i].cancel(home,as.advisor());
166 return sizeof(*this);
201 if (
x[i].any(d) && !
x[i].in(
s))
Advisor(Space &home, Propagator &p, Council< A > &c)
Constructor for creation.
Class to iterate over advisors of a council.
Generic domain change information to be supplied to advisors.
Home class for posting propagators
Advisors for views (by position in array)
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
int i
The position of the view in the view array.
Single value precedence propagator.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
int s
The value s must precede t.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus updateAlpha(Space &home)
Update the alpha pointer.
virtual Propagator * copy(Space &home)
Copy propagator during cloning.
Council< Index > c
The advisor council.
virtual void reschedule(Space &home)
Schedule function.
Single(Home home, ViewArray< View > &x, int s, int t, int beta, int gamma)
Constructor for posting.
int alpha
Pointers updated during propagation.
ExecStatus updateBeta(Space &home)
Update the beta pointer.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual PropCost cost(const Space &, const ModEventDelta &) const
Cost function.
static ExecStatus post(Home home, ViewArray< View > &x, int s, int t)
Post propagator that s precedes t in x.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
NaryPropagator(Space &home, NaryPropagator &p)
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Base-class for propagators.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Value precedence propagators.
bool assigned(View x, int v)
Whether x is assigned to value v.
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
const Gecode::PropCond PC_INT_NONE
Propagation condition to be ignored (convenience)
Gecode toplevel namespace
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar x