I have two procedures for turtles but I need a random number of turtles to do one of the procedures and another number of random turtles to do the other procedure in equivalent parts.
So suppose i have a population of 40 turtles and I have the following procedures:
to move
ask turtles [
rt random-float 90 - random-float 90
fd 1
]
end
to bounce
ask turtles
[
if [pcolor] of patch-at dx 400 = white [
set heading (- heading)
]
if [pcolor] of patch-at 400 dy = white [
set heading (180 - heading)
]
]
end
What I want to do is to have 20 random turtles do the procedure "to bounce" and the other 20 random turtles do the procedure "to move". Or the 40 turtles will do any of the 2 procedures randomly but without any turtle doing the 2 processes at once.
I know this is kind of difficult but I think it can be done. Any suggestions?