I’m programming a simulation using repast simphony groovy API.
There’s a method count(myTurtles) which allows me to count the number of agents (turtles) of a particular class myTurtle extends BaseTurtle.
My question is: Is there any way to filter this count so I can only get the turtles matching a particular value for a property (shape, color, size…)?
No idea about Repast Simphony (and the documentation for the groovy aspect of it seems sparse at best), but in Groovy, if you have a list of objects, you can find all the objects that have a matching property by using: