Skip to content

cell.agents is prone to create bugs #2682

@quaquel

Description

@quaquel

In the new discrete spaces, you can easily access the agents in a given cell, via cell.agents. However, if you modify this list by, e.g., removing agents from it, you mess up everything because you are modifying which agents reside in which cell. The obvious solution is that cell.agent should return a copy of the list of agents, rather than the actual list. This removes the potential for side effects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions