-
-
Notifications
You must be signed in to change notification settings - Fork 42
Undesired sub-trajectory behavior #91
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
Comments
Thanks for the report. The problem is that the handler is not being cloned. A smaller reproducible example: a <- trajectory(verbose = TRUE) %>%
trap("asdf",
handler=
trajectory(verbose = TRUE) %>%
timeout(1)
)
a
#> trajectory: anonymous, 2 activities
#> { Activity: Trap | 0 <- 0x431f5e0 -> 0 | signals: [asdf] }
#> Fork 1, stop, trajectory: anonymous, 1 activities
#> { Activity: Timeout | 0x431f5e0 <- 0x443dd20 -> 0 | delay: 1 }
a$clone()
#> trajectory: anonymous, 2 activities
#> { Activity: Trap | 0 <- 0x3ead180 -> 0 | signals: [asdf] }
#> Fork 1, stop, trajectory: anonymous, 1 activities
#> { Activity: Timeout | 0x3ead180 <- 0x443dd20 -> 0 | delay: 1 } The pointer to the timeout activity, |
Try now with the current master version, please. |
I'm sorry, but I don't understand. Based on my understanding of your reply, I made the following changes and am getting the same results. Can you please elaborate and/or point me towards some documentation that could help me understand? Thank you!
|
Sorry, you don't need to change your code. Forget my first message, I was simply pointing at the cause of the bug for my own record. The bug should be solved with the last patch, so you need to reinstall the package from GitHub with devtools::install_github("r-simmer/simmer") And then try your code again, please. |
That worked. Thank you! When can we expect to see this in CRAN? I've got a few other people using this package at our company. |
Yes, you can, eventually. Now that the package is mature enough, I'm trying to establish a reasonable release cycle, i.e., a new release every two/three months. Given that the last release was about a month ago, this patch will reach CRAN in a month or two. In the meantime, please tell your colleagues to reinstall from GitHub whenever this feature is critical. Thanks again for the report. |
Great! Thank you for your prompt reply and your work on this project. |
I have put together some example code to reproduce the issue I'm having. In an attempt to keep my code clean, I have set up multiple sub-trajectories; however, as you can see by the output, the arrivals don't continue on the trajectory from which they started, after going down a shared sub-trajectory. It seems as though all arrivals continue down the trajectory of the first arrival to hit the sub-trajectory (see logging).
The text was updated successfully, but these errors were encountered: