Open lmiq opened 2 years ago
(For me it will take a while before I come back here, need to focus on some other projects for a while. but thanks a lot for the effort on this, when I'll have a look I'll let you know how to proceed)
Now that I think it may be possible to create this interface without pushing anything to Agents. I will see how far I can get.
In this repository I have added an implementation of a elastic collision simulation and compared the performance, basically of the
interacting_pairs
function, with and without the use ofCellListMap
:https://github.com/lmiq/ElasticCollisions.jl
I have implemented roughly the complete interface within the
InteractingPairs.jl
file (and module), such that the differences between the actual "Agents" code are quite minimal.It would be possible to create an "ABM" model type that abstracted completely this interface.
In this example I have implemented the
interacing_pairs(... , :nearest)
iterator, but other iterators would be easy to implement within the same framework.Let me know your thoughts.