Recent Changes - Search:

NetLogo

Erlang

R

PmWiki

edit SideBar

Links

Links have several entries in the NetLogo dictionary, but only a few are used directly by links (i.e., ask links [ code here ] or ask link 4 5 [code here]). Most of them are turtle commands such asking the turtles to do something with their links or report something about their links.

Here are the entries in the Dictionary under Links

both-ends clear-links create-<breed>-from create-<breeds>-from create-<breed>-to create-<breeds>-to create-<breed>-with create-<breeds>-with create-link-from create-links-from create-link-to create-links-to create-link-with create-links-with die hide-link in-<breed>-neighbor? in-<breed>-neighbors in-<breed>-from in-link-neighbor? in-link-neighbors in-link-from is-directed-link? is-link? is-link-set? is-undirected-link? layout-radial layout-spring layout-tutte <breed>-neighbor? <breed>-neighbors <breed>-with link-heading link-length link-neighbor? link links links-own <link-breeds>-own link-neighbors link-with my-<breeds> my-in-<breeds> my-in-links my-links my-out-<breeds> my-out-links no-links other-end out-<breed>-neighbor? out-<breed>-neighbors out-<breed>-to out-link-neighbor? out-link-neighbors out-link-to show-link tie untie

This is the handful that actually are link commands. They work in the "ask" with links (such as "ask links [code]") and link (such as "ask link 3 4 [code]")

  both-ends
  die
  hide-link
  is-directed-link? 
  is-link? 
  is-link-set? 
  is-undirected-link?
  link-length  example: show [link-length] of link 0 1
  other-end (indirectly) 
  show-link
  tie-mode (a value, as in 'ask link 0 1 [show tie-mode]
  untie

Links can have breeds, just like turtles. Special rules apply regarding directed and non-directed links and breeds (see the section of the manual about links in the Programming Guide) Links can also own values: Links-own [item1 item2]

Links have these default variables

  end1 (oldest turtle if non-directed)  (the from turtle if directed)
  end2
  color
  label
  label-color
  hidden?
  breed
  thickness  (value of 0 is not invisible, it is 1 pixel)
  shape
  tie-mode  "none"  "fixed" "free"  see the programming guide under "Tie"
Edit - History - Print - Recent Changes - Search
Page last modified on November 30, 2015, at 07:20 PM