mesa_frames.Grid.move_to_available#

Grid.move_to_available(agents: int | Collection[int] | Series | DataFrame | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry], inplace: bool = True) Self#

Move agents to available cells/positions in the space (cells/positions where there is at least one spot available).

Parameters:
  • agents (IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]) – The agents to move to available cells/positions

  • inplace (bool, optional) – Whether to perform the operation inplace, by default True

Return type:

Self