Esempio n. 1
0
 def step(self):
     time_step0 = time.time()
     self.step_num += 1
     print ("STEP ", self.step_num)
     self.ml.form_group(ap.form_connection, self)        
     self.ml.step() 
     time_step1 = time.time() - time_step0
     self.datacollector.collect(self)
     recorder.get_agent_health(self)
     recorder.get_time(self,time_step1)
     self.ml.reassess_group(ap.reassess)
Esempio n. 2
0
    def step(self):

        time_step0 = time.time()
        self.step_num += 1
        #self.schedule.step_breed(N.NetAgent)
        #self.schedule.step_breed(R.resource)
        self.schedule.step()
        #print (recorder.survivors(self))
        time_step1 = time.time() - time_step0
        self.datacollector.collect(self)
        #recorder.get_agent_health(self)
        recorder.get_time(self, time_step1)
Esempio n. 3
0
 def step(self):
     
     time_step0 = time.time()
     self.step_num += 1
     #print ("STEP ", self.step_num)
     self.ml.net_group()
     #print (len(self.ml.groups), len(self.ml.schedule), len(self.ml.agents_by_type[N.NetAgent]))
     self.ml.step()
     time_step1 = time.time() - time_step0
     self.datacollector.collect(self)
     recorder.get_agent_health(self)
     recorder.get_time(self,time_step1)
     self.ml.reassess_net_group()
Esempio n. 4
0
 def step(self):
     
     time_step0 = time.time()
     self.step_num += 1
     print ("STEP ", self.step_num)
     self.ml.net_group(link_type = "trades", link_value = 10, policy = organization.rules)
     #self.ml.net_schedule(link_type = "trades", policy = organization.rules, group_net = True)
     #print (len(self.ml.groups), len(self.ml.schedule), len(self.ml.agents_by_type[N.NetAgent]))
     # can either just not put in the by type or can put in and skip it
     self.ml.step()
     time_step1 = time.time() - time_step0
     self.datacollector.collect(self)
     recorder.get_agent_health(self)
     recorder.get_time(self,time_step1)
     recorder.get_meta_details(self)
Esempio n. 5
0
 def step(self):
     time_step0 = time.time()
     self.step_num += 1
     '''
     print ("STEP ", self.step_num)
     count = 0
     for v in self.ml.schedule.values():
         if type(v) != R.resource:
             count += 1
     print (count, len(self.ml.schedule), len(self.ml.agents_by_type[N.NetAgent]))
     '''
     self.ml.form_group(ap.form_connection_group,
                        self)  #, policy = organization.rules)
     self.ml.step()
     time_step1 = time.time() - time_step0
     self.datacollector.collect(self)
     recorder.get_agent_health(self)
     recorder.get_time(self, time_step1)
     recorder.get_meta_details(self)