Kish Shen wrote:
> Is there anyway to post propagators for domain constraints for IntVar 
> (including setting it to a single value), without doing the propagation? I've 
> just noticed from the manual that most dom() constraints (as well as rel() 
> between an IntVar and an int) propagates, instead of just posting the 
> propator.

No, these constraints are always propagated immediately.

> The main reason I ask is that I do recomputation manually, by posting changes 
> to a Space ('events', such as adding constraints) without propagation until 
> all recorded events are posted, which should be more efficient than 
> performing propagation every time. I use rel() when ECLiPSe sets a variable 
> to a value, which happens frequently during search. If this propagates as the 
> manual suggest, am I correct that this can make the recomputation more 
> expensive?

It would be more expensive to delay the propagation!  When you call dom, or 
when you post any constraint that can be represented in the variable domains 
directly, the system does not even create a propagator for it, it simply 
modifies the domain. This is much cheaper than creating a propagator, waking it 
once, and then deallocating it right away.

> I noticed the reified versions of dom() do not propagate -- is this one way 
> of avoiding propagation?

When the reification BoolVar is assigned, these versions also propagate 
immediately. So you would have to call dom and then set the BoolVar to 1 
afterwards. But as I said above, I would be very surprised if this was more 
efficient.

Cheers,
        Guido

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/




_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to