[gecode-users] Reified Domain and relation propagators for Sets are too slow

Guido Tack tack at ps.uni-sb.de
Fri Jun 13 23:21:46 CEST 2008


Mauricio Toro wrote:
> I am doing extensive use of
> Gecode::rel (Space *home, IntVar x, SetRelType r, SetVar s,BoolVar b)
> and
> Gecode::dom (Space *home, SetVar x, SetRelType r, int i,BoolVar b)
>
> This makes my program run really slow. I saw the implementation and  
> this
> functions call the subset propagator. But, I don't think it is  
> necessary.
> Is there a way to to make them faster? perhaps writting a propagator  
> for
>
> Integer \in Set
> IntVar \in Set
>
> Instead of
>
> {Integer} subset of Set and {IntVar} subset of Set ?

The inferences you have to make for IntVars are quite similar to those  
for sets, so I wouldn't expect too big an overhead there.  I guess a  
dedicated propagator for int arguments might be slightly better, but I  
don't know how much difference it would make.  Note that the subset  
propagator is instantiated with a constant set view, so in fact it is  
a specialized version.  But just give it a try, the reified int \in  
SetVar propagator shouldn't be hard to do.

Guido





More information about the gecode-users mailing list