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?

Share Improve this question asked Mar 28 at 13:36 Ramya RoopaRamya Roopa 736 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

It 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