Libraries‎ > ‎Library‎ > ‎Copying‎ > ‎

Create agents v2

BehaviourComposer: ignore everything before this.
Begin micro-behaviour
Begin description:
Create additional agents initialising them as if at set up time.
End description

Create agents

Begin NetLogo code:
substitute-text-area-for number-of-agents-to-add 1

substitute-text-area-for kind-of-agents-to-add "Prototype1"

create-agents number-of-agents-to-add

              kind-of-agents-to-add

              list-of-micro-behaviours "Additional Behaviours" []

End NetLogo code

Variants

You can edit the text areas to change the number of agents created or the kind of agent. You can add additional behaviours to the newly created agents. 

Related behaviours

 Add copies andAdd copies of anothercreate exact copies of an agent as it currently is.

How this works

The creates new agents with the behaviours listed in the named prototype plus any additional specified behaviours. It relies upon the create-agents command.

History

Create agents was implemented by Ken Kahn on 20 March 2011. This was updated on 29 October 2011.

BehaviourComposer: ignore everything after this.
Comments