[gecode-users] Constraint graph available?
Grégoire Dooms
dooms at info.ucl.ac.be
Thu May 11 20:15:18 CEST 2006
Martin Mann wrote:
>
> I would like to use the structure of the constraint graph in my search
> strategy.
> The constraint graph will be binary and the whole CSP will be
> formulated with binary constraints.
This is something we (at UCLouvain) are investigating as an extention to
CP(Graph).
I am afraid this is not going to be available before a couple of months.
>
> Is it possible to get a list of all NOT entailed constraints of a
> Gecode::Space? Or an other way to access this data without managing
> and updating an additional contraint graph in the space via adjacency
> list etc?
There is no such method. The graph is there hidden in variable
implementations and propagators but it would require some non trivial
work to give it an API.
> In addition I would like to know if it's possible to insert a
> contraint X and hinder X to propagate. The propagation should be done
> by constraint Y and X only used to test if X is entailed or not. For
> example:
> 3 vars A,B,C
> 1 distinct (ABC) with ICL_DOM for full propagation
> 2 neq constraints (AB) (BC)
>
> (AB) and (BC) are included in (ABC), so they dont have to propagate.
> i want to use (AB) and (BC) to test if this variables are not equal or
> not.
You could use reified disequality constraints:
Gecode::rel (Space *home, IntVar x0, IntRelType r, IntVar x1, BoolVar
b, IntConLevel icl=ICL_DEF)
The Boolean variable b becomes 1 as soon as the constraint x0 r x1 is
entailed (use r=IRT_NQ for disequality).
My 2 cents,
--
Grégoire
More information about the gecode-users
mailing list