Hello,
I have a turtle variable in my model called realized-dispersal-distance that tallies the number of movement steps (1 step = 1 cell-length) that an individual takes before it either settles in suitable habitat or dies. To calculate the mean on this value across turtles in each time step I typed "mean [realized-dispersal-distance] of turtles" into the reporter box of the Behaviourspace tool. However, this only calculates the average number of movement steps for individuals that survive. Is there a way to calculate the number of movement steps for the individuals that die as well?
I have included my code below. Thanks in advance for your help!
if (dispersal-mode = "Active - SRW" or dispersal-mode = "Active - CRW")
[
repeat dispersal-distance
[
fd 1
set
realized-dispersal-distance realized-dispersal-distance + 1
set heading heading + wrapped-cauchy rw-p
if (pcolor = green and not any? other turtles-here with [age > 0])
[
set count-successful-settlement count-successful-settlement + 1
set age age + 1
stop
]
if pcolor = brown
[
if random-float 1 < dispersal-mortality-matrix
[
set count-dead-matrix count-dead-matrix + 1
die
]
]
]
ifelse (pcolor = green and not any? other turtles-here with [age > 0])
[
set count-successful-settlement count-successful-settlement + 1
set age age + 1
stop
]
[
set count-dead-settlement count-dead-settlement + 1
die
]
]
Jessica