I am trying to find if there is a turtle on patch-ahead n
whose speed - acceleration is <= 0. The code I came up with is:
if any? turtles on patch-ahead n with [speed <= (speed - acceleration)]
but this gives an error that:
patch-ahead expects a number, instead got agent set.
How do I remedy this?
n is a number variable. I want to access the turtle s speed , which is a user defined turtle-own variable, at the nth patch from the calling turtle. The command with
doesn t work here. Please suggest an alternative to access the speed of the turtle at, say, the 3rd patch from the calling turtle.