projectmesa / mesa-frames

Extension of mesa for performance and scalability
https://projectmesa.github.io/mesa-frames
Apache License 2.0
13 stars 4 forks source link

Emulate RandomActivation with `DataFrame.rolling` #48

Open EwoutH opened 1 month ago

EwoutH commented 1 month ago

If you shuffle the Agents DataFrame, and then apply a rolling operation, you kind-of can emulate RandomActivation scheduling. The environment wouldn't be updated, but the other Agents will be.

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.rolling.html