default()

Transition rule that sets the default transition state for the current state.

Synopsis

default()
default(state-name)

Description

This function defines the default transition from the current state to a new state. An agent entering the associated state will typically transition to a new state after a defined waiting period. If an agent does not satisfy a transition rule using a next() function, then the agent is transition to the default transition state.

If default() is invoked with no arguments, then the current agent will transition to the same state by default.

Parameters

state-name

The valid name of a state within the current condition as the target of the transition.

Returns

This function has no return value.

Examples

In the following Exposed state the next() statement transitions agents to the InfectionsAsymptomatic state with a 33% probability, Otherwise, agents are transitioned to the default InfectiousSymptomatic state.

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

Here are some examples using default statements taken from the SCHOOL condition in the school-closure example that is discussed in the FRED Tutorials Documentation.

state Start {
    wait(0)
    if (is_group_agent(School)) then next(CheckEpidemic)
    if (is_member(School)) then next(StudentSchoolOpen)
    default(Excluded)
}

state CheckEpidemic {
    wait(0)
    if (school_closure_policy == LOCAL_CLOSURE) then next(CheckLocalEpidemic)
    if (school_closure_policy == GLOBAL_CLOSURE) then next(CheckGlobalEpidemic)
    default(CheckCalendar)
}

Note

A state can only have one default transition, and and the calculation to determine the transition probability described for next() transitions does not include any default rules.

See Also

next(), state