[gecode-users] branchings methods Space* arguments

Christian Schulte cschulte at kth.se
Fri Aug 31 11:36:26 CEST 2007


Hi,

The best of all explanations: simplicity (and hence efficiency). No
datastructure in Gecode stores its home space, instead all operations that
might need a space get it passed as argument. Variables, propagators, etc,
still belong to its single home space, however they just do not store the
space information. This leads to much stricter invariants (compared to the
Mozart design to store the home space everywhere) and hence less bugs.

And the reason why pretty all operations need a space is for (that is, at
least) memory management: remember, memory is managed per space. That in
particular includes operations that modify variable domains either directly
or indirectly.

Cheers
Christian

--
Christian Schulte, www.ict.kth.se/~schulte/ 

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Filip Konvicka
Sent: Friday, August 31, 2007 10:38 AM
To: users at gecode.org
Subject: [gecode-users] branchings methods Space* arguments


Hi,

my new propagators run just fine :-) Now I wanted to do create a 
branching, and I don't understand why status(), descrption() and 
commit() take the "Space *home" parameter. I thought that a branching is 
bound to "its" space in the constructor, and that it would always 
operate on that space. I also thought that it would, in the constructor 
or in the post() function, create some views of some variables in the 
space, and operate on them instead of accessing the space directly. In 
fact, the same holds for propagators as well.

Can you explain, please?

Thanks,
Filip


_______________________________________________
Gecode users mailing list
users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users





More information about the gecode-users mailing list