was_exposed_in¶
Syntax¶
Parameters¶
condition- A transmissible condition within the model.
group>- A group name.
Returns¶
1 (true) if the agent was exposed to the given condition within the given group, and 0 (false) otherwise.
Description¶
This predicate returns 1 (true) if the current agent was exposed to the given
condition within the given group. Otherwise, this returns 0 (false). For
example, this action could be used to determine in the current agent contracted
a FLU condition within a school.
Examples¶
The following example directs the agent to the next state depending on where the agent contracted a FLU condition.
if (was_exposed_in(FLU, School)) then next(SchoolInfection)
if (was_exposed_in(FLU, Workplace)) then next(WorkInfection)
default(OtherInfection)