turtles

Netlogo基础知识和入门讲解

杀马特。学长 韩版系。学妹 提交于 2019-12-27 03:55:53
netlogo是一个仿真软件,大量可移动主体在二维空间中的交互作用,随着时间推进,微观个体的属性不断发生变化,系统的宏观特性也因此发生变化 主体 netlogo有三类主体:turtles 海龟;patches 瓦片;observer 观察者。 turtles:在世界中可以移动的主体。 patches:世界是二维的,划分为由patches组成的网格,每个patch占据一个矩形小块。 observer:是一个全局主体。 空间表达 对于每一个patch而言,都是由一个表示位置信息的二维坐标。并且这个坐标一定是整数。 但是对于turtle来说,这个二维坐标可以不是整数,意味着turtle不一定正好位于某一个patch的正中心。实际上对于turtle而言,Netlogo的空间是连续的。 仿真推进 仿真推进是通过不断重复执行某一个例程实现的。 模型中至少要有:初始化例程和仿真执行例程。 初始化例程实现对模型初始状态的设置,生成所需要的turtles,设置他们的状态以及其他工作。 仿真的执行通过例程go实现,在go例程中编写的所需要执行的各种指令,完成一个仿真步的工作。 到此为止,对于netlogo是否有一个整体的认识了呢? 喜欢的话关注点赞~ 来源: CSDN 作者: 忽逢桃林 链接: https://blog.csdn.net/qq_34107425/article/details

Make turtles move ONCE according to their ranked order in a list

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question is built off my previous 2. I've been working to get a rank-ordered list for my turtles, ranked by an owned factor. They're then required to move in ranked order. That part works perfectly fine, and the code can be found at: Assigning turtles a ranked number in netlogo The problem: using that code, they're moving in the correct order but instead of moving once, the program seems to be continuously re-running it for every turtle in the list so the first turtle in a world of 10 ends up moving 10 times, the second moves 9 times,

Count neighbors turtles of a specific patch and report true or false

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Hello i will try to be quick I have a room with a fire that expands , and i have two exits , all i want to do is say to agents that if a door is blocked by fire then to go to the other one. i came up with something like this but not result. to doorblock show count neighbors with [ pcolor = 77 ] ;; the patch color of the two doors end ;; to go ask smarts [ ;; smarts are the agents inside the room that need to get oout if [ doorblock > 5 ] [ set target one - of sexits ]] ;; sexits is the other door Anyone got a better idea? Thanks

define neighbor turtles using in-radius or distance

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I would like to define neighbors using in-radius or distance. My solution so far is: turtles - own [ my - neighbors num - neighbors ] to setup ca crt 100 [ move - to one - of patches with [ not any ? turtles - here ] set my - neighbors ( other turtles ) in - radius 3 set num - neighbors count my - neighbors ] end The problem with this is that most of the turtles have between 0 to 4 neighbors, but a few of them have a relatively huge number of neighbors (e.g., 34 and 65). Those turtles are located close to the center of the world.

netlogo: how to make turtles stop for a set number of ticks then continue

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to create a model where turtles walk randomly (but with a tendency for forward movement) until they land on a yellow coloured patch which represents a baited object. When a turtle lands on one of the yellow patches, I'd like it to stop on that patch and stay there for 15 ticks whilst it 'investigates' the bait. After 15 ticks have elapsed I want the turtles to continue moving as usual until they encounter another yellow patch. I've attempted to modify parts of this parked card model in the netlogo modelling commons but couldn't

netlogo之turtles的设置

匿名 (未验证) 提交于 2019-12-03 00:22:01
turtle 1.0 number number nobody ask turtle 5 [ set color red ] ;; turtle with who number 5 turns red turtle-set 4.0 value1 Reports an agentset containing all of the turtles anywhere in any of the inputs. The inputs may be individual turtles, turtle agentsets, nobody, or lists (or nested lists) containing any of the above. turtle-set self (turtle-set self turtles-on neighbors) (turtle-set turtle 0 turtle 2 turtle 9) (turtle-set frogs mice) patch-set link-set . turtles 1.0 turtles Reports the agentset consisting of all turtles. show count turtles ;; prints the number of turtles turtles-at 1.0