mesa_frames.AgentSet.rename#

AgentSet.rename(new_name: str, inplace: bool = True) Self[source]#

Rename this agent set. If attached to AgentSetRegistry, delegate for uniqueness enforcement.

Parameters:
  • new_name (str) – Desired new name.

  • inplace (bool, optional) – Whether to perform the rename in place. If False, a renamed copy is returned, by default True.

Returns:

The updated AgentSet (or a renamed copy when inplace=False).

Return type:

Self

Raises:

ValueError – If name conflicts occur and delegate encounters errors.