For an agent based modelling I'm doing with mesa & mesa-geo I need a way, to select and manipulate the agents out of the model.py
.
For example, if you take the Introductory Tutorial, each step you want a particular randomly picked percentage of all agents which have no money (self.wealth = 0) to receive one money.
Therefore you need to know from all agents the wealth, pick the ones with wealth zero, pick randomly an amount of them and set wealth = 1. But is there a way, to do this out of the model.py
?
For my understanding, you can only get a list of the agents by model.grid.agents
, but here you can't see there attributes and you can't change the attributes.