state¶
Syntax¶
Parameters¶
<condition-name>- The name of the condition.
<state-name>- The name for the state.
Description¶
The state block defines a state within a condition. Each agent occupies exactly one state within each condition at any time, and each condition can define any number of states.
A state block defines three types of statements:
- The actions an agent performs when it enters the state;
- The duration of time the agent spends in the state; and
- The transition rules that determine which state the agent occupies next.
Examples¶
Here is an example of a partial INFLUENZA condition with two states defined.
condition INFLUENZA {
. . .
state Susceptible {
INFLUENZA.sus = 1
wait()
next()
}
state Exposed {
INFLUENZA.sus = 0
wait(24 * lognormal(1.9, 1.23))
next(InfectiousAsymptomatic) with prob(0.33)
default(InfectiousSymptomatic)
}
. . .
}