I need to learn NetLogo rather quickly, so I turned here for help. I have spent quite a bit of time trying to solve this issue but I think anyone a bit more experienced will be able to help.
I am creating a network of influence for turtles, that needs to adapt itself randomly every so often. I have used the following command which works well:
ask turtles [create-links-to n-of (S) other turtles]
Where S is my total number of turtles. I use links-to because one turtle is influenced by another one but doesn't necessarily influence that other one. So far so good. The problem is that I need to make network updates also, so that with a 5% probability the turtles adjust their network by killing one of the links and creating a new one with someone outside their network. The following lines:
if random 101 < 5 [
create-links-to n-of 1 other turtles
ask one-of links [die]
]
don't really do the trick because the turtle may endup choosing one of the existing links with throughout the simulation ends up reducing the total number of links in the network, which should remain stable.
Any thoughts ?
Thanks a lot, Pedro