#920 Fix for #919, adding exception for duplicate ids

Open Oliver Katz allofhercats
Showing 1 of 1 files from the diff.

@@ -60,6 +60,10 @@
Loading
60 60
            have a step() method.
61 61
62 62
        """
63 +
64 +
        if agent.unique_id in self._agents:
65 +
            raise Exception("Agent with unique id {0} already added to scheduler".format(repr(agent.unique_id)))
66 +
63 67
        self._agents[agent.unique_id] = agent
64 68
65 69
    def remove(self, agent: Agent) -> None:

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
mesa -0.16% 85.99%
Project Totals (20 files) 85.99%
Loading