NW-Extension icon indicating copy to clipboard operation
NW-Extension copied to clipboard

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

Open timverlaan opened this issue 3 years ago • 1 comments

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 avatar Sep 01 '22 14:09 timverlaan

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?

timverlaan avatar Sep 01 '22 17:09 timverlaan