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

Create agents

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
              list-of-micro-behaviours "Additional Behaviours" []
End NetLogo code


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.

When used in a 3D model the 3D world declaration must be above or to the left of this micro-behaviour.

Related behaviours

 Add copies andAdd copies of anothercreate exact copies of an agent as it currently is. Create agents from data creates agents using the data provided.

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.


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

BehaviourComposer: ignore everything after this.