Skip to content

Non-homogeneous arrival process #271

Answered by Enchufa2
augustodarruda asked this question in Q&A
Discussion options

You must be logged in to vote

As usual with simmer, there are several options available to suit your needs. You could simply precompute all your arrivals up to the time you want to simulate into a dataframe, with relative (interarrival) or absolute times, then attach it and run the entire thing. This method is particularly suitable for feeding preexisting experimental data. Example:

library(simmer)

t <- trajectory() %>%
  log_("Here I am")

df_rel <- data.frame(time = rep(2, 5))
df_abs <- data.frame(time = seq(2, 10, 2))

env <- simmer() %>%
  add_dataframe("dummy_rel", t, df_rel) %>%
  add_dataframe("dummy_abs", t, df_abs, time="absolute")

run(env)
#> 2: dummy_rel0: Here I am
#> 2: dummy_abs0: Here I am
#> 4: dummy…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@augustodarruda
Comment options

@Enchufa2
Comment options

@augustodarruda
Comment options

@augustodarruda
Comment options

Answer selected by augustodarruda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants