3 ms·
I expect your simulation simulates the movements of all mice simultaneously in time order. If so, it might be easier to directly create the overlap results fro
by Someone 13y ago
I expect your simulation simulates the movements of all mice simultaneously in time order.
If so, it might be easier to directly create the overlap results from the simulation. For example, when a mouse enters a box, check and remember what other mice are there. When that mouse leaves, check again and create the record for the stay.
If that isn't possible or feasible, check whether your database supports range types and queries. It might be worthwhile to migrate to PostgreSQL just for this (see https://wiki.postgresql.org/images/7/73/Range-types-pgopen-2012.pdf https://wiki.postgresql.org/images/7/73/Range-types-pgopen-2...)
- georgismilyanov 13y agoIt is not simultaneous. I use the Gillespie technique for stochastic simulation. I select a mouse at random to change boxes, depending on its transition rate compared to the transition rate of the system as a whole.
- Someone 13y agoAre the mice interchangeable? If so, can you simulate one, get a distribution of box occupancy from it, and compute interactions from that?
- georgismilyanov 13y agoNo. That's the point. It is a simulation of a complex system. The interactions between the mice are everything.