-
-
Notifications
You must be signed in to change notification settings - Fork 188
Description
Currently the GeoSir model has interesting scheduling behavior, where it looks like the Agents are added multiple times to a base schedulers, with all Agents first being added, and then their neighbours again:
mesa-examples/gis/geo_sir/model.py
Line 32 in 2c05149
self.schedule = mesa.time.BaseScheduler(self) |
mesa-examples/gis/geo_sir/model.py
Lines 84 to 90 in 2c05149
self.schedule.add(this_person) | |
# Add the neighbourhood agents to schedule AFTER person agents, | |
# to allow them to update their color by using BaseScheduler | |
for agent in neighbourhood_agents: | |
self.schedule.add(agent) | |
mesa-examples/gis/geo_sir/model.py
Line 107 in 2c05149
self.schedule.step() |
The schedulers are deprecated (see projectmesa/mesa#2306), so we would like to replace the BaseScheduler with AgentSet.do()
operations (as of the Migration guide).
@glicerico, if I'm correct you originally wrote this model. Could you explain exactly what's happening? And would you be interested in updating the example?