Skip to content

size

Syntax

size(Population)
size(<group_name>)

Parameters

<group_name>
Name of a mixing group or Population

Description

The first form returns the number of individual agents in the Population.

The second form returns the number of members in the ordinary agent's group. If the agent is not a member of the given group, the action returns 0.

Examples

If an agent is a member of a School, then the agent can find the size the school with:

my_school_size = size(School)

See Also