Netlogo - 网络问题
Netlogo - problems with the network
我找不到解决这个问题的方法...我有海龟创建社交网络(我使用无向链接)。
代理有很多变量,其中"y"和"ro"。我想知道的是与 [y < 1] 的海龟相连的海龟的平均值 [ro] ...有办法吗?
在实践中...在下面的公式中
mean [ro] of turtles with [link-neighbor? turtle n]
我想要代理集 turtles with [y < 1]
而不是 turtle n
...有办法吗?
谢谢!
turtles-own [y ro]
to test
ca
crt 50 [
set y random-float 2
set ro one-of [1 2]
]
ask turtles [
create-links-with n-of 5 other turtles
]
show mean [ro] of (turtles with [has-poor-neighbor])
end
to-report has-poor-neighbor ;turtle proc
report any? link-neighbors with [y < 1]
end
我找不到解决这个问题的方法...我有海龟创建社交网络(我使用无向链接)。
代理有很多变量,其中"y"和"ro"。我想知道的是与 [y < 1] 的海龟相连的海龟的平均值 [ro] ...有办法吗?
在实践中...在下面的公式中
mean [ro] of turtles with [link-neighbor? turtle n]
我想要代理集 turtles with [y < 1]
而不是 turtle n
...有办法吗?
谢谢!
turtles-own [y ro]
to test
ca
crt 50 [
set y random-float 2
set ro one-of [1 2]
]
ask turtles [
create-links-with n-of 5 other turtles
]
show mean [ro] of (turtles with [has-poor-neighbor])
end
to-report has-poor-neighbor ;turtle proc
report any? link-neighbors with [y < 1]
end