Link-Walking Turtles Example
Comments and Questions
Click to Run Model
breed [nodes node] breed [walkers walker] walkers-own [location] ;; holds a node to setup clear-all set-default-shape nodes "circle" ;; create a random network create-nodes 30 [ set color blue ] ask nodes [ create-link-with one-of other nodes ] ;; lay it out so links are not overlapping repeat 500 [ layout ] ;; leave space around the edges ask nodes [ setxy 0.95 * xcor 0.95 * ycor ] ;; put some "walker" turtles on the network create-walkers 5 [ set color red set location one-of nodes move-to location ] reset-ticks end to layout layout-spring nodes links 0.5 2 1 end to go ask links [ set thickness 0 ] ask walkers [ let new-location one-of [link-neighbors] of location ;; change the thickness of the link I just crossed over ask [link-with new-location] of location [ set thickness 0.5 ] face new-location ;; not strictly necessary, but improves the visuals a bit move-to new-location set location new-location ] tick end ; Public Domain: ; To the extent possible under law, Uri Wilensky has waived all ; copyright and related or neighboring rights to this model.
There are 10 versions of this model.
This model does not have any ancestors.
This model does not have any descendants.