[gecode-users] (no subject)
Guido Tack
tack at ps.uni-sb.de
Wed May 16 15:11:48 CEST 2007
Sébastien Mouthuy wrote:
> class SVconstrainer {
>
> //eventually some IntVar and SetVar
> SetVar S1, S2;
>
> IntVar Tmp;
>
> constrain( Space *home, SetVar S, IntVar C){
>
> // post of some propagators
> cardinality(home, S , 1 , 3);
> rel(home, S1, SRT_NEQ, S);
>
> weight(home, .., .., S, C);
>
> ...
> }
>
> SVConstrainer (Space *home, bool share, SVconstrainer& svc){
> S1.update(home, share, svc.S1);
> S2.update(home, share, svc.S2;
> Tmp.update(home, sharfe, svc.Tmp);
> }
> };
Where are S1, S2 and Tmp initialized?
I tried to reconstruct your first example (it's attached), and it
works allright here. The cardinality of the set variable is
constrained by callling a static function defined in another class.
Please have a look and let us know if this is what you were planning
to do.
Cheers,
Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mouthuy.cc
Type: application/octet-stream
Size: 777 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20070516/4f51f212/attachment.obj>
-------------- next part --------------
More information about the gecode-users
mailing list