Link-Walking Turtles Example
Model was written in NetLogo 5.0.4
•
Viewed 4635 times
•
Downloaded 266 times
•
Run 12 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
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.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Link-Walking Turtles Example.png | preview | Preview for 'Link-Walking Turtles Example' | over 11 years ago, by Uri Wilensky | Download |
This model does not have any ancestors.
This model does not have any descendants.
Rubab Fatima
un-linked walking of turtles. (Question)
Hi there! This example model has been supremely helpful for me but I would rather like a few modifications done in this and would rather like a bit of help. How can a particular traffic of turtles be directed towards a particular node on basis of some score of the node and yes the nodes must not be connected.
Posted almost 6 years ago