The role id of the agent within a given group
Returns the role id of the agent in the given group.
If the agent is not a member of any group of the given type, the
The names of the roles are defined in the file
the synthetic population
metadata directory. The roles defined in
the default synthetic popluation are:
GROUP,ROLE_0,ROLE_1 Household,child,adult School,student,teacher Grade,student,teacher Workplace,worker,manager Prison,resident,staff Nursing_Home,resident,staff College_Dorm,resident,resident Barracks,resident,resident State,resident,resident County,resident,resident Census_Tract,resident,resident Block_Group,resident,resident
The name of a declared group.
A compile-time error occurs if the named group is not declared in the model.
if (get_role(School) == teacher) then print("agent ", id, " is a teacher in school ", School)