[gecode-users] finding number of propagators for s Space, relation to floundering

Christian Schulte cschulte at kth.se
Tue Jun 30 17:45:05 CEST 2015


Hi Kish,

You are right. A propagator in Gecode is required to become entailed (or
failed) if all of its variables are assigned. 

Cheers
Christian

--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, cschulte at kth.se
Expert Researcher, SICS, cschulte at sics.se


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Kish Shen
Sent: Tuesday, June 30, 2015 5:02 PM
To: users at gecode.org
Subject: Re: [gecode-users] finding number of propagators for s Space,
relation to floundering

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, cschulte at kth.se Expert Researcher, SICS, 
> cschulte at sics.se
>
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On 
> Behalf Of Kish Shen
> Sent: Tuesday, June 30, 2015 5:15 AM
> To: users at 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 at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>


_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list