JuliaDynamics / Agents.jl

Agent-based modeling framework in Julia
https://juliadynamics.github.io/Agents.jl/stable/
MIT License
731 stars 118 forks source link

Ideas on further integration with CellListMap #680

Open lmiq opened 2 years ago

lmiq commented 2 years ago

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 of CellListMap:

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.

Datseris commented 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)

lmiq commented 2 years ago

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.