【问题标题】:Netlogo - problems with the networkNetlogo - 网络问题
【发布时间】:2016-07-07 13:47:17
【问题描述】:

我很难找到解决这个问题的方法...我让海龟创建了一个社交网络(我使用无向链接)。

代理有很多变量,其中“y”和“ro”。我想知道的是与 [y

在实践中......在以下公式中

mean [ro] of turtles with [link-neighbor? turtle n]

我想代替turtle n 一个代理集turtles with [y < 1]...有什么办法吗?

谢谢!

【问题讨论】:

    标签: social-networking netlogo


    【解决方案1】:
    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
    

    【讨论】:

      猜你喜欢
      • 2015-06-02
      • 1970-01-01
      • 1970-01-01
      • 2016-03-15
      • 2019-12-18
      • 2011-06-01
      • 2011-07-04
      • 2012-02-13
      相关资源
      最近更新 更多