[gecode-users] CSPs with bulky static data
Christian Schulte
schulte at imit.kth.se
Mon Jul 31 09:53:12 CEST 2006
Dear Torsten,
Absolutely: your idea as a an instance of the common computer-science
principle "if you have a problem, just introduce one more level of
indirection". Here the level of indirection would be to make the bulky
datastructure space independent by having identifiers rather than actual
variables. The a space has a mapping of identifiers to variables (basically
acting as a closure).
Exactly the same thing I would try first and actuallt the Alice interface to
Gecode uses a similar technique (if memory serves me right, Guido knows more
here).
Christian
--
Christian Schulte, http://www.imit.kth.se/~schulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Torsten Anders
Sent: Friday, July 28, 2006 2:52 PM
To: users at gecode.org
Subject: Re: [gecode-users] CSPs with bulky static data
Dear Christian and Guido,
Thank you both very much for your incredibly quick response. This is
indeed very encouraging to hear! Here is a related question.
Currently, my bulky data structure in the CSP simply contains the
constrained variables. As the whole data is copied, the data structure
always reflects what is currently known about the variable values. In
the CSP definition, my constraint application mechanisms process the
data structure to know which constraint is applied to which set of
variables. Also my distribution (branching) strategies traverse this
data structure, exploit the current value of variables and what the
variables mean in the data structure to decide which variable to
distribute next.
How would I reproduce something similar in Gecode such that I leave the
bulky static data outside the computational space? I need (i) the data
which is outside the space, (ii) the variables inside the space, and
(iii) also some bidirectional linking between both. For instance, every
variable might be 'tagged' with a unique integer such that I can access
the variable when I have the integer and vice versa (e.g. to get the ID
for some variable, every variable is put in some simple data structure
containing the variable and the ID; to get the variable for some ID,
all variables are also stored in an array).
This linking would then allow to again traverse the data structure as
if it contains the variables, although the data structure is actually
outside and the variables are inside the space. I would perform such a
traversal to apply my constraints to the variables. Moreover, my Gecode
branching strategy would process a sequence with all the simple data
structures containing the variable and the ID (i.e. the branching
strategy has access to the present value of the variables and the data
outside the space to decide which variable to distribute next).
Does such an approach sound plausible for you?
Thank you very much indeed!
Best,
Torsten
--
Torsten Anders
Sonic Arts Research Centre Queen's University Belfast Frankstr. 49
D-50996 Köln
Tel: +49-221-3980750
http://www.torsten-anders.de
http://strasheela.sourceforge.net
_______________________________________________
Gecode users mailing list
users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list