目前,我正在研究一种基于代理的社会网络成功创新扩散模型。到目前为止,我在基于agent的建模和编程方面还是新手。
其主要思想是模拟农民之间的社会学习,因此,代理人采取创新的决定主要取决于他的个人网络,这意味着如果他有良好的人脉,他的邻居正在成功地利用创新,他将更有可能采取比他在网络中的远程定位。
除了网络相关的关于社会学习的争论外,我想要实现一个时间维度,例如,代理的邻居成功地使用创新的时间越长,agent也就越有可能采用该创新。但这正是我现在被困住的地方。我的目标是实现以下参数。到目前为止,伪代码如下所示。
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
]
非常感谢你的帮助和建议。
致以亲切的问候,
莫里茨
发布于 2015-11-23 13:38:56
要得到时间之和,邻居已经采用了创新,你只需要一行,因为网络标志是惊人的。
set time-neighbors-adopted sum [time-adopted] of link-neighbors with [adopted?]
就像这样
https://stackoverflow.com/questions/33869400
复制相似问题