Libraries‎ > ‎Library‎ > ‎Linking‎ > ‎

Add undirected links to others

BehaviourComposer: ignore everything before this.
Begin micro-behaviour:
Begin description:
Add undirected links with a set of agents.
End description

Add undirected links

Begin NetLogo code:
substitute-text-area-for other-agents all-others         
create-links-with other-agents
End NetLogo code

Variants

You can specify the other agents by editing the text area. For example all-others with [my-age > 21] will select all other agents whose attribute my-age is greater than 21.

How this works

This uses the NetLogo create-links-with primitive with the specified set.

Related micro-behaviours

History

Add undirected links was implemented by Ken Kahn.

BehaviourComposer: ignore everything after this.
Comments