[gecode-users] Implementing multiple GECODE models in a single Space

Christian Schulte cschulte at kth.se
Fri Nov 18 13:48:01 CET 2011


Hi,

 

That's not possible: a variable always belongs to a space (the space in
which you created it) and you can use variables for propagation only with
constraints posted in the space the variables belong to.

 

What you could do is to store the variable domains outside of any space (as
in an array of integer sets IntSet) and then propagate the information into
the spaces you want to use (for example by the dom constraint).

 

Christian

 

--

Christian Schulte, www.ict.kth.se/~cschulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Md Solimul Chowdhury
Sent: Friday, November 18, 2011 10:12 AM
To: users at gecode.org
Subject: [gecode-users] Implementing multiple GECODE models in a single
Space

 

Hi,

 

Good day. Currently I am engaged in a research project which involves
integrating global constraints into SAT solving. I have built a prototype
system for the integration framework and have used GECODE as the constraint
solving engine. 

 

In my prototype system, global constraints are part of the SAT formula (in
which a global constraint is represented as a Boolean variable) and the
GECODE is invoked whenever a global constraint is implied to be true by the
SAT solver.

 

Now I am stuck with a problem of GECODE. 

 

 

In GECODE, is there any way to share a Space between multiple related GECODE
models? I want to come up with a GECODE program which will contain multiple
GECODE models (each will contain a CSP), but all these models will be
implemented in the same space.

 

For example, for the magic square problem of order 3, there are 

3 'linear' global constraints for the rows, 

3 for the columns, and 

2 for the 2 diagonals (total 8 'linear' global constraints)

 

Instead of posting all the required 'linear' global constraints in a single
GECODE model (i.e one that is given in the Gecode\Example directory), I want
to post each of the 'linear' global constraints in 8 separate GECODE model. 

But, as these 'linear' global constraints are related, I want to post them
on the same CSP variable (i.e. on a global IntVarArray), to enable the
propagators for all the related 'linear' global constraints upon a View
change. 

In essence, I want to come up with a program which will contain 8 GECODE
models, which individually models  each of these 'linear' global
constraints, but each of the models will share the same Space.

 

 

Thanks in advance.

 

Sincerely,

Md Solimul Chowdhury

Department of Computing Science,

University of Alberta, Alberta, Canada.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20111118/93d66a90/attachment.htm>


More information about the users mailing list