Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

With SyncActivator, everything works!

  • Loading branch information...
commit 050235f889cc1f037c2f3c32fa0e1b9558a1b873 1 parent 92458a8
@rik0 authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 examples/SIR_model.py
View
5 examples/SIR_model.py
@@ -1,5 +1,6 @@
import random
import math
+from gevent import Timeout
import networkx
from traits.trait_types import Enum, Int, Float, Set
@@ -8,7 +9,7 @@
from pynetsym import Activator
from pynetsym import Agent
-from pynetsym.simulation import BaseClock
+from pynetsym.simulation import BaseClock, SyncActivator
from pynetsym.configurators import NXGraphConfigurator
from pynetsym.termination.conditions import always_true
@@ -90,7 +91,7 @@ def save_statistic(self):
super(AdvancedRecorder, self).save_statistic()
self._save_infection_times()
-class Activator(Activator):
+class Activator(SyncActivator):
infected_nodes = Set(Int)
def tick(self):
Please sign in to comment.
Something went wrong with that request. Please try again.