Libraries‎ > ‎Library‎ > ‎Environment‎ > ‎

Ask every patch

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Add behaviours to all patches.

End description

Patch behaviours

Begin NetLogo code:

   [add-behaviours list-of-micro-behaviours "Patch Behaviours" []]

End NetLogo code


You can add any behaviour that a patch can run to the list.

How this works

This uses the Behaviour Composer NetLogo command ask-every-patch [...] which is a faster but equivalent to NetLogo's ask patches [...]. 

Related micro-behaviours

Attribute of patches can be used to set or update an attributes of all patches.


Patch behaviours was first implemented by Ken Kahn on 19 November 2011.

BehaviourComposer: ignore everything after this.