Skip to content

current_count

Syntax

current_count(condition-name, state-name)
current_count(condition-name, state-name, group-name)

Parameters

condition-name
The name of a condition defined in the model.
state-name
The name of a state within the condition.
group-name
The name of a mixing group defined in the model.

Returns

Returns a non-negative integer value.

Description

This action returns the number of agents currently in the given state.

The second form restricts the count to the agents who are members of the agent's group.

Examples

my_sick_housemates = current_count(INF, Sick, Household)

See Also