You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The doc for link-path and link-path-turtles states:
Follows links at the same depth in random order. If there are multiple shortest paths, a different path may be returned on subsequent calls, depending on the random choices made during search.
This is, however, not the case:
extensions [ network ]
to test
ca
cro 4 [ create-link-with turtle ((who + 1) mod 4) ]
show length remove-duplicates n-values 100 [
[ network:link-path turtle 2 links ] of turtle 0
]
end
...shows 1, as the same path is always taken. If the behavior was as expected, it would show 2, because each of the two possible paths would almost certainly be returned at least once.
Also, the linkPathTurtles and linkPath methods in:
...don't actually use the random number generator that's passed to them.
It is unclear if this will ever be fixed in the network extension, but the newer nw extension suffers from the same problem (NetLogo/NW-Extension#82) and it will at least be fixed there.
The text was updated successfully, but these errors were encountered:
The doc for
link-path
andlink-path-turtles
states:This is, however, not the case:
...shows 1, as the same path is always taken. If the behavior was as expected, it would show 2, because each of the two possible paths would almost certainly be returned at least once.
Also, the
linkPathTurtles
andlinkPath
methods in:https://github.com/NetLogo/Network-Extension/blob/d4a079bfb2b6d1db1287bf031542ddd4735fd43d/src/Metrics.scala
...don't actually use the random number generator that's passed to them.
It is unclear if this will ever be fixed in the
network
extension, but the newernw
extension suffers from the same problem (NetLogo/NW-Extension#82) and it will at least be fixed there.The text was updated successfully, but these errors were encountered: