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

Handler linking must be done per arrival #189

Closed
Enchufa2 opened this issue Feb 12, 2019 · 0 comments
Closed

Handler linking must be done per arrival #189

Enchufa2 opened this issue Feb 12, 2019 · 0 comments
Labels

Comments

@Enchufa2
Copy link
Member

Enchufa2 commented Feb 12, 2019

Issue: the second arrival jumps to the end.

library(simmer)

new_timeout <- trajectory() %>%
  log_("new timeout") %>%
  timeout(10)

customer <- trajectory() %>%
  trap("signal", new_timeout) %>%
  log_("first") %>%
  timeout(5) %>%
  log_("second") %>%
  timeout(5) %>%
  log_("end")

signal <- trajectory() %>%
  send("signal")

simmer() %>%
  add_generator("customer", customer, at(0, 5)) %>%
  add_generator("signal", signal, at(6)) %>%
  run()
#> 0: customer0: first
#> 5: customer0: second
#> 5: customer1: first
#> 6: customer0: new timeout
#> 6: customer1: new timeout
#> 16: customer0: end
#> 16: customer1: end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant