mirror of
https://github.com/status-im/das-research.git
synced 2025-02-23 11:58:14 +00:00
Merge pull request #25 from status-im/fix-visualizer
Fix visualizer to loop over all parameters
This commit is contained in:
commit
263558b5a0
@ -38,15 +38,15 @@ class Visualizer:
|
||||
bwUplink2 = int(root.find('bwUplink2').text)
|
||||
tta = int(root.find('tta').text)
|
||||
|
||||
# Loop over all possible combinations of length 4 of the parameters
|
||||
for combination in combinations(self.parameters, 4):
|
||||
# Loop over all possible combinations of of the parameters minus two
|
||||
for combination in combinations(self.parameters, len(self.parameters)-2):
|
||||
# Get the indices and values of the parameters in the combination
|
||||
indices = [self.parameters.index(element) for element in combination]
|
||||
selectedValues = [run, blockSize, failureRate, numberNodes, netDegree, chi, vpn1, vpn2, bwUplinkProd, bwUplink1, bwUplink2]
|
||||
values = [selectedValues[index] for index in indices]
|
||||
names = [self.parameters[i] for i in indices]
|
||||
keyComponents = [f"{name}_{value}" for name, value in zip(names, values)]
|
||||
key = tuple(keyComponents[:4])
|
||||
key = tuple(keyComponents[:len(self.parameters)-2])
|
||||
#Get the names of the other 2 parameters that are not included in the key
|
||||
otherParams = [self.parameters[i] for i in range(len(self.parameters)) if i not in indices]
|
||||
#Append the values of the other 2 parameters and the ttas to the lists for the key
|
||||
|
Loading…
x
Reference in New Issue
Block a user