After some head scratching I found out what the problem is: when you call INT_VAR_AFC_* and do not give it an argument, it will reset the afc-decay to 1.0 (so that means no decay). When you call afc_decay(d) after INT_VAR_AFC_*, the d is used!
Cheers Christian -- Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/ -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Kish Shen Sent: Tuesday, May 13, 2014 12:01 AM To: users@gecode.org Subject: Re: [gecode-users] AFC decay with global AFC in search engines On 12/05/2014 22:39, Kish Shen wrote: > For activity, I set select to INT_VAR_ACTIVITY_MAX(act) before the > call to branch() (as I was doing for afc), and this seems to work. I guess this might not be very clear: what I do for activity is: IntActivity act(*solver, vars, actdecay); .... select = INT_VAR_ACTIVITY_MAX(act); .... branch(*solver vars, select, choice); where actdecay is the activity decay, and by working I mean that changing the value of actdecay does seem to affect the search. The difference with AFC is that I can use AFC outside of the search engines (i.e. if the search is done in ECLiPSe), because there is a "global" AFC associated with the space, which is what I use. For activity, I can only use it with a Gecode search engine, by declaring an IntActivity act for the variables involved in the search (vars). 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