143 int size(
void)
const;
201 const typename View::VarType
x(
n[
i].varimp());
269 tf(tf0),
te(te0),
t(t0) {
272 for (
int i=
n.size();
i--; ) {
275 n[
i].subscribe(home,*
new (home)
Idx(home,*
this,
c,
i));
278 s.
i = TraceView::slack(
n[
n.size()-1]);
279 for (
int i=
n.size()-1;
i--; )
280 s.
i += TraceView::slack(
n[
i]);
291 if ((
x.size() > 0) &&
308 n.update(home, share,
p.n);
309 c.update(home, share,
p.c);
327 n[as.advisor().idx()].cancel(home,as.advisor());
330 return sizeof(*this);
348 Idx&
a = static_cast<Idx&>(
_a);
350 if (((te &
TE_PRUNE) != 0) && !disabled() && tf(
a(home)) ) {
352 t._prune(home,*
this,
a(home),
i,td);
354 o[
i].prune(home,
n[
i],
d);
355 if (
n[
a.idx()].assigned())
363 s.c = TraceView::slack(
n[
n.size()-1]);
364 for (
int i=
n.size()-1;
i--; )
365 s.c += TraceView::slack(
n[
i]);
SlackValue i
The initial slack value.
Advisor with index information.
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (record so that propagator runs last)
Tracer that process view trace information.
virtual void reschedule(Space &home)
Schedule function.
Collection of slack values.
Tracer & t
The actual tracer.
ViewArray< View > n
Original views (new information)
ExecStatus ES_SUBSUMED(Propagator &p)
Actor must always be disposed.
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
TraceTraits< View >::SlackValue SlackValue
The corresponding slack value type.
Base-class for propagators.
TraceFilter tf
The trace filter.
static PropCost record(void)
For recording information (no propagation allowed)
Class to iterate over advisors of a council.
Propagation has computed fixpoint.
static ExecStatus post(Home home, TraceFilter tf, int te, Tracer &t)
Post propagator.
ViewTraceRecorder(Space &home, bool share, ViewTraceRecorder &p)
Constructor for cloning p.
Trace commit operations by branchers.
TraceRecorder(Space &home, bool share, TraceRecorder &p)
Constructor for cloning p.
const TraceFilter & filter(void) const
Return trace filter.
TraceTraits< View >::TraceDelta TraceDelta
The corresponding trace delta type.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Gecode::FloatVal c(-8, 8)
virtual void reschedule(Space &home)
Schedule function.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Tracer & tracer(void) const
Return tracer.
int n
Number of negative literals for node type.
Slack s
Slack information.
int _idx
Index information.
TraceFilter tf
The trace filter.
Propagator for recording trace information.
bool failed(void) const
Check whether space is failed.
ModEventDelta med
A set of modification events (used during propagation)
static ExecStatus post(Home home, ViewArray< View > &x, TraceFilter tf, int te, ViewTracer< View > &t)
Post recorder propagator.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
TraceTraits< View >::TraceView TraceView
The corresponding duplicate view type.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
SlackValue previous(void) const
Return previous slack value.
const View::VarType operator [](int i) const
Return variable being traced at position i.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
int te
Which events to trace.
Propagator for recording view trace information.
void update(Space &home, bool share, SharedHandle &sh)
Updating during cloning.
ViewTracer< View > & t
The actual tracer.
int size(void) const
Return number of variables being traced.
SlackValue c
Current slack value.
Generic domain change information to be supplied to advisors.
int te
Which events to trace.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Idx(Space &home, Propagator &p, Council< Idx > &c, int i)
Constructor for creation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (record so that propagator runs last)
bool assigned(View x, int v)
Whether x is assigned to value v.
Post propagator for SetVar x
Trace propagator executions.
ViewArray< TraceView > o
Duplicate views (old information)
Propagation has not computed fixpoint.
SlackValue current(void) const
Return current slack value.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Gecode toplevel namespace
int idx(void) const
Get index of view.
int events(void) const
Which events to trace.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
const Slack & slack(void) const
Provide access to slack information.
SlackValue initial(void) const
Return initial slack value.
SlackValue p
Slack value at previous event (fixpoint or init)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Council< Idx > c
The advisor council.
virtual Propagator * copy(Space &home, bool share)
Copy propagator during cloning.
virtual Propagator * copy(Space &home, bool share)
Copy propagator during cloning.
TraceEvent
Which events to trace.