目前,我正在研究一个基于代理的模型,该模型关于社交网络中成功的创新传播。到目前为止,我是基于代理的建模和编程的新手。
主要思想是模拟农民之间的社会学习,因此代理人采用创新的决定主要取决于他的个人网络,这意味着如果他有良好的联系并且他的邻居成功地使用了创新,他将更有可能采用位于网络中的远程。
除了关于社会学习的网络相关争论之外,我想实现一个时间维度,例如代理的邻居成功使用创新的时间越长,代理就越有可能采用创新。但这正是我目前陷入困境的地方。我的目标是实现以下论点。到目前为止,伪代码如下所示。
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
]
非常感谢您的帮助和建议。
亲切的问候,
莫里茨