def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, state, initialiser)
     self.threshold = self.globalSharedParameters['threshold']
     self.currentSupernodeID = -1
     self.connected = False
     #note the "eval(" - parameter has to be a string of executable Python code
     self.restartTime = eval(self.globalSharedParameters['restart_time'])
     self.knownSupernodes = []
     self.knownSupernodesDistribute = []
     self.supers = []
     self.connections = 0
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, state, initialiser)
     self.threshold = self.globalSharedParameters['threshold']
     self.currentSupernodeID = -1
     self.connected = False
     #note the "eval(" - parameter has to be a string of executable Python code        
     self.restartTime = eval(self.globalSharedParameters['restart_time'])        
     self.knownSupernodes = []
     self.knownSupernodesDistribute = []
     self.supers = []        
     self.connections = 0
Example #3
0
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, 0, initialiser)
Example #4
0
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, state, initialiser)
     self.infection_probability = 0.1 # 5% chance
     self.infection_end = 10
Example #5
0
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, state, initialiser)
     self.infection_probability = 0.05 # 5% chance
     self.infection_end = 5
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, state, initialiser)
     self.infection_probability = self.globalSharedParameters['infection_rate']
     self.infection_end = eval(self.globalSharedParameters['inf_dur'])
Example #7
0
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, state, initialiser)
     self.infection_probability = self.globalSharedParameters[
         'infection_rate']
     self.infection_end = eval(self.globalSharedParameters['inf_dur'])
 def __init__(self, state, initialiser):
     NetworkAgent.__init__(self, 0, initialiser)