Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does NetLogo decide when to switch from agent to agent when running code?

0

If you ask turtles, or ask a whole breed, the turtles are scheduled for execution in ascending order by ID number. If you ask patches, the patches are scheduled for execution by row: left to right within each row, and starting with the top row. If you ask a different agentset besides the set of all turtles or patches or a breed, then the execution order will vary according to how the agentset was constructed. The execution order is chosen deterministically and reproducibly, though, and will remain the same if you ask the same agentset multiple times. In a future version of NetLogo, we plan to add an option for randomized scheduling. Once scheduled, an agent’s “turn” ends only once it performs an action that affects the state of the world, such as moving, or creating a turtle, or changing the value of a global, turtle, or patch variable. (Setting a local variable doesn’t count.) To prolong an agent’s “turn”, use the without-interruption command. (The command blocks inside some commands,

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123