Hi Kish, Yes, that looks okay. You have to call update() on the activity object when you clone 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, February 17, 2015 7:22 AM To: users@gecode.org Subject: [gecode-users] Adding IntActivity to space Hi, I am looking at using activity (IntActivity) when the search is done outside of Gecode to ECLiPSe's Gecode interface. I have added support for IntActivity when the search is done in Gecode, i.e. using a search engine, but I had thought I can't support IntActivity outside because IntActivity is declared with a fixed set of variables, while ECLiPSe can dynamically add variables to the problem. However, the ECLiPSe interface does provide a predicate (procedure) that perform variable selection on a fixed set of variables, so I think IntActivity can be added as a selection method here -- an IntActivity can be declared for the set of variables being selected when the predicate is first called. Does this IntActiviity have to be added to my space class? The activity applies globally, and is not specific to a space, but the IntActivity is declared with space as an argument along with variables for that space. If it needs to be added to the space (with a IntActivity* in the space, set to NULL if IntActivity is not used, I assume?) How should it be copied when the space is cloned? Does this look like the right way to do it? Thanks in advance! 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