[gecode-users] Why do we need to update variables for propagators

Christian Schulte cschulte at kth.se
Wed Jul 15 19:27:40 CEST 2015


Hi,

 

The update function copies once, otherwise it redirects the pointer to the created copy.

 

This is classical idea from copying garbage collection, you could for example check Cheyney’s algorithm (Gecode uses a more specialized variant of this).

 

Best

Christian

 

--

Christian Schulte,  <http://www.gecode.org/~schulte> www.gecode.org/~schulte 

Professor of Computer Science, KTH,  <mailto:cschulte at kth.se> cschulte at kth.se 

Expert Researcher, SICS,  <mailto:cschulte at sics.se> cschulte at sics.se

 

From: zichenzu at gmail.com [mailto:zichenzu at gmail.com] On Behalf Of Zhu Zichen's cse
Sent: Wednesday, July 15, 2015 05:56 AM
To: Christian Schulte
Cc: users at gecode.org
Subject: Re: [gecode-users] Why do we need to update variables for propagators

 

Dear Christian, 

 

Thanks very much for your replying. I did some experiment on the BIBD(7,3,7) benchmark. I checked the profile after utilizing the two versions: one-for-each, GLOBAL_ONE. The calls of the update function cost 60.81 and 8.50 seconds by one-for-each and GLOBAL_ONE respectively. While the propagate function totally costs 5.73 and 7.64 seconds respectively. Even though GLOBAL_ONE is slower when doing filtering, it wins for the less calls of update function. 

 

A variable is really only a pointer to a variable implementation which is copied at most once.

You mean no matter how many update calls of a variable during a copying, it would be copied at most once? If so, why would we need to update these variables in a copy function of propagators as we have done it in the Space copy function?

 

Yours,

Zoe

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20150715/9fd66cc0/attachment.html>


More information about the users mailing list