本文整理汇总了Python中Agent.Agent.print_params方法的典型用法代码示例。如果您正苦于以下问题:Python Agent.print_params方法的具体用法?Python Agent.print_params怎么用?Python Agent.print_params使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent.Agent
的用法示例。
在下文中一共展示了Agent.print_params方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: spawn_agent
# 需要导入模块: from Agent import Agent [as 别名]
# 或者: from Agent.Agent import print_params [as 别名]
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)