def run_model(self, network, activelayerid=0, iteration=0): self.n = network # set up scenario, applying to active layer in network if self.s is not None: self.s.pre_model(self.n, activelayerid, iteration) # modelling code here self.n.layergraphs[activelayerid], health = scm.runSimulation(self.n.layergraphs[activelayerid], 10, 999) # run any clean up operation by the scenario after the modelling is complete if self.s is not None: self.s.post_model(self.n, activelayerid, iteration) return True
def run_model(self, network, activelayerid=0, iteration=0, delete_nodes=False): self.n = network # set up scenario, applying to active layer in network # if the scenario is freeze this will apply the freeze footprint if self.s is not None: self.s.pre_model(self.n, activelayerid, iteration, delete_nodes) # modelling code here self.n.layergraphs[activelayerid], health = scm.runSimulation(self.n.layergraphs[activelayerid], 10, 999) # run any clean up operation by the scenario after the modelling is complete if self.s is not None: self.s.post_model(self.n, activelayerid, iteration) return True