I'm trying to develop a model in NetLogo in which animal agents will be randomly distributed across space each time the model is started. However, the animals are territorial. Any suggestions on how to have the animals start with a circular territory of some size that can overlap with other animals to a certain extent but not completely? Below is the fragment of code I have started on it, but frankly I don't even know where to start. In the code below the animals aren't aware of the other territories when initialized. Any help would be much appreciated.
to setup
ask n-of (number-of-animals) TropForst
sprout-animals 1
set territory patches in-radius ((sqrt ((territory-animals * 1000000)/ pi)) / 10)
end
this is one way to do it : you can change the center patch for each type of animals and you can set how much you want their territory to overlap.
you can do it this way as well:
since I like examples ;) this is another one which you can change the pcolor of each territory as well :
and you can call the function like this :
set territory pathces-in-territory patch 10 6 15 blue
*UpdateI should check it with netlogo later
In case you want the territory to be defined for each individual animal you can check if there is no turtle in radius more that the territory for example 5 and then set the territory to patches around the turtle