Site icon R-bloggers

simmer v3.5.0 released on CRAN

[This article was first published on FishyOperations, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

We are proud to present simmer 3.5.0, a new release on CRAN of the Discrete-Event Simulator for R with a bunch of exciting features:

library(simmer)

sayer <- create_trajectory() %>%
  log_("hello world!")

simmer() %>%
  add_generator("dummy", sayer, at(3, 6)) %>%
  run() %>% invisible

## 3: dummy0: hello world!
## 6: dummy1: hello world!
library(simmer)

t_blocked <- create_trajectory() %>%
  trap("you shall pass",
       handler = create_trajectory() %>%
         log_("ok, I'm packing...") %>%
         timeout(1)) %>%
  log_("waiting...") %>%
  wait() %>%
  log_("and I'm leaving!")

t_signaler <- create_trajectory() %>%
  log_("you shall pass") %>%
  send("you shall pass")

simmer() %>%
  add_generator("blocked", t_blocked, at(0)) %>%
  add_generator("signaler", t_signaler, at(5)) %>%
  run() %>% invisible

## 0: blocked0: waiting...
## 5: signaler0: you shall pass
## 5: blocked0: ok, I'm packing...
## 6: blocked0: and I'm leaving!

Other interesting new features from past releases since our last post include post-seize and reject optional trajectories when seizing resources, arrival cloning and synchronizing, arrival batching and separating or reneging.

Please, refer to the updated Advanced Trajectory Usage vignette for more information and examples. Also remember that you can participate in our simmer-devel mailing list to get help, discuss methodologies… any feedback is always welcome.

To leave a comment for the author, please follow the link and comment on their blog: FishyOperations.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.