Skip to content

exposed_state

Syntax

exposed_state = <state>

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()
        next()
    }

    state Exposed {
        set_sus(INFLUENZA, 0)
        wait(24*lognormal(1.9,1.23))
        next(InfectiousAsymptomatic) with prob(0.33)
        default(InfectiousSymptomatic)
    }

    ...
}

See Also