JuliaDynamics / Agents.jl

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

Deprecate nearby_ids_exact in favour of nearby_ids with a search keyword #1044

Closed Tortar closed 4 weeks ago

Tortar commented 1 month ago

This makes the API cleaner

Tortar commented 1 month ago

This fixes also #1043

Tortar commented 1 month ago

Actually there is still something to take care because sometimes we pass nearby_ids_exact to some other functions

Tortar commented 1 month ago

If tests pass, it should be okay now

Datseris commented 4 weeks ago

I wonder if we can increase the performance of the nearest_neighbor function... We go thourhg all agents in the list.

On the other hand, we do near searches fundamentally differently from e.g., a tree structure, so it's not like we would ever have nearby agents sorted by distance. Anyways, merging and tagging.

Tortar commented 4 weeks ago

I think it can be quite improved by the user, because decreasing the radius implies searching less neighbors, but it is model dependent, one can try little radius before big ones