Hi Matthew,

Gecode does not keep track of domain modifications on that level.  The first 
thing I'd try is whether iterating through the variables is really too 
expensive.  After all, checking whether the domain has changed is really cheap 
- just compare the domain sizes before and after (accessing them is constant 
time).

If iteration is prohibitively expensive, you have to implement a custom 
propagator that doesn't implement a constraint but simply "listens" to domain 
modifications.   It would be posted for all variables you're interested in, 
create advisors to be notified of modifications (so that it doesn't have to 
iterate), and simply record that information in an external data structure.  It 
doesn't ever have to be scheduled for propagation.  Our tutorial documentation 
should contain all the information to get you started.  Note that this approach 
also incurs an overhead, because each modification needs to be recorded 
somewhere, but that's just unavoidable.

Cheers,
Guido

On 3 Feb 2012, at 15:14, Matthew Kitching wrote:

> Hi all,
> 
> After calling "status" is it possible to get a list of all the domain values 
> pruned, or even a list of all the variables who had their domains pruned? I 
> am able to iterate through all variables and compare their domains, but this 
> is of course, not very fast.
> 
> Thanks a lot, 
> 
> Matthew
> _______________________________________________
> Gecode users mailing list
> [email protected]
> https://www.gecode.org/mailman/listinfo/gecode-users

-- 
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