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

Add links to others

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

Add links to others

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


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-to primitive with each agent in the set.

Related micro-behaviours


Add links to others was implemented by Ken Kahn.

BehaviourComposer: ignore everything after this.