[gecode-users] Adding IntActivity to space

Kish Shen kisshen at cisco.com
Tue Feb 17 19:14:33 CET 2015


Hi Christian,

Thanks for your reply.

So I guess there is no way of avoiding putting  the IntActivity into the 
space, even though I assume the activity information is stored in
one place for all the clones of that space?

One reason I would like to store the IntActivity separate from the space 
is that with the IntActivity in the space, I can only have one per 
branch of the search tree, so if I do more than one search in the same 
branch), I can use IntActivity for only one of the searches.

Cheers,

Kish

On 17/02/2015 08:51, Christian Schulte wrote:
> 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, 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, February 17, 2015 7:22 AM
> To: users at 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 at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>




More information about the users mailing list