Closed tomjemmett closed 3 years ago
if you run get_mon_arrivals() with ongoing = TRUE multiple times the unfinished entities are repeated. If you run the function again with ongoing = FALSE (default argument value) the unfinished entities appear
get_mon_arrivals()
ongoing = TRUE
ongoing = FALSE
library(simmer) trj <- trajectory() %>% log_("I'm here") env <- simmer() %>% add_generator("x", trj, function() 1) %>% run(5) #> 1: x0: I'm here #> 2: x1: I'm here #> 3: x2: I'm here #> 4: x3: I'm here # running with ongoing = FALSE shows same results each time get_mon_arrivals(env) #> name start_time end_time activity_time finished replication #> 1 x0 1 1 0 TRUE 1 #> 2 x1 2 2 0 TRUE 1 #> 3 x2 3 3 0 TRUE 1 #> 4 x3 4 4 0 TRUE 1 get_mon_arrivals(env) #> name start_time end_time activity_time finished replication #> 1 x0 1 1 0 TRUE 1 #> 2 x1 2 2 0 TRUE 1 #> 3 x2 3 3 0 TRUE 1 #> 4 x3 4 4 0 TRUE 1 # running with ongoing = TRUE multiple times causes the finished = FALSE to appear multiple times get_mon_arrivals(env, ongoing = TRUE) #> name start_time end_time activity_time finished replication #> 1 x0 1 1 0 TRUE 1 #> 2 x1 2 2 0 TRUE 1 #> 3 x2 3 3 0 TRUE 1 #> 4 x3 4 4 0 TRUE 1 #> 5 x4 -1 NA NA FALSE 1 get_mon_arrivals(env, ongoing = TRUE) #> name start_time end_time activity_time finished replication #> 1 x0 1 1 0 TRUE 1 #> 2 x1 2 2 0 TRUE 1 #> 3 x2 3 3 0 TRUE 1 #> 4 x3 4 4 0 TRUE 1 #> 5 x4 -1 NA NA FALSE 1 #> 6 x4 -1 NA NA FALSE 1 # now runnning with ongoing = FALSE shows the finished = FALSE entities too get_mon_arrivals(env) #> name start_time end_time activity_time finished replication #> 1 x0 1 1 0 TRUE 1 #> 2 x1 2 2 0 TRUE 1 #> 3 x2 3 3 0 TRUE 1 #> 4 x3 4 4 0 TRUE 1 #> 5 x4 -1 NA NA FALSE 1 #> 6 x4 -1 NA NA FALSE 1
Already fixed, see #240, but it's not released yet. I'll submit an update to CRAN this summer.
ahh, sorry, only checked open issues! Thanks! :-)
if you run
get_mon_arrivals()
withongoing = TRUE
multiple times the unfinished entities are repeated. If you run the function again withongoing = FALSE
(default argument value) the unfinished entities appear