[eclipse-clp-users] Variables and domains

From: Afonso Henrique Sampaio <afonsohenriquesampaio_at_gmail.com>
Date: Wed, 11 Nov 2009 12:11:45 -0200
Hello!
I've a problem in wich the number of variables depends on the size of the
input. Also, the domain of those variables are unknown at the time of their
declaration. So I used the "_" to declare this variables in a list. My
problem is that I need to impose a constraint in various subsets of this
variables, so I get the subset and impose its domain and the constraint over
the subset. But could happen that I impose the domain of a variable more
than once, for example:

original set of variables
[_263, _274, _285, _308, _319, _338]

a subset of (no domain) variables
[_319, _308, _263]

after impose the domain
[_717{1 .. 4}, _735{1 .. 4}, _753{1 .. 4}]
constraint

another subset
[_338, _735{1 .. 4}, _274]

after impose the domain
[_1112{1 .. 4}, _735{1 .. 4}, _1130{1 .. 4}]
constraint

I've concluded that the variable with no domain and the associated variable
with domain is still the same although they have different ## in the "_##"
name. Is it realy the case?
As the model is working, I supose that the constraint propagator is
triggered after all the variables in the subset have their domains declared.
Again, is it the case?
Does Eclipse provide a better way to do this?

Thanks in advance.
Afonso Henrique Sampaio.
Received on Wed Nov 11 2009 - 14:12:21 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET