Hi Christian,
Thanks. It would be great if activity can be supported by dynamically
added variables.
However, if the user chose to do the search in Gecode, then I guess I
can create a IntActivity for those variables just before doing the search.
I assume the activity information would be very poor at the start, since
it would not include any propagation done during the modelling phase.
It may also be possible to use activity for my (that is the interface's)
variable selection, which does the selection at the C++ level, so the
activity information need not be associated with all variables, as the
ECLiPSe user would not be able to access the activity information
themselves.
I will still need to access the activity for a variable in an
IntActivity though, and looking at the class reference for IntActivity,
I can't see a method to get this. Also, as cloning and recomputation is
done by the interface code, do I need to do anything with this
IntActivity object for cloning?
About recomputation, there might be an issue -- both activity and AFC
are based on the history of the computation, e.g. AFC is the accumulated
failure so far in the search space, and not just the current branch.
However, recomputation will recompute previous computation, and probably
should not again for AFC and activity; I assume it is OK for AFC as
recomputation does not fail, but I guess activity might be affected?
Thanks and cheers,
Kish
On 10/07/2013 09:45, Christian Schulte wrote:
Hi Kish,
No, there is no easy way to get activity for dynamically added variables.
Doable but this would be a very different implementation. In contrast to
AFC, activity lives completely outside the kernel.
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, July 09, 2013 8:49 PM
To: users@gecode.org
Subject: [gecode-users] Using IntActivity with space
Hi,
I am now looking at adding the variable activity selection to the interface
I am writing.
From reading the MPG, it looks like IntActivity has a similar API to
IntAFC, and so cannot be easily used in my code. So is there anyway to setup
and use it in a similar way to what Christian suggested for AFC previously?
That is,
1) to setup the recording of activity for all variables in the space,
including variables that are dynamically added
2) to obtain the activity of a variable outside of the search engine
3) change the decay for all variables
For 2), I could not find an equivalent function to afc() in the
Gecode::IntVar Member List page that Christian pointed to previously (which
does list the afc method).
Thanks in advance for any information!
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