exposed_state¶
Syntax¶
Description¶
Defines the state that represents agent exposure for this condition.
This statement appears inside a condition block, outside of any state
definitions, to define the exposure state for the condition. This state is
assigned to agents during the simulation when agents interact with other
agents.
A condition is declared as a transmissible condition when a transmission_mode is assigned to the condition. It is an error to declare an exposed state in a condition that is not transmissible.
A common pattern for transmissible conditions is that susceptible agents begin
in a Start state and wait forever, from where they are transferred to the
defined exposure state as part of an import event or when they encounter
another infected agent during the simulation.
The given state must be a valid state. It is an error if the given state is not valid.
As mentioned in the description, it is also an error to use exposed_state in
a non-transmissible condition.
Examples¶
The following example show how an INFLUENZA condition might be defined using an
exposed_state statement. In this condition, some agents are assigned to the
exposure state at the start of the simulation from the Import state (not
shown) while all others wait forever in the Susceptible state. When a
susceptible agent encounters an infected agent, for example, if an agent goes
to work and interacts with one of the imported agents, then the susceptible
agent becomes infected and moves to Exposed state.
condition INFLUENZA {
transmission_mode = proximity
transmissibility = 1.0
start_state = Susceptible
exposed_state = Exposed
meta_start_state = Import
state Susceptible {
set_sus(INFLUENZA, 1.0)
wait()
default()
}
state Exposed {
set_sus(INFLUENZA, 0)
wait(24*lognormal(1.9,1.23))
next_with_prob(InfectiousAsymptomatic, 0.33)
default(InfectiousSymptomatic)
}
...
}
See Also¶
- adjust_contacts
- clear_transmissible_agents
- contact_prob
- contact_rate
- current_state
- enable_transmission_bias
- exposed_state
- get_contact_rate
- get_number_of_transmissibles
- get_state
- get_transmissibility
- get_transmissible_list
- import_exposures
- prev_state
- set_sus
- set_trans
- source
- sus_list
- transmission_mode
- transmission_network_name
- transmissions
- transmit
- was_exposed_externally
- was_exposed_in