我的显示器有麻烦。 我想用另一个变量计算补丁中具有一定变量的海龟总数,但还没能做到,我得到的只是错误。 这是我所拥有的:
patches-own [inovations?]
turtles-own [income]
count turtles with [income > 800] on patches with [inovations? = TRUE]
谢谢
答案 0 :(得分:1)
乌龟始终可以访问其所在补丁的变量。因此,您可以这样做:
count turtles with [income > 800 and inovations? = TRUE]
即使ask turtles [ set pcolor red ]
和count turtles with [ pxcor = max-pxcor ]
是补丁变量,您也可以执行类似pcolor
和pxcor
之类的原因。