shuffle order of pairs within schedule

This commit is contained in:
xenofem 2020-07-09 02:42:55 -04:00
parent 60a1f8b827
commit 20fdde7f5f

View file

@ -87,6 +87,9 @@ def matchings(l):
random.shuffle(result)
for i in range(len(result)):
random.shuffle(result[i])
for j in len(result[i]):
if random.randrange(2) == 0:
result[i][j] = (result[i][j][1], result[i][j][0])
result = [matching for matching in result if all((min(match[0].id,match[1].id), max(match[0].id,match[1].id)) not in block_pairs for match in matching)]
return result