[gecode-users] propagator PropCond

Christian Schulte schulte at imit.kth.se
Tue May 16 10:32:27 CEST 2006


Not really, this is more tutorial knowledge: it is in noway Gecode specific,
so a ref doc is not the right place. But be sure, the tutorial will ramble
on and on on this.

Christian

PS: I can only encourage you again to have a look at some simple examples.
In particular check the stuff in int/rel.

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Martin Mann
Sent: Monday, May 15, 2006 10:48 PM
To: users at gecode.org
Subject: Re: Re: Re: [gecode-users] propagator PropCond


> You have to return ES_SUBSUMED at the latest when all your variables 
> are assigned - otherwise the propagator will not be destroyed, 
> resulting in a space leak. You can return it earlier, when you detect 
> that your propagator doesn't have to be called again. For instance, in 
> a propagator for x<y, you can return ES_SUBSUMED once the maximum of x 
> is smaller than the minimum of y, even if neither is yet assigned.

ah ok. memory leaks are nothing i want to have..

>From propagate, you should only return ES_FAILED, ES_SUBSUMED, ES_FIX, 
>or  ES_NOFIX (and special versions of the latter two for staged 
>propagation,  which you can ignore for now). Whether to return FIX or 
>NOFIX depends on  whether you know that your propagator has reached a 
>fixpoint. If unsure,  return NOFIX. This may result in your propagator 
>being called too often  (which may be less efficient but correct). 
>Returning FIX although you're  not at a fixpoint can result in the 
>propagator being called not often  enough, and you might miss a 
>failure: dangerous!

Think thats something that should occure in the documentation of the 
Gecode::PropCond
reference. Without your help I would have gone mad with debugging...

Thanks a lot

Martin


_______________________________________________
Gecode users mailing list
users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users





More information about the gecode-users mailing list