Add a batch/separate activity

Share:

Description

Collect a number of arrivals before they can continue processing or split a previously established batch.

Usage

1
2
3
batch(.trj, n, timeout = 0, permanent = FALSE, name = "", rule = NULL)

separate(.trj)

Arguments

.trj

the trajectory object.

n

batch size, accepts a numeric.

timeout

set an optional timer which triggers batches every timeout time units even if the batch size has not been fulfilled, accepts a numeric (0 = disabled).

permanent

if TRUE, batches cannot be split.

name

optional string. Unnamed batches from different batch activities are independent. However, if you want to feed arrivals from different trajectories into a same batch, you need to specify a common name across all your batch activities.

rule

an optional callable object (a function) which will be applied to every arrival to determine whether it should be included into the batch, thus

Value

Returns the trajectory object.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.