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 (optional)
- The duration of time the agent spends in the state (required)
- The transition rules that determine which state the agent occupies next (required)
Examples¶
Here is an example of a partial INFLUENZA condition with two states defined.
condition INFLUENZA {
...
state Susceptible {
set_sus(INFLUENZA, 1)
wait()
default()
}
state Exposed {
set_sus(INFLUENZA, 0)
wait(24 * lognormal(1.9, 1.23))
next_with_prob(InfectiousAsymptomatic, 0.33)
default(InfectiousSymptomatic)
}
...
}