minor fixes

This commit is contained in:
Dominik Moritz Roth 2023-07-09 16:23:13 +02:00
parent fd43bbabb6
commit fa570617d7

View File

@ -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)