netlogo 运行时错误“turtles on”
运行以下代码时
是否有? (海龟补丁提前q) [ 一些命令 ]
其中 q 是数字变量,
存在运行时错误:turtles-on 期望输入是代理或代理集,但什么也没得到。
可能出了什么问题。
while running the following code
if any? (turtles-on patch-ahead q)
[
some commands
]
where q is a number variable
there is a run time error saying: turtles-on expected the input to be agent or agent set but got nothing.
what can be wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能没有
patch-ahead q
,因为海龟位于世界的边缘,面朝外面,而你的意志不会环绕。乌龟已经到了世界的尽头,面临着深渊。尝试设置世界,使其环绕 x 轴和 y 轴。
It could be that there is no
patch-ahead q
because the turtle is at the edge of world, facing towards the outside, and your would does not wrap around. The turtle has reached the end of the world and is facing the abyss.Try setting the world so that it wraps around on both the x and y axis.
有效,就像
works, as does