0
如何在以下语句中引用邻居乌龟?检查邻居属性
if count(turtles-on patch-ahead -1) with [(target-speed) > (target-speed)] > 0
我想比较邻居龟的速度和自我的速度。
如何在以下语句中引用邻居乌龟?检查邻居属性
if count(turtles-on patch-ahead -1) with [(target-speed) > (target-speed)] > 0
我想比较邻居龟的速度和自我的速度。
,而不是count agentset > 0
,尝试,如果any? agentset
你想用[target-speed] of myself
所以,把它在一起。
if any? turtles-on patch-ahead -1 with [target-speed > [target-speed] of myself]
谢谢,那就是我一直在寻找的东西 –
退房[此答案](http://stackoverflow.com/questions/14086966/comparing-two-agent-variables)或[此答案](http://stackoverflow.com/questions/28770317/netlogo-comparison-turtle-variables) –