[gecode-users] Extending integer and set variables to quantified variables.

jeremie.vautard jeremie.vautard at laposte.net
Thu Mar 9 14:29:30 CET 2006


Hi all ! 

I am trying to extend Gecode in order to make it solve
quantified constraints. I would like to stop propagation and
directly fail if a universally quantified variable is reduced.
I began to have a look at the IntVar and SetVar classes to see
how to extend them to add a quantifier information (ForAll our
Exists), and have them raise an exception if the domain is
reduced and the quantifier is ForAll.
I've been surprised to see that the IntVar class has only
methods to read information on the variable domain, and that
the only way to reduce it is : first to access it, using the
method Variable(), to the IntVarImp object the IntVar
contains, and only then to invoke the modifying methods to the
IntVarImp itself (am I right on this point ?).  As the methods
of the IntVar class to read informations on the variable
domain is only en encapsulation of the same IntVarDomain
methods, why are the modifying methods not encapsulated in the
IntVar class too ? 
Another thing. I don't know if that would be useful for
anything else than my issue, but would it be possible to
declare the value access methode of the IntVar as virtual ? 

All this would allow me to only extend gecode with my own
classes, without having to add a single line in the original
source code...

Best regards, 

Jeremie

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)







More information about the gecode-users mailing list