minor fixes
This commit is contained in:
parent
fd43bbabb6
commit
fa570617d7
@ -128,16 +128,16 @@ class Slate():
|
|||||||
|
|
||||||
def _calc_num_jobs(self, schedC):
|
def _calc_num_jobs(self, schedC):
|
||||||
schedulerC = copy.deepcopy(schedC)
|
schedulerC = copy.deepcopy(schedC)
|
||||||
reps = schedulerC.consume('repetitions', 1)
|
reps = self.consume(schedulerC, 'repetitions', 1)
|
||||||
agents_per_job = schedulerC.consume('agents_per_job', 1)
|
agents_per_job = self.consume(schedulerC, 'agents_per_job', 1)
|
||||||
reps_per_agent = schedulerC.consume('reps_per_agent', 1)
|
reps_per_agent = self.consume(schedulerC, 'reps_per_agent', 1)
|
||||||
reps_per_job = reps_per_agent * agents_per_job
|
reps_per_job = reps_per_agent * agents_per_job
|
||||||
jobs_needed = math.ceil(reps / reps_per_job)
|
jobs_needed = math.ceil(reps / reps_per_job)
|
||||||
return jobs_needed
|
return jobs_needed
|
||||||
|
|
||||||
def _reps_for_job(self, schedC, job_id):
|
def _reps_for_job(self, schedC, job_id):
|
||||||
schedulerC = copy.deepcopy(schedC)
|
schedulerC = copy.deepcopy(schedC)
|
||||||
reps = schedulerC.consume('repetitions', 1)
|
reps = self.consume(schedulerC, 'repetitions', 1)
|
||||||
if job_id == None:
|
if job_id == None:
|
||||||
return list(range(0, reps))
|
return list(range(0, reps))
|
||||||
num_jobs = self._calc_num_jobs(schedulerC)
|
num_jobs = self._calc_num_jobs(schedulerC)
|
||||||
|
Loading…
Reference in New Issue
Block a user