[Gecode] design question

Christian Schulte schulte at imit.kth.se
Thu Mar 3 15:51:29 CET 2005


I am sorry but from what you say I cannot come up with any suggestion but to
use a debugger...

Cheers and sorry
Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: gecode-bounces at ps.uni-sb.de [mailto:gecode-bounces at ps.uni-sb.de] On
Behalf Of Gustavo Gutierrez
Sent: Thursday, March 03, 2005 3:19 PM
To: gecode at ps.uni-sb.de
Subject: [Gecode] design question


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


_______________________________________________
Gecode mailing list
Gecode at ps.uni-sb.de http://www.ps.uni-sb.de/mailman/listinfo/gecode





More information about the gecode-users mailing list