198 const typename View::VarType
x(
n[i].varimp());
266 tf(tf0),
te(te0),
t(t0) {
269 for (
int i=0; i<
n.size(); i++) {
271 if (!
n[i].assigned())
272 n[i].subscribe(home,*
new (home)
Idx(home,*
this,
c,i));
275 s.i = TraceView::slack(
n[0]);
276 for (
int i=1; i<
n.size(); i++)
277 s.i += TraceView::slack(
n[i]);
288 if ((
x.size() > 0) &&
322 n[as.advisor().idx()].cancel(home,as.advisor());
325 return sizeof(*this);
343 Idx& a =
static_cast<Idx&
>(_a);
347 t._prune(home,*
this,a(home),i,td);
349 o[i].prune(home,
n[i],d);
350 if (
n[a.idx()].assigned())
358 s.c = TraceView::slack(
n[0]);
359 for (
int i=1; i<
n.size(); i++)
360 s.c += TraceView::slack(
n[i]);
virtual size_t dispose(Space &home)
Delete actor and return its size.
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
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
static PropCost record(void)
For recording information (no propagation allowed)
Base-class for propagators.
bool disabled(void) const
Whether propagator is currently disabled.
ModEventDelta med
A set of modification events (used during propagation)
Propagator(Home home)
Constructor for posting.
int te
Which events to trace.
static ExecStatus post(Home home, TraceFilter tf, int te, Tracer &t)
Post propagator.
Tracer & t
The actual tracer.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int events(void) const
Which events to trace.
virtual Propagator * copy(Space &home)
Copy propagator during cloning.
const TraceFilter & filter(void) const
Return trace filter.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (record so that propagator runs last)
TraceRecorder(Space &home, TraceRecorder &p)
Constructor for cloning p.
TraceFilter tf
The trace filter.
Tracer & tracer(void) const
Return tracer.
virtual void reschedule(Space &home)
Schedule function.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Advisor with index information.
int idx(void) const
Get index of view.
Idx(Space &home, Propagator &p, Council< Idx > &c, int i)
Constructor for creation.
int _idx
Index information.
Collection of slack values.
SlackValue p
Slack value at previous event (fixpoint or init)
SlackValue initial(void) const
Return initial slack value.
friend class ViewTraceRecorder
SlackValue c
Current slack value.
SlackValue i
The initial slack value.
SlackValue current(void) const
Return current slack value.
SlackValue previous(void) const
Return previous slack value.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ViewTracer< Float::FloatView > & t
static ExecStatus post(Home home, ViewArray< View > &x, TraceFilter tf, int te, ViewTracer< View > &t)
Post recorder propagator.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (record so that propagator runs last)
virtual void reschedule(Space &home)
Schedule function.
ViewTraceRecorder(Space &home, ViewTraceRecorder &p)
Constructor for cloning p.
TraceTraits< Float::FloatView >::TraceView TraceView
ViewArray< Float::FloatView > n
const View::VarType operator[](int i) const
Return variable being traced at position i.
int size(void) const
Return number of variables being traced.
TraceTraits< Float::FloatView >::SlackValue SlackValue
const Slack & slack(void) const
Provide access to slack information.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
virtual Propagator * copy(Space &home)
Copy propagator during cloning.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
TraceTraits< Float::FloatView >::TraceDelta TraceDelta
ViewTraceRecorder(Home home, ViewArray< View > &x, TraceFilter tf, int te, ViewTracer< View > &t)
Constructor for creation.
Tracer that process view trace information.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
int ModEventDelta
Modification event deltas.
bool failed(void) const
Check whether space is failed.
@ AP_DISPOSE
Actor must always be disposed.
TraceEvent
Which events to trace.
@ TE_INIT
Trace init events.
@ TE_POST
Trace propagator posting.
@ TE_COMMIT
Trace commit operations by branchers.
@ TE_PRUNE
Trace prune events.
@ TE_PROPAGATE
Trace propagator executions.
@ TE_FIX
Trace fixpoint events.
@ TE_FAIL
Trace fail events.
@ TE_DONE
Trace done events.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
Post propagator for SetVar x