Learn R Programming

simmer (version 3.6.0.9000)

to: Generate arrivals stopping at a specified time

Description

Generator convenience function to generate inter-arrivals with a specified stop time.

Usage

to(stop_time, dist)

Arguments

stop_time

the time at which to stop the generator.

dist

a function modelling the interarrival times.

Value

Returns a generator function.

See Also

add_generator.

Examples

Run this code
# NOT RUN {
t0 <- trajectory() %>% timeout(0)
env <- simmer(verbose=TRUE) %>%
  add_generator("dummy", t0, to(5, function() runif(1, 1, 2))) %>%
  run(10)
# }

Run the code above in your browser using DataLab