Hi,

You inherit from UnaryPropagator with propagation condition PC_INT_DOM: that 
means that the propagator is executed each time its variable changes! That is 
just the normal behavior of a propagator of this subclass: the propagator 
subscribes to the variable with the given propagation condition and cancels its 
subscription when it becomes subsumed.

To make use of advisors you have to _not_ subscribe so that you can control 
scheduling by an advisor. That's possible by passing the (phoney) propagation 
condition PC_INT_NONE instead: no subscriptions are created.

Cheers
Christian

--
Christian Schulte, www.it.kth.se/~cschulte/

-----Original Message-----
From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of 
Gustavo Gutierrez
Sent: Wednesday, April 01, 2009 4:57 PM
To: gecode list
Subject: [gecode-users] Advisor implementation

Hello all,

I have a very naive question about advisors and the way to implement them. I 
have a propagator which is very costly and if some condition holds then I don't 
need to execute it. I am trying to implement this by using advisors: the 
advisor detects if the condition holds and then returns ES_FIX to avoid 
propagation. After trying to implement that with not success, I end up by 
writing a propagator with an advisor that actually prevents the propagator to 
be executed. This is, a propagator that does nothing because its advisor always 
return ES_FIX.

The code is attached to this mail but I cannot get the intended behavior, 
instead, the propagator is executed at every computation space during the 
search and not only once as I expected. Obviously I am doing something wrong or 
simply is a misunderstood on what an advisor can do. Any help is very welcome.


Thanks in advance,
Gustavo


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

Reply via email to