def spawn_agent(self): lifespan = (self.rando.randint(60,400))#lifespan of the agent, agent stops surfing once lifespan is reached(60,400) pagetime = (self.rando.randint(10,40))#Time spent on a page within a website, i.e youtube.com/watch...(10,40) hometime = (self.rando.randint(60,180))#Time spent on a website from the list of sites, i.e youtube.com(60,180) name = str(self.name) + " Agent " + str(len(self.all_agents)+1)#name = Overseer x: Agent y new_agent = Agent(self.clock.get_time_passed(), self.sites,(pagetime),(hometime), name, (lifespan),self.clock) print("") print("Created an agent") new_agent.print_params() print("") new_thread = surfThread(new_agent,Overseer.sim_time, self.mode, self.clock) new_thread.start()#Agent begins surfing the web self.threads.append(new_thread) self.curr_agents_surfing.append(new_agent) self.all_agents.append(new_agent)