Skip to content
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

Unschedule future arrivals when a source is deactivated #249

Closed
Enchufa2 opened this issue Jun 25, 2021 · 0 comments
Closed

Unschedule future arrivals when a source is deactivated #249

Enchufa2 opened this issue Jun 25, 2021 · 0 comments

Comments

@Enchufa2
Copy link
Member

This is known behaviour, yet quite unexpected and inconvenient from the user perspective:

library(simmer)

dummy <- trajectory() %>%
  log_("New arrival")

interrupt <- trajectory() %>%
  deactivate("dummy")

env <- simmer() %>%
  add_generator("dummy", dummy, function() 10) %>%
  add_generator("interrupt", interrupt, at(5)) %>%
  run()
#> 10: dummy0: New arrival

Already scheduled arrivals should be unscheduled at deactivation point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant