powered by
Generator convenience function to generate inter-arrivals with specified start and stop times.
from_to(start_time, stop_time, dist, arrive = TRUE)
the time at which to launch the initial arrival.
the time at which to stop the generator.
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).
TRUE
start_time
dist
FALSE
Returns a generator function.
add_generator.
add_generator
# NOT RUN { t0 <- create_trajectory() %>% timeout(0) env <- simmer(verbose=TRUE) %>% add_generator("dummy", t0, from_to(5, 10, function() runif(1, 1, 2))) %>% run(100) # }
Run the code above in your browser using DataLab