
Generator convenience function to generate inter-arrivals with a specified start time.
from(start_time, dist, arrive = TRUE)
the time at which to launch the initial arrival.
a function modelling the interarrival times.
if set to TRUE
(default) the first arrival will be
generated at start_time
and will follow dist
from then on.
If set to FALSE
, will initiate dist
at start_time
(and the first arrival will most likely start at a time later than
start_time
).
Returns a generator function.
add_generator, at, to, from_to.
# NOT RUN {
t0 <- create_trajectory() %>% timeout(0)
env <- simmer(verbose=TRUE) %>%
add_generator("dummy", t0, from(5, function() runif(1, 1, 2))) %>%
run(10)
# }
Run the code above in your browser using DataLab