From fa570617d7650b0f4897f596f561ae0d133c51c8 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 9 Jul 2023 16:23:13 +0200 Subject: [PATCH] minor fixes --- slate/slate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slate/slate.py b/slate/slate.py index 01c8f2b..d1bc53c 100644 --- a/slate/slate.py +++ b/slate/slate.py @@ -128,16 +128,16 @@ class Slate(): def _calc_num_jobs(self, schedC): schedulerC = copy.deepcopy(schedC) - reps = schedulerC.consume('repetitions', 1) - agents_per_job = schedulerC.consume('agents_per_job', 1) - reps_per_agent = schedulerC.consume('reps_per_agent', 1) + reps = self.consume(schedulerC, 'repetitions', 1) + agents_per_job = self.consume(schedulerC, 'agents_per_job', 1) + reps_per_agent = self.consume(schedulerC, 'reps_per_agent', 1) reps_per_job = reps_per_agent * agents_per_job jobs_needed = math.ceil(reps / reps_per_job) return jobs_needed def _reps_for_job(self, schedC, job_id): schedulerC = copy.deepcopy(schedC) - reps = schedulerC.consume('repetitions', 1) + reps = self.consume(schedulerC, 'repetitions', 1) if job_id == None: return list(range(0, reps)) num_jobs = self._calc_num_jobs(schedulerC)