Netlogo Simulation does not workI'm trying to make a simulation in NetLogo, where an evacuation takes place. At the moment, all the turtles walk to the doors, but I have no idea how to continue from here on, because it just is not consistent. Can someone help me?
I already did research, but every time I try to get the turtles out of the rooms, the won't go any further. Also, when is let them face to the right of te middle corridor (gang in Dutch), and try to let them walk forward, it does not work.
we.tl/t-sN8JJyO4El
to move
let target patch-ahead 1
while [([pcolor] of target = blue) or (target =
nobody)]
[ left random 360 ]
move-to target
end
And this code do I have for the turtles on all rooms:
ask turtles-on lokaal1 [
face min-one-of patches with [pxcor < -11 and
pxcor > -15 and pycor < 4 and pycor > 2] [distance myself]
move
]
I tried the next thing to see if it works:
to move
let target patch-ahead 1
while [([pcolor] of target = blue) or (target = nobody)]
[ left random 360
set target patch-ahead 1
set color red]
move-to target
end
But it still doesn't. When is change target = nobody
to target != nobody
, it simply crashes
Everyone walks to the door, but there they all go stand on the door together and don't watch out or wait for eachother.
Also, for some reason some turtles just randomly disappear and sometimes appear again.