Hi Anatole,
indeed, we're exploring new possibilities with Morpheus each time as well.
Thank you for this interesting use case of Morpheus' NeighborhoodReporter! Attached please find a model that solves your problem and its movie. Use the Property SisterReunion (0 or 1) to control downstream behavior.
Details:
Following your suggestion, each cell keeps track of its mother's
cell.id which it learns through a Trigger at CellDivision. In the movie, left panel shows
cell.id, right panel MotherId.
The NeighborhoodReporter compares "local.MotherId==MotherId" where "local." accesses the cell's own scope when collecting information from the neighborhood. The test returns a "1" when sisters are in contact, "0" otherwise. This is updated every timestep (can be adjusted in NeighborhoodReporter) and stored in the Property SisterReunion and used to color cells in the right panel of the movie.
A follow-up question may be what happens when multiple cells are in contact of which at most two may be sisters. To control the outcome, you may choose a statistical function in the mapping attribute of the NeighborhoodReporter/Output. The statistical function is then applied to all pairwise results of the NeighborhoodReporter with each neighboring cell. In the attached files, I've used the mapping attribute "maximum" to get enough red color into the movie. If you choose "minimum" and then "1-..." you could flag just those sister reunions that are happening privately. Or you choose scaling="length" and mapping="average" to average over the cell membrane fractions (as opposed to each neighbor having the same weight independent of contact length, which you get with scaling="cell", mapping="average") in contact with neighboring cells (mind the medium).
Hope that is still useful.
Best,
Lutz