Hi mesaheads. I have a model which visually implements a genetic algorithm, with different agents being different genes. I kill them off and replace them. But the model slows down a lot as the generations proceed, which shouldn’t be the case (I think) unless the “dead” agents are hanging around in memory. I remove the agents from the schedule and I remove them from any other place, like the grid and my list of agents self.agents. Is there a way to get python/mesa to delete them from memory? Like force “garbage collection” or whatever?
Has anyone else encountered this?
I can also post code but it’s a lot of code.
Economics, Binghamton University