打印代理集中的元素

Raj*_*Raj 4 netlogo agentset

我想使用以下命令找到满足某些条件的补丁:

print patches with [ (closest-party = turtle 1) and (distance < 10)]
Run Code Online (Sandbox Code Playgroud)

结果如下:(agentset,7个补丁)

我如何在该代理集中找到这7个补丁

Ala*_*lan 5

如果myset是代理集,[self] of myset则将是代理列表。

let myset patches with [ (closest-party = turtle 1) and (distance < 10)] print [self] of myset
Run Code Online (Sandbox Code Playgroud)

但通常您可以使用myset。例如,

ask myset [print self]
Run Code Online (Sandbox Code Playgroud)