From 6051718909505593468384703e4318fc8e0a02d9 Mon Sep 17 00:00:00 2001 From: Maxime Chéramy Date: Sun, 28 Oct 2018 17:47:42 +0100 Subject: [PATCH] fix uunifast-discard generator to handle tasksets of only 1 task --- simso/generator/task_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simso/generator/task_generator.py b/simso/generator/task_generator.py index 6345857..1fad270 100755 --- a/simso/generator/task_generator.py +++ b/simso/generator/task_generator.py @@ -17,10 +17,10 @@ def UUniFastDiscard(n, u, nsets): nextSumU = sumU * random.random() ** (1.0 / (n - i)) utilizations.append(sumU - nextSumU) sumU = nextSumU - utilizations.append(nextSumU) + utilizations.append(sumU) # If no task utilization exceeds 1: - if not [ut for ut in utilizations if ut > 1]: + if all(ut <= 1 for ut in utilizations): sets.append(utilizations) return sets -- libgit2 0.26.0