-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
monitoring of unfinished activities #73
Comments
For me, the nice thing is that you can continue the simulation. If you call |
Hmz, you're completely right. Either way, this behaviour is something we should describe in more detail in #29 |
I see no benefit from aborting trajectories. There is no need: we can simply report these ongoing processes without terminating them. It would be an extra option to So following your example above, library(simmer)
a <- create_trajectory() %>%
timeout(11)
b <- create_trajectory() %>%
timeout(1) %>%
rollback(1, times=Inf)
c <- create_trajectory() %>%
timeout(5)
env <- simmer() %>%
add_generator("a", a, at(0)) %>%
add_generator("b", b, at(0)) %>%
add_generator("c", c, at(0)) %>%
run(until=10)
get_mon_arrivals(env, ongoing = TRUE)
#> name start_time end_time activity_time finished replication
#> 1 c0 0 5 5 TRUE 1
#> 2 a0 0 NA NA NA 1
#> 3 b0 0 NA NA NA 1 The advantage of not having terminated those two is that you can now do the following: env %>% run(until=12)
get_mon_arrivals(env, ongoing = TRUE)
#> name start_time end_time activity_time finished replication
#> 1 c0 0 5 5 TRUE 1
#> 2 a0 0 11 11 TRUE 1
#> 3 b0 0 NA NA NA 1 |
The |
great work 👍 |
I've ran into some results that are unintuitive for me. Consider the following
Which results in:
I would expect the
a
andb
arrival to also show up with anend_time
equal tountil
and afinished
status ofFALSE
.Not looked into it too deep, but I think we can relatively easily implement this by making a
terminate
call on all the active arrivals after theSimulator::run
function runs out.What do you think @Enchufa2?
The text was updated successfully, but these errors were encountered: