question: public boolean removeAgent ( IMovingAgent agent ) { boolean status = agents . remove ( agent ) ; if ( agent instanceof Hive ) hives . remove ( agent ) ; if ( agent instanceof FoodSource ) foodSources . remove ( agent ) ; if ( agent instanceof Obstacle ) obstacles . remove ( agent ) ; if ( status ) { double radius = agent . getSphereRadius ( ) ; if ( radius >= maxAgentSphereRadius ) { maxAgentSphereRadius = computeMaxAgentSphereRadius ( ) ; } } return status ; }
target:  Remove an agent from the simulation. If the agent has a sphere which represents the maximum radius of all agents spheres the (possible) new maximum sphere is computed. <p> The agents are also removed from the additional lists if necessary.