[Gecode] design question

Gustavo Gutierrez ggutierrez at atlas.puj.edu.co
Thu Mar 3 15:18:57 CET 2005


Hi all,

I am trying to write a propagator implementing 3b-consistency.
3b-consistency uses bound consistency to performs propagation (prune
non-bound-consistent parts of variable's domain). I already have an
implementation of bound consistency called hc4, so, in the source code
there is the class hc4 which inherits from NaryPropagator. 

The idea is that the class implementing 3b-consistency can be
parametrized (template) with any of the bound consistency
implementations, an example of the class could be:

template <class Var, class Bc>
class k3b : public NaryPropagator {
...
};

Propagation have to test for bound consistent parts of each variable's domain, in the case that any part to be non-bound-consistent, it can be pruned, otherwise it have to remains the same. 

This is what i am confused about. What i tried was to clone the variable
array, change the domain of the selected var by the guessed domain in
the cloned array, create an instance of the bound consistent propagator
and call directly the propagate method, and prune or not depending on
the returned value (ES_FAILED = prune, ES_FIX= not prune). 

The problem is that when i try to run an example a segmentation fault
error occurs. I think this way is not the right one to do that, so
please help me with some hints.

All the best,

Gustavo Gutierrez





More information about the gecode-users mailing list