mesa_frames.Grid.move_to_empty#
- Grid.move_to_empty(agents: int | Collection[int] | Series | DataFrame | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | AbstractAgentSet | Collection[AbstractAgentSet], inplace: bool = True) Self#
Move agents to empty cells/positions in the space (cells/positions where there isn’t any single agent).
- Parameters:
agents (IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]) – The agents to move to empty cells/positions
inplace (bool, optional) – Whether to perform the operation inplace, by default True
- Return type:
Self