HI,
It is quite common to have shared data-structures in Gecode for data
that never changes. Read chapter 31.3 in MPG on shared objects and
handles to see how to handle such data in a structured way that works
well with Gecode.
For data that is changed while being backtrack stable, it is harder to solve.
First of all, shared data needs to handle multi-threaded access.
Perhaps some copy-on-write solution can be used for that, but it very
much depends on the particulars of your data and propagator.
Furthermore, and this is the bigger issue, if the data is only
backtrack stable for direct ancestors of the node that is backtracked
from that is not a concept that Gecode supplies a standard hook for.
What node is next expanded is known only to the search engine, and is
not known by propagators. As far as I know, there is no reasonable way
to get this information from Gecode, which means that you would have
to track it externally somehow.
Cheers,
Mikael
> --
> You received this message because you are subscribed to the Google Groups "Gecode" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
gecode+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/gecode/827bc5a2-c4ff-4336-8169-66284b5f874bn%40googlegroups.com.
--
Mikael Zayenz Lagerkvist