admin 管理员组文章数量: 1086019
I'm building a NetLogo model to study dolphin-boat collisions.
Description of the NetLogo setup:
Agents:
1. Patch represents 2m in real world
2. Dolphins (~2m in real world) so, size = 1 (1 patch)
3. Boats:
a. Small: size = 2.5,
b. Medium: size = 6
c. Large: size = 14
I want an encounter to be triggered when the distance between a boat and a dolphin is:
Small boat & dolphin: ≤ 1 patch (~2m)
Medium boat & dolphin: ≤ 2 patches (~4m)
Large boat & dolphin: ≤ 4 patches (~8m)
I am planning to use the ‘in-radius’ command to do this.
My question:
a. How does ‘in-radius’ detect the distance between a boat and a dolphin, given that boats can have sizes that extend over multiple patches? Does ‘in-radius’ detect the distance from the centre of each turtle to the centre of the other?
b. I read in another thread (here) that the ‘size’ variable only affects the visual representation of a turtle, but that NetLogo internally treats turtles as zero-sized points for computations (e.g., distance, in-radius). Is that correct?
I'm building a NetLogo model to study dolphin-boat collisions.
Description of the NetLogo setup:
Agents:
1. Patch represents 2m in real world
2. Dolphins (~2m in real world) so, size = 1 (1 patch)
3. Boats:
a. Small: size = 2.5,
b. Medium: size = 6
c. Large: size = 14
I want an encounter to be triggered when the distance between a boat and a dolphin is:
Small boat & dolphin: ≤ 1 patch (~2m)
Medium boat & dolphin: ≤ 2 patches (~4m)
Large boat & dolphin: ≤ 4 patches (~8m)
I am planning to use the ‘in-radius’ command to do this.
My question:
a. How does ‘in-radius’ detect the distance between a boat and a dolphin, given that boats can have sizes that extend over multiple patches? Does ‘in-radius’ detect the distance from the centre of each turtle to the centre of the other?
b. I read in another thread (here) that the ‘size’ variable only affects the visual representation of a turtle, but that NetLogo internally treats turtles as zero-sized points for computations (e.g., distance, in-radius). Is that correct?
1 Answer
Reset to default 2It is my understanding that both your assumptions are correct. Distance is center to center, i.e., between the x,y coordinates of each agent, regardless of the shape or size of the agent. You would have to calculate the distance between the center of each agent and its edge if you wanted to know the edge-to-edge difference. This might be tricky if agents not more-or-less symmetrical around their center. A coracle perhaps?!
本文标签: How does 39inradius39 calculate distance between differently sized agents in NetLogoStack Overflow
版权声明:本文标题:How does 'in-radius' calculate distance between differently sized agents in NetLogo? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744033903a2522005.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论