Commit 63dab2a5 by Maxime Chéramy

fix integer division with Python 2 in Ripoll generator

parent 0eaf94ac
...@@ -141,7 +141,7 @@ def gen_ripoll(nsets, compute, deadline, period, target_util): ...@@ -141,7 +141,7 @@ def gen_ripoll(nsets, compute, deadline, period, target_util):
d = c + random.randint(0, deadline) d = c + random.randint(0, deadline)
p = d + random.randint(0, period) p = d + random.randint(0, period)
task_set.append((c, d, p)) task_set.append((c, d, p))
total_util += c / p total_util += float(c) / p
sets.append(task_set) sets.append(task_set)
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