我想使用以下命令找到满足特定条件的补丁:
print patches with [ (closest-party = turtle 1) and (distance < 10)]
将结果作为结果:( agentset,7个补丁)
如何在该代理集中找到这7个补丁
答案 0 :(得分:5)
如果myset
是代理集,则[self] of myset
将是代理列表。
let myset patches with [ (closest-party = turtle 1) and (distance < 10)] print [self] of myset
但通常你可以使用myset
。例如,
ask myset [print self]