[gecode-users] ExecStatus : what to return in case of no propagation

Martin Mann mmann at informatik.uni-freiburg.de
Thu Apr 4 14:10:53 CEST 2013


Hi Gecoders,

I have written a computationally expensive binary propagator that should 
be triggered only if one of the two constrained domains is smaller a 
certain threshold.

Currently, I am enforcing this behaviour by subclassing the propagator from

Gecode::BinaryPropagator<Gecode::Int::IntView,Gecode::Int::PC_INT_DOM>

and doing the following in my propagate function

//////////////////////////////////////////////////////////////////
propagate(Gecode::Space& home, const Gecode::ModEventDelta&) {
  // check if domain size limits are exceeded
if (x0.size() > maxDomainSize && x1.size() > maxDomainSize)  {
  // domains are too large, dont propagate for now
  return Gecode::ES_FIX;
}
... normal propagation starts here
}
//////////////////////////////////////////////////////////////////

First question I have: do I have to return Gecode::ES_NOFIX or as I do 
ES_FIX in case of no propagation?
Since I dont wont the propagator not to be called again until the 
domains are shrinked, I assume this to be a virtual fix point, right?

Second question that came to me: is there a better way to get this 
domain size specific call behaviour e.g. via Advisor implementation etc?


Thanks for your help,
Martin


-- 
Dr. Martin Mann, Postdoc assistant
Bioinformatics - Inst. of Computer Science
Albert-Ludwigs-University Freiburg
Tel: ++49-761-203-8254
Fax: ++49-761-203-7462
http://www.bioinf.uni-freiburg.de/~mmann/




More information about the users mailing list