Netlogo执行的顺序是什么? [英] What is the sequence of Netlogo execution?

查看:108
本文介绍了Netlogo执行的顺序是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问我这个正确吗?

如果我写:

ask turtles
[go_forward
go_backward]

随机乌龟向前移动然后向后移动,然后第二只随机乌龟也这样做是正确的,依此类推吗?相对于:

is it correct that a random turtle will move forward then move backward, and then a second random turtle will do the same, and so on? As opposed to:

ask turtles [go_forward]
ask turtles [go_backward]

这将使所有海龟以随机的顺序前进,然后使所有海龟以(不同的)随机顺序后退.

which will get all turtles in a random order to move forward, and then all turtles in a (different) random order to move backward.

推荐答案

那是正确的. 《 NetLogo编程指南》中ask部分的结尾处有一个非常相似的示例:

That is correct. There's a very similar example right at the end of the section on ask in the NetLogo Programming Guide: http://ccl.northwestern.edu/netlogo/docs/programming.html#ask

另请参阅NetLogo模型库的代码示例"部分中的询问订购示例".

See also Ask Ordering Example, in the Code Examples section of NetLogo's Models Library.

这篇关于Netlogo执行的顺序是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆