Well, you could ask myself [ set Ac myself ]
, but this is a bit confusing. (The referent of myself
changes every time you enter an ask
block, so myself
is used twice to refer to two different agents.)
What I would suggest is to assign more explicit variable names to your agents. self
/myself
are convenient for simple code, but you don't have to use them all the way:
ask turtles [
let t1 self
ask other turtles [
let t2 self
if Smin < Sim t1 t2 [
ifelse Sim t1 t2 < Smax
[ ask t1 [ set Ac t2 ] ]
[ ] ; do something else?
]
]
]