Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nw:weak-component-clusters not following seed? #200

Open
piepmachientje opened this issue Feb 3, 2022 · 1 comment
Open

nw:weak-component-clusters not following seed? #200

piepmachientje opened this issue Feb 3, 2022 · 1 comment

Comments

@piepmachientje
Copy link

piepmachientje commented Feb 3, 2022

When I run a netlogo code with nw:weak-component-clusters in it, it returns the components in a different random order each time, even when random-seed is specified. I've tried with netlogo 5.1.0, 6.1.0 and 6.2.2 and two different machines, but the problem persists.

extensions [nw]

to setup
  clear-all
  random-seed 5
  create-turtles 1000
  ask turtles [create-link-with one-of other turtles]
  print (nw:weak-component-clusters)
end

, for example will sometimes print '[(agentset, 2 turtles) (agentset, 15 turtles) (agentset, 59 turtles) (agentset, 4 turtles) (agentset, 920 turtles)]', sometimes '[(agentset, 2 turtles) (agentset, 920 turtles) (agentset, 15 turtles) (agentset, 59 turtles) (agentset, 4 turtles)]', sometimes '[(agentset, 15 turtles) (agentset, 59 turtles) (agentset, 920 turtles) (agentset, 4 turtles) (agentset, 2 turtles)]' etc. Any idea what could be causing this?

@brandesNW
Copy link
Contributor

I have confirmed the bug.
I used the following code and exported world file to show that given the same set of links and turtles and a random seed the weak component clusters differ between runs with a fresh NetLogo session.

extensions [nw]

to import-links
  clear-all
  import-world "links-world.txt"
  random-seed 15
  print (nw:weak-component-clusters)
end

links-world.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants