aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Maffione <[email protected]>2017-03-19 16:54:08 +0100
committerVincenzo Maffione <[email protected]>2017-03-19 16:54:08 +0100
commit8ed85669f0e189b8023acc7cc67866431c0c80f0 (patch)
treed2c941b50fefe128dc910d11ab8841942b4979ac
parenta3b5e4464c5897e30c39e0f9971d2e5d6cd04443 (diff)
downloadrumba-8ed85669f0e189b8023acc7cc67866431c0c80f0.tar.gz
rumba-8ed85669f0e189b8023acc7cc67866431c0c80f0.zip
model: call Experiment.generate() in Experiment constructor
-rw-r--r--rumba/model.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rumba/model.py b/rumba/model.py
index 1e28147..ddfc959 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -318,6 +318,9 @@ class Experiment:
self.dif_ordering = []
self.enrollments = dict()
+ # Generate missing information
+ self.generate()
+
def __repr__(self):
s = ""
for n in self.nodes:
@@ -346,9 +349,11 @@ class Experiment:
def add_node(self, node):
self.nodes.append(node)
+ self.generate()
def del_node(self, node):
self.nodes.remove(node)
+ self.generate()
# Compute registration/enrollment order for DIFs
def compute_dif_ordering(self):