Generator convenience function to generate arrivals at specific times.

at(...)

Arguments

...
a vector or multiple parameters of times at which to initiate an arrival.

Value

Returns a generator function.

See also

add_generator.

Examples

t0 <- trajectory() %>% timeout(0) env <- simmer(verbose=TRUE) %>% add_generator("dummy", t0, at(0, c(1,10,30), 40, 43)) %>% run(100)
#> 0 | generator: dummy | new: dummy0 | 0 #> 0 | generator: dummy | new: dummy1 | 1 #> 0 | generator: dummy | new: dummy2 | 10 #> 0 | generator: dummy | new: dummy3 | 30 #> 0 | generator: dummy | new: dummy4 | 40 #> 0 | generator: dummy | new: dummy5 | 43 #> 0 | arrival: dummy0 | activity: Timeout | 0 #> 1 | arrival: dummy1 | activity: Timeout | 0 #> 10 | arrival: dummy2 | activity: Timeout | 0 #> 30 | arrival: dummy3 | activity: Timeout | 0 #> 40 | arrival: dummy4 | activity: Timeout | 0 #> 43 | arrival: dummy5 | activity: Timeout | 0