@Throws(GamaRuntimeException::class) private fun saveMicroAgents(scope: IScope, agent: IMacroAgent) { innerPopulations = THashMap<String, List<SavedAgent>>() for (microPop in agent.getMicroPopulations()) { val savedAgents: MutableList<SavedAgent> = ArrayList<SavedAgent>() val it: Iterator<IAgent?> = microPop.iterator() while (it.hasNext()) { savedAgents.add(SavedAgent(scope, it.next())) } innerPopulations.put(microPop.getSpecies().getName(), savedAgents) } }
Recursively save micro-agents of an agent .