Exemplo n.º 1
0
 def test_swir_model(self):
     for g in get_graph(True):
         model = epd.SWIRModel(g)
         config = mc.Configuration()
         config.add_model_parameter('kappa', 0.5)
         config.add_model_parameter('mu', 0.2)
         config.add_model_parameter('nu', 0.05)
         config.add_model_parameter("fraction_infected", 0.1)
         model.set_initial_status(config)
         iterations = model.iteration_bunch(10)
         self.assertEqual(len(iterations), 10)
Exemplo n.º 2
0
 def test_swir_model(self):
     g = nx.erdos_renyi_graph(1000, 0.1)
     model = epd.SWIRModel(g)
     config = mc.Configuration()
     config.add_model_parameter('kappa', 0.5)
     config.add_model_parameter('mu', 0.2)
     config.add_model_parameter('nu', 0.05)
     config.add_model_parameter("percentage_infected", 0.1)
     model.set_initial_status(config)
     iterations = model.iteration_bunch(10)
     self.assertEqual(len(iterations), 10)