From 54d7e28c4e81888af6845d10f3388fa8244289ff Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Tue, 12 Nov 2024 21:18:22 +0100 Subject: [PATCH] Cleanup two occurances of removed scheduler (#2499) Follow-up on the removal of the schedulers, removes a mention in the Model docstring and one check in the DataCollector --- mesa/datacollection.py | 7 +------ mesa/model.py | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/mesa/datacollection.py b/mesa/datacollection.py index 2fb4d241c4b..309d56d8e27 100644 --- a/mesa/datacollection.py +++ b/mesa/datacollection.py @@ -228,12 +228,7 @@ def get_reports(agent): reports = tuple(rep(agent) for rep in rep_funcs) return _prefix + reports - agent_records = map( - get_reports, - model.schedule.agents - if hasattr(model, "schedule") and model.schedule is not None - else model.agents, - ) + agent_records = map(get_reports, model.agents) return agent_records def _record_agenttype(self, model, agent_type): diff --git a/mesa/model.py b/mesa/model.py index f89be92e7f6..5e5efc2ad74 100644 --- a/mesa/model.py +++ b/mesa/model.py @@ -32,7 +32,6 @@ class Model: Attributes: running: A boolean indicating if the model should continue running. - schedule: An object to manage the order and execution of agent steps. steps: the number of times `model.step()` has been called. random: a seeded python.random number generator. rng : a seeded numpy.random.Generator