shuffle order of pairs within schedule
This commit is contained in:
		
							parent
							
								
									60a1f8b827
								
							
						
					
					
						commit
						20fdde7f5f
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue