【发布时间】:2020-10-03 16:09:57
【问题描述】:
在此示例中,我尝试根据海龟自身的值创建两个定向链接品种链接。条件如下要求海龟链接到其他比我值小的海龟。
directed-link-breed [active-links active-link]
turtles-own [ Value ]
to setup
crt 100 [setxy random-xcor random-ycor set value random 500]
ask turtles [ create-active-links-to min-n-of 2 other turtles [Value < myself] ][set links to have xxxxx ]
end
当我执行以下操作时:
ask turtles [ create-active-links-to min-n-of 2 other turtles with [value < [ value ] of myself ] [set links to have xxxxx ]
我收到以下错误:
Requested 3 random agents from a set of only 2 agents.
error while turtles 8 running N-OF
called by procedure GO
called by Button 'go'
【问题讨论】:
-
错误信息是什么意思?
-
从一组仅有的 2 个代理中请求了 3 个随机代理。生菜 8 运行 N-OF 时出错,由按钮“go”调用的过程 DO 调用
标签: netlogo