JuliaDynamics / Agents.jl

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

Multiple, successively executed `agent_step!` functions during each step #331

Closed fbanning closed 3 years ago

fbanning commented 4 years ago

How could one add multiple agent_step! functions for each step, so that the order of execution would be agent_step_1! -> agent_step_2! -> model_step!? The idea behind this is simply to have all scheduled agents act once, then have all scheduled agents act a second time again, then let the model step happen once.

I can of course think of workarounds for this, e.g. wrapping agent_step_1! and agent_step_2! within the model_step! function and call them from there (providing some custom built list of agents). However, I'm wondering whether there's an option for this built into the API of Agents.jl?

fbanning commented 3 years ago

For documentation: Further discussion has been had in the thread corresponding to #351. The maintainers have decided that there's no need to make any changes. This issue will be closed.