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-differences-turtle-variables) –