Skip to content

reopen

Syntax

reopen()

Description

A group agent action that opens its associated place.

Examples

simulation {
    start_date = 2020-Jan-01
    end_date = 2020-Jan-02
    locations = none
    default_model = none
}

place my_place {
    has_group_agent = 1
    site = 0, 0, 0
}

startup {
    add_to_schedule(my_place,Everyday,2am,0,4am,0)
}

condition TestCondition {
    group_start_state = StateA
    start_state = Excluded

    state StateA {
        # Wait until 3am so that my_place is open.
        wait(3)
        default(StateB)
    }

    state StateB {
        # Closes my_place
        close()
        wait(0)
        default(StateC)
    }

    state StateC {
        # my_place is now open again
        reopen()
        wait(0)
        default()
    }

}

See Also