[gecode-users] ExecStatus : what to return in case of no propagation
Christian Schulte
cschulte at kth.se
Thu Apr 4 17:23:35 CEST 2013
Hi Martin,
It doesn't matter, both works: ES_FIX means that the propagator is at
fixpoint wrt the current domain of the variables. ES_NOFIX differs only if
the propagator performs some domain changes which it does not in your case:
it means that the propagator is at fixpoint when it did not do any variable
domain modifications otherwise it is not and will be re-executed at some
point in time.
And yes, you should use advisors as they are more efficient: you save that
the propagator is actually scheduled and executed.
Cheers
Christian
--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Martin Mann
Sent: Thursday, April 04, 2013 2:11 PM
To: gecode user list
Subject: [gecode-users] ExecStatus : what to return in case of no
propagation
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/
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list