Hi Christian,
Thanks for your reply.
I wasn't really thinking that there was a bug, but rather if still
having propagators around after you program finishes is a good indicator
that there might be problems. For example, there may be some good
reasons why propagators may remain after they are entailed in Gecode, as
with the argmin case. I did wonder if it was worthwhile to detect the
situation I found and remove the propagator (assuming it is not wrong to
do so, which your reply suggest it is not wrong).
Do propagators always disappear when their variables all have a
singleton domain? I was trying constraints where variables still have
more than one domain value after they are entailed because in gfd I
can't get the degree of a variable that are not bound (i.e. have more
than one value in its domain).
Cheers,
Kish
On 30/06/2015 10:56, Christian Schulte wrote:
There is no guarantee that propagators detect entailment perfectly! So, no
bug.
A space has a function propagators() that returns the number of propagators
in a space.
Cheers
Christian
--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, cschu...@kth.se
Expert Researcher, SICS, cschu...@sics.se
-----Original Message-----
From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf
Of Kish Shen
Sent: Tuesday, June 30, 2015 5:15 AM
To: users@gecode.org
Subject: Re: [gecode-users] finding number of propagators for s Space,
relation to floundering
On 29/06/2015 23:51, Kish Shen wrote:
?- A :: 1 .. 20, gfd : min([100, A], M), get_constraints_number(M, D).
This shows that the variable M (and I also checked A, not shown here)
still have a propagator attached to it
Thinking about this, I think the propagator might be a constraint linking M
and A, as Gecode cannot unify the variables as ic does....
However, I was actually looking at argmin when I noticed that there was a
propagator attached when the constraint was satisfied, but I decided to look
at min instead as ic does not have argmin.
I can't show the ECLiPSe execution with argmin, as that is on a VNC window
that I can't use cut and paste on, but here is what I tried:
min_index([1,2,3,1,4], I), get_constraints_number(I, D).
I = I{[1,4]}
D = 1
so there is 1 propagator attached to I in this case, when min_index
(argmin) is entailed.
Cheers,
Kish
_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users