136 int size(
void)
const;
149 const typename View::VarType
x(
n[i].varimp());
194 :
Advisor(home,p,c), _idx(i) {}
217 tf(tf0),
te(te0),
t(t0) {
219 for (
int i=
n.size();
i--; ) {
222 n[
i].subscribe(home,*
new (home)
Idx(home,*
this,
c,i));
225 s.
i = TraceView::slack(
n[
n.size()-1]);
226 for (
int i=
n.size()-1;
i--; )
227 s.
i += TraceView::slack(
n[
i]);
254 n.update(home, share, p.
n);
255 c.update(home, share, p.
c);
272 n[as.advisor().idx()].cancel(home,as.advisor());
275 return sizeof(*this);
297 t._prune(home,*
this,
a(home),i,td);
299 o[
i].prune(home,
n[i],d);
300 if (
n[a.
idx()].assigned())
308 s.
c = TraceView::slack(
n[
n.size()-1]);
309 for (
int i=
n.size()-1;
i--; )
310 s.
c += TraceView::slack(
n[
i]);
SlackValue p
Slack value at previous event (fixpoint or init)
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
SlackValue c
Current slack value.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (record so that propagator runs last)
Collection of slack values.
int _idx
Index information.
ExecStatus ES_SUBSUMED(Propagator &p)
const Slack & slack(void) const
Provide access to slack information.
Actor must always be disposed.
SlackValue initial(void) const
Return initial slack value.
static ExecStatus post(Home home, ViewArray< View > &x, TraceFilter tf, int te, Tracer< View > &t)
Post activity recorder propagator.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
Base-class for propagators.
Tracer< View > & t
The actual tracer.
static PropCost record(void)
For recording information (no propagation allowed)
Class to iterate over advisors of a council.
int idx(void) const
Get index of view.
int size(void) const
Return number of variables being traced.
Propagation has computed fixpoint.
Advisor with index information.
TraceTraits< View >::SlackValue SlackValue
The corresponding slack value type.
const View::VarType operator[](int i) const
Return variable being traced at position i.
struct Gecode::@554::NNF::@60::@62 a
For atomic nodes.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
TraceFilter tf
The trace filter.
Propagator for recording trace information.
ViewArray< View > n
Original views (new information)
ViewArray< TraceView > o
Duplicate views (old information)
ModEventDelta med
A set of modification events (used during propagation)
friend class TraceRecorder
bool disabled(void) const
Whether propagator is currently disabled.
TraceTraits< View >::TraceView TraceView
The corresponding duplicate view type.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Idx(Space &home, Propagator &p, Council< Idx > &c, int i)
Constructor for creation.
SlackValue previous(void) const
Return previous slack value.
void update(Space &home, bool share, SharedHandle &sh)
Updating during cloning.
virtual Propagator * copy(Space &home, bool share)
Copy propagator during cloning.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
void dispose(Space &home, Council< A > &c)
Dispose the advisor.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual void reschedule(Space &home)
Schedule function.
int te
Which events to trace.
Tracer that process trace information.
Slack s
Slack information.
Propagation has not computed fixpoint.
TraceTraits< View >::TraceDelta TraceDelta
The corresponding trace delta type.
Gecode toplevel namespace
SlackValue current(void) const
Return current slack value.
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
SlackValue i
The initial slack value.
Council< Idx > c
The advisor council.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
TraceEvent
Which events to trace.
TraceRecorder(Space &home, bool share, TraceRecorder &p)
Constructor for cloning p.