You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am refactoring code from mesa 1.0.0 to 2.2.4. The simulation uses batch_run and I need to run one type of agent before multiple agents of another type.
I added the following code in to the model:
from mesa.datacollection import DataCollector
from mesa.time import RandomActivationByType
super().__init__()
self.schedule = RandomActivationByType(self)
self.running = True
then I add agents using : self.schedule.add(agentx)
It seems the agents are not added to the schedule properly, some agents are skipped!
Any idea on how to solve this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am refactoring code from mesa 1.0.0 to 2.2.4. The simulation uses batch_run and I need to run one type of agent before multiple agents of another type.
I added the following code in to the model:
then I add agents using :
self.schedule.add(agentx)
It seems the agents are not added to the schedule properly, some agents are skipped!
Any idea on how to solve this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions