I'm actively trying to reprogram the sample model of Traffic 2 lanes but with my own addition, I have added what looks like a foothpath with people at the bottom, but when I run the code it adds the 4 people required sometimes on the same patch. How do I fix this?
to make-people
create-people 4 [setup-turtles]
end
to setup-turtles ;;Turtle Procedure
set shape "person"
let y-coordinates (list -8 -7 -6 -5)
let remove-index random length y-coordinates
set ycor item remove-index y-coordinates
set y-coordinates remove-item remove-index y-coordinates
set xcor 19
end
The rest of the code is the same as the sample model in Netlogo under social science called Traffic 2 Lanes, with a breed of people he only other difference.