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

jeremie.vautard jeremie.vautard at laposte.net
Thu Mar 9 18:55:21 CET 2006


Hi Guido ! 

You are right for what I wanted. I think I will use the « fail
now » propagator idea for universally quantified variables :
using it, I even won't need to modify any variable domain
anymore, so I can use IntVar directly.

Presentely, I think about using the space only to perform
propagation. (In the quantified case, branching is quite
special and I would first prefer taking care of it totally
outside Gecode. So I won't use commit method from space.) What
I think about doing is that : 
-I have my variable domains represented somewhere outside  the
existing Gecode classes; 
	-I create a space with not yet instanciated variables, and
post my constraints as usual ; 
	-I propagate the space until fixpoint ; 
		-If failed => I return 'no'
		-else => I update existantially quantified variable domains
from the IntVar I read after propagation ;
-Outside the existing Gecode classes, I create the spaces for
the subproblems I now need to solve, and I apply them this
algorithm.

Each resolution are totally independant, as I keep a trace of
the propagation outside Gecode. (I think I will even delete
the space after having performed the propagation and get back
the new domains)

A last (stupid) question : what is the best way to immediately
fail a space into a propagator::propagate method ? (if I'm not
mistaken, I can't simply use the space::fail() method ).

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