Link Breeds Example
Model was written in NetLogo 5.0.4
•
Viewed 1459 times
•
Downloaded 206 times
•
Run 2 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
;; every link breed must be declared as either directed or undirected directed-link-breed [red-links red-link] undirected-link-breed [blue-links blue-link] blue-links-own [ weight ] ;; link breeds can own variables just like turtle breeds to setup clear-all create-ordered-turtles 10 [ fd 5 set color gray ] ask n-of 5 turtles [ ;; create--with is used to make undirected links create-blue-link-with one-of other turtles [ set color blue set weight random 10 set label weight ] ] ;; different breeds can have different default shapes set-default-shape red-links "curved link" ask n-of 5 turtles [ ;; create--to/from are used to make directed links create-red-link-to one-of other turtles [ set color red ] ] 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 Breeds Example.png | preview | Preview for 'Link Breeds Example' | over 11 years ago, by Uri Wilensky | Download |
This model does not have any ancestors.
This model does not have any descendants.