social-networking - NetLogo:向链接邻居询问滴答计数器值

标签 social-networking netlogo agent-based-modeling

目前,我正在研究一种基于代理的模型,以实现社交网络中成功的创新扩散。到目前为止,我还是基于代理的建模和编程方面的新手。

主要思想是在农民之间建立社会学习模型,因此代理人决定采用创新主要取决于他的个人网络,这意味着如果他人脉广泛并且他的邻居成功地使用了创新,他更有可能采用与他位于网络远程相比。

除了有关社会学习的网络相关论点之外,我还想实现一个时间维度,例如,代理的邻居成功使用创新的时间越长,代理也采用创新的可能性就越大。但这正是我目前陷入困境的地方。我的目标是实现以下论点。到目前为止,伪代码如下所示。

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/

相关文章:

java - 通过 Android 公开分享照片的在线服务?

matrix - NetLogo:为补丁分配矩阵值

netlogo - 我怎样才能加快我的最低成本路径模型的模拟速度

modeling - 基于代理的建模资源

java - 处理时间的 Anylogic 移动平均值

java - 一次将三个功能实现到不同的进化优化器中

social-networking - 社交网络用户点妓女问题的一个好的模式/解决方案?

image - 随机生成 1000 张个人资料图片

javascript - 仅当我不通过 jQuery 附加它时才执行的脚本?

distance - 海龟之间的最小距离