netlogo - Shortest path query returning empty list -


i have network 2851 nodes , 2887 links. network represents railway lines in city

i have been using nw extension identify shortest path between turtles.

however, queries, returning blank list, rather legitimate response, or false (indicating route not exist).

observer> ask turtle 3 [show nw:path-to turtle 13] (node 3): [(link 3 4) (link 4 5) (link 5 6) (link 6 7) (link 7 8) (link 8 9) (link 9 10) (link 10 11) (link 11 12) (link 12 13)]  observer> ask turtle 3 [show nw:path-to turtle 2851] (node 3): [] 

it works designed. documentation of path primitives says:

if no path exist between source , target turtles, primitives report empty list.

on other hand, distance primitives report false if no path exists. per documentation:

finds shortest path target turtle , reports total distance path, or false if no path exists in current context.

i readily admit not consistent design...


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -