Description
For code clairity and cleanup, we should change the Space interface functions (those a user has to extend to define a new space), to use the space instance directly.
So, add_agent_to_space!(a::AbstractAgent, model::GridSpaceSingle)
instead of add_agent_to_space!(a::AbstractAgent, model::ABM{<:GridSpaceSingle})
. This should be done for all four Space Interface functions that are discussed int he developer docs https://juliadynamics.github.io/Agents.jl/stable/devdocs/#make_new_space . Then, functions such as move_agent!
will use the abmspace
function to directly pass the space to the interface functions.
This issue has no bearing on the codebase, and doesn't implement any new features, but it is a nice thing to do for clarity. It establishes clearly the orthogonality between choosing a space and choosing a model type (i.e., a time evolution rule).
I am not sure why we didn't do it in the first place.... This is a nice good first issue for someone wanting to have a good overview of the Agents.jl codebase! Very good for preparing someone to do nice contributions, such as a GSOC project!