Closed MHX792 closed 8 years ago
Hi there, glad to know you're using the extension!
If you want the turtles to execute in random order, you need to call "time:schedule-event-shuffled" just once and pass the entire agent set as the first argument. The way you are currently using this command appears that you are calling it several times on individual turtles. So in the example code provided with the extension, I demonstrate like this:
create-turtles 5
time:schedule-event-shuffled turtles task go-forward 1
If you don't want all of the turtles, you can use "with" to do a subset, something like this:
create-turtles 5
time:schedule-event-shuffled turtles with [who < 3] task go-forward 1
Good luck!
Thanks, but this unfortunately doesn't solve my problem. At the time of creating the turtles I don't know yet which tasks should be executed by which turtle. After every tick
there will be turtles added to the time:schedule-list
and I want them to be executed in a random order. My suggestions: everytime time:schedule-event-shuffled
is used on a turtle or turtleset the time:schedule-list
should be extended and randomized.
Hello! First of all: Thank you for this great extension!
I am scheduling a task for several turtles to be executed at the same tick like so:
time:schedule-event-shuffled turtle turtle-id task task-name ticks + 1
Unfortunately the tasks get executed in the order they have been added to the schedule and not in a shuffled order as intended.Any solutions for this?