NetLogo / NW-Extension

This is the NetLogo Network Extension. For general information about NetLogo, see:
http://ccl.northwestern.edu/netlogo/
Other
62 stars 25 forks source link

nw:weak-component-clusters not sensitive to directed graphs #202

Open timverlaan opened 2 years ago

timverlaan commented 2 years ago

I am trying to use nw:weak-component-clusters to remove clusters in which my agents get stuck when I traverse the graph. However, it seems it is not sensitive to directed links. What remains after using the function is a network with nodes which cannot be reached from all other nodes in the network. Is there a way to make this function sensitive to directed graphs? Or does anyone have a suggestion how I can do this?

timverlaan commented 2 years ago

This would - I think - be a very extreme measure:

    ask nodes [ ask myself [if nw:path-to myself = false [ show "dying" ask out-link-neighbors [die] die ]]]
  ]  

I think I could get away with this, as there are only few place walkers get stuck:

  ask nodes [
    ask one-of nodes [ ask myself [if nw:path-to myself = false [ show "dying" ask out-link-neighbors [die] die ]]]
  ]  

However, both take rather a long time. Anyone any suggestions?