Commit 60517189 by Maxime Chéramy

fix uunifast-discard generator to handle tasksets of only 1 task

parent 8e1cd1f0
...@@ -17,10 +17,10 @@ def UUniFastDiscard(n, u, nsets): ...@@ -17,10 +17,10 @@ def UUniFastDiscard(n, u, nsets):
nextSumU = sumU * random.random() ** (1.0 / (n - i)) nextSumU = sumU * random.random() ** (1.0 / (n - i))
utilizations.append(sumU - nextSumU) utilizations.append(sumU - nextSumU)
sumU = nextSumU sumU = nextSumU
utilizations.append(nextSumU) utilizations.append(sumU)
# If no task utilization exceeds 1: # 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) sets.append(utilizations)
return sets return sets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment