多智能体仿真环境NetLogo介绍之导入外部数据

NetLogo Nw Extension

首先我们需要理解的是,为了使用network extension,如何告诉extension要使用哪个network。先考虑下面例子中的情形:

breed [ bankers banker ]
breed [ clients client ]

undirected-link-breed [ friendships friendship ]
directed-link-breed [ accounts account ]

基本上,我们有银行家和顾客。顾客和银行家之间通过账户联系。银行家之间也可以通过账户联系,任两个人之间都可以成为朋友。
现在,我们或许会想到将整个事情当作一个大网络。默认地,NW extension原语考虑所有的海龟和连边当作网络的一部分。
然而,我们或许只对网络中的朋友关系感兴趣。进一步地,我们只对银行家之间的朋友关系感兴趣。为了具体化这种网络,我们需要告诉extension我们对哪些海龟和连边感兴趣。
一些例子:

  • nw:set-context turtles links will give you everything: bankers and clients, friendships and accounts, as one big network.
  • nw:set-context turtles friendships will give you all the bankers and clients and friendships between any of them.
  • nw:set-context bankers friendships will give you all the bankers, and only friendships between bankers.
  • nw:set-context bankers links will give you all the bankers, and any links between them, whether these links are friendships or accounts.
  • nw:set-context clients accounts will give you all the clients, and accounts between each other, but since in our fictional example clients can only have accounts with bankers, this will be a completely disconnected network.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值