Skip to content

max_loops

Syntax

simulation {
    max_loops = <value>
}

Parameters

value
The maximum number of state transition allowed.
second
End in a period.

Description

This simulation property specifies the maximum number of zero-duration state transitions allowed by a single agent within a given condition. If an agent exceeds this number, a run-time error occurs and the simulation is aborted.

This is meant to detect an infinite loop in which an agent makes state transitions with no wait states.

The default setting for this property is max_loops = 1000000.

Examples

The follow code will trigger a run-time error the first time an agent enters state A:

simulation {
    max_loops = 1000000
}

state A {
    wait(0)
    default(B)
}

state B {
    wait(0)
    default(A)
}

See Also