repast-simphony

Repast - eliminate/delete agents permanently


The model I have contains huge number of agents. However, I wish to partially delete/elminate some agents who have done their job during the run-time, in order to release computing memory, speed up model execution and avoid OOM.

Is context.remove() really eliminates/kills the agent(object) permanently? Is memory released after this operation? If not, what is the correct procedure?


Solution

  • Yes, that's right. Unless you have some other reference to the agent, removing it from the context will allow the memory to be garbage collected.