powered by
Get the ID of the agent.
an integer value
an external pointer returned by newAgent
Before an agent is added to a population, its id is 0. After it is added, its id is the index in the population (starting from 1).
If agent is an R6 object, then we should either use agent$id, or use getID(agent$get)
agent$id
getID(agent$get)