SetReplace icon indicating copy to clipboard operation
SetReplace copied to clipboard

Multiplicity tracking

Open taliesinb opened this issue 5 years ago • 0 comments

Perhaps it is already the case, if so please close this issue, but it occurs to me that it would be a powerful optimization to track the number of identical hyperedges instead of having them separately represented in the matching engine and data structure. Among other speedups, it would mean that for rules with multiple hyperedges in the LHS, it should be straightforward to only perform one match and then compute the multiplicity of the event as the product of the multiplicities of the LHS match sets (unless these match sets overlap, I haven't thought about this).

This would be especially useful for one application I have for SetReplace, which is to use it to implement a flexible discretization of non-linear ODEs. I will describe this more in a blogpost at some point, but you can use it to generalize Lotka-Volterra in a very satisfying way (beyond even Ricatti). For this, there will be e.g. thousands of identical hyperedges, and the multiplicities in fact store almost all the useful information in the model.

taliesinb avatar Sep 21 '20 21:09 taliesinb