-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerateReducedMethod.py
More file actions
32 lines (25 loc) · 1018 Bytes
/
Copy pathgenerateReducedMethod.py
File metadata and controls
32 lines (25 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
def reducedStateGenerator(List, TOTAL_NUMBER):
'''Generate all possible Share (not final set or final state for PLE)'''
''' if multiprocessing is needed must be start at here, each round must be done with one processor'''
counter = 0
if(TOTAL_NUMBER == 12):
counter +=1
print("Number {}".format(counter))
answerSets = []
if(len(List) == 1):
answerSets.append([TOTAL_NUMBER])
else:
for i in range(TOTAL_NUMBER+1):
CurrentState = [i]
allPossibleSet = reducedStateGenerator(
List[0:len(List)-1], TOTAL_NUMBER - i)
for tempSet in allPossibleSet:
answerSets.append(tempSet + CurrentState)
return answerSets
if __name__ == "__main__":
NUMBER_OF_SYMBOLS = 5
NUMBER_OF_TOTAL_TRANSMISSION = 19
NUMBER_OF_RECEIVER = 13
test = reducedStateGenerator([0 for i in range(
NUMBER_OF_SYMBOLS, NUMBER_OF_TOTAL_TRANSMISSION + 1)], NUMBER_OF_RECEIVER)
print("here")