saidi wrote:
Hi,
I am trying to use Finite Domain Constraint Programming in Mozart to solve
CSP instances by exploiting symmetries of the problem ( a la Puget).
I have two problems :
1- I want to add constraints dyamically to the problem and not only post
them at the beginning of the problem (as explained in section 4 of the
Finite Domain Constraint Programming tutorial);
You probably want a custom distribution. The basic distribution
(FD.distribute) work as follow:
wait for space stability
while there are some non-determined variables
select one of them
create a choice point with 2 alternatives
post a constraint corresponding to the alternative being searched
wait for stability
end
a simplified version (untested) would be:
{Space.waitStable}
for until:{AllRoot IsDet} do
X={Filter AllRoot IsKinded}.1
R={Space.choose 2} in
if R==1 then
X =: {FD.reflect.min X}
else
X \=: {FD.reflect.min X}
end
{Space.waitStable}
end
Of course you can post any constraint you want between the calls to
Space.choose
2- At each node of the search tree I want to access to each value of each
unbound variable and have the possibility to remove some values.
I looked for in the tutorial but I don't find any similar topic.
You should look at the reflection module
http://www.mozart-oz.org/documentation/system/node19.html
Thanks in advance
Réda
Yves
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users