# NOT RUN {
library(parallel)
mm1 <- trajectory() %>%
seize("server", 1) %>%
timeout(function() rexp(1, 2)) %>%
release("server", 1)
envs <- mclapply(1:4, function(i) {
simmer("M/M/1 example") %>%
add_resource("server", 1) %>%
add_generator("customer", mm1, function() rexp(1, 1)) %>%
run(100) %>%
wrap()
})
# }
Run the code above in your browser using DataLab