I am translating an ABM model from NetLogo to Julia (i.e. Agents.jl).
The model, “particle world” is described in Paul Smaldino’s Modeling Social Behavior, where it is used to introduce basic NetLogo functionality. Agents perform correlated random walks and when they encounter another agent, they change direction. These “collision” events are tracked over time. In NetLogo collisions can be introduced as global variables, which allows us to track the cumulative number of collision events over time, regardless of which agents are involved (we do not need to track collisions at an agent level).
In my version of this model with Agents.jl, I have managed to get the desired collisions over time by adding a .collisions property to agents, which I then update at every step particle.collisions += new_collisions
. I can then get the sum of these agent-level level collision records at each time-step.
Actually writing this I now realize I am double-counting…
My question is if it is possible in Agents.jl to track global attributes, similar to NetLogo, in cases where agent-level information is unnecessary and we are only interested in general model level aggregates.