"aks turtles[ some code ]"调用的函数,海龟是一个一个执行还是一起执行?
Do turtles execute the function called by "aks turtles[ some code ]" one by one or all together?
some code
breed[cars]
ask cars[
some code
]
"some code"是由汽车一个一个执行还是汽车一起执行代码?
我问它是因为我想知道是否需要管理多线程
座席不是一下子一个接一个地执行任务。以下文字来自 NetLogo 指南:
"ask is serial, that is, the agents run the commands inside the ask
one at a time. "
"ask-concurrent"
是代理集并发执行任务的原语,但它仅用于向后兼容:
ask-concurrent agentset [commands]
some code
breed[cars]
ask cars[
some code
]
"some code"是由汽车一个一个执行还是汽车一起执行代码?
我问它是因为我想知道是否需要管理多线程
座席不是一下子一个接一个地执行任务。以下文字来自 NetLogo 指南:
"ask is serial, that is, the agents run the commands inside the ask one at a time. "
"ask-concurrent"
是代理集并发执行任务的原语,但它仅用于向后兼容:
ask-concurrent agentset [commands]