library(simmer)
end = trajectory() %>%
synchronize(wait = FALSE) %>%
log_('leave')
p = trajectory() %>%
clone(n = 2,
trajectory() %>% renege_in(t = 1, out = trajectory() %>%
join(end) ) %>% timeout(5) ,
trajectory() %>% timeout(3) %>%
join(end))
simmer() %>%
add_generator("p", p, distribution = at(c(1))) %>%
run(until = 10)
#> 2: p0: leave
#> 4: p0: leave
#> simmer environment: anonymous | now: 4 | next:
#> { Monitor: in memory }
#> { Source: p | monitored: 1 | n_generated: 1 }
Created on 2022-03-04 by the reprex package (v2.0.1)
I expect that with wait=FALSE, only the first arrival can reach log_("leave").
Anyway, thank you guys for an amazing pacakges!
Created on 2022-03-04 by the reprex package (v2.0.1)
I expect that with wait=FALSE, only the first arrival can reach log_("leave").
Anyway, thank you guys for an amazing pacakges!