Skip to content

id

Syntax

id()

Description

This expression returns the unique integer ID of the agent that calls the action.

Agent IDs are typically set in the synthetic population files.

Examples

If an agent with an ID of \(100\) was loaded into the model then the following statement would have only this agent perform the indicated action.

# Have agent with an ID of 100 print "Hello"
if (id() == 100) then print("Hello")

See Also