目前,我正在研究一种基于代理的模型,以实现社交网络中成功的创新扩散。到目前为止,我还是基于代理的建模和编程方面的新手。
主要思想是在农民之间建立社会学习模型,因此代理人决定采用创新主要取决于他的个人网络,这意味着如果他人脉广泛并且他的邻居成功地使用了创新,他更有可能采用与他位于网络远程相比。
除了有关社会学习的网络相关论点之外,我还想实现一个时间维度,例如,代理的邻居成功使用创新的时间越长,代理也采用创新的可能性就越大。但这正是我目前陷入困境的地方。我的目标是实现以下论点。到目前为止,伪代码如下所示。
1)海龟自己的蜱虫计数器 ...
ask turtles
[
ifelse [adopted? = true]
[set ime-adopted time-adopted + 1] [set time-adopted 0]
]
...
2) 在第二个过程中,每个代理应该检查他的邻居使用此创新的时间(就“检查邻居的采用时间”而言)。
ask turtles with [not adopted?]
[
[ask link-neigbhors with [adopted?]
[...*(Here I dont know how to ask for the time adopted value)*]
;the agent will then sum up all values he got from his neighbors from "time-adopted"
set time-neighbors-adopted [sum all "time-adopted" values of neighbors]
]
;The agent will then implement these values into his personal utility
;function which determines if he adopts the innovation or not
set utility utiltiy + 0.3 * time-neighbors-adopted
]
非常感谢您的帮助和建议。
亲切的问候,
莫里茨
最佳答案
要了解邻居采用这项创新的总时间,您只需要一根线,因为 Netlogo 太棒了。
set time-neighbors-adopted sum [time-adopted] of link-neighbors with [adopted?]
就这样
关于social-networking - NetLogo:向链接邻居询问滴答计数器值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33869400/