Thank you for your replies, I think I'll try the 'compromise'
solution and post about the results.
--- In [hidden email], "James Steiner"
> Hi all!
> I can think of a rather extreme solution to the problem of self-
> and a rather simple workaround to use instead.
> You *could* abandon the entire built-in link support and the
> convenience the link primitives offer and roll you own. Use a
> turtles as the links, with appropriate variables to handle things
> end1 and end2, and with no limitations on self-linking. Your
> home-grown link visualization code will have to know about the
> possibility of self-links, and use a different display method (e.g.
> instead of a line-shape placed half-way between the end-points, a
> self-link would be visualized as a circle, offset from the node by
> radius of the circle.
> But that would be awful.
> As a compromise, you could add a variable, like "self-link?" to the
> nodes. When this variable is true, you know that a self-link
> that node, and your code that deals with node-traversal or whatever
> would have to take that into account. For example:
> ;; construct this node's set of out-bound nodes, including this
> if this node includes a self-link.
> let out-bound-nodes no-turtles
> ifelse self-link?
> [ set out-bound-nodes ( turtle-set out-link-neighbors self ) ]
> [ set out-bound-nodes out-link-neighbors ]
> Likewise, if self-link visualization is important, then you can do
> this: if a node has a self-link, apply a different shape to it,
> includes an appropriate circlular self-link shape.
> As a side-note, you can create turtle shapes that include elements
> that extend past the visible edges of the editing area, so you can
> a circle to your shape, then slide it so that the circle passes
> through the center of the shape, or perhaps clings to the edge of
> node shape you are using.
> I hope this helps!!
> On Sat, May 10, 2008 at 6:00 PM, Jim Lyons <teacherjim42@...>
> > On May 10, 2008, at 12:36 PM, snezanacd wrote:
> >> I have a network of turtles with direct links between, and I
> >> of the turtles to be self-connected, e.g. link to connect the
> >> turtle. It is not supported with default features, but if
> >> an idea how I can model (upgrade) my network, I would
> >> very much.
> > Snezana,
> > There is a model at this group's website called generate-
> > creates a (simple) network from an input-output matrix of link
> > solve the problem of self-connected nodes, I used two turtles to
> > "node", one for its input and one for its output. Every link in
> > goes from an output turtle to an input turtle.
> > I did not solve the problem of showing the link that goes from
> > back to the input of the same node.
> > HTH,
> > Jim Lyons