mesa_frames.AgentSetRegistry.sort#

AgentSetRegistry.sort(by: str | Sequence[str], ascending: bool | Sequence[bool] = True, inplace: bool = True, **kwargs: Any) Self[source]#

Sort the AgentSets in the registry based on the given criteria.

Parameters:
  • by (str | Sequence[str]) – The attribute(s) to sort by.

  • ascending (bool | Sequence[bool]) – Whether to sort in ascending order.

  • inplace (bool) – Whether to sort the agents in place.

  • **kwargs – Keyword arguments to pass to the sort

Returns:

A new or updated AbstractAgentSetRegistry.

Return type:

Self