Skip to content

range_list

Syntax

range_list(numeric_expression)

Parameters

numeric_expression
An expression that evaluates to an integer.

Returns

A list of integers from 0 to numeric_expression - 1.

Description

Generates a sequence of integers starting from 0 to the parameter passed - 1.

Examples

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

condition DEMO {
    start_state = Excluded
    meta_start_state = MetaStart

    state MetaStart {
        print(range_list(10)) # Prints 0 1 2 3 4 5 6 7 8 9

        wait()
        next()
    }
}

See Also