Simmer Package - Custom Delays?


I wondered if it would be possible to add custom delays to the trajectory.
Currently I have a static delay time of 5 minutes, but I would like to add in a vector of numbers to refine the simulation further.

For example, the first would experience a delay of 1 minute, the following would experience a delay of 2 minutes etc etc..

Is this possible?

Environment <- simmer("Model")

Vehicle <- trajectory("Vehicles") %>%
  ## add an intake activity 
  seize("Lane", 1) %>%
  timeout(5) %>%
  release("Lane", 1)

##add resources
Environment %>%
  add_resource("Lane", capacity = 2) %>%
  add_generator("", Vehicle, at(1,2,3,4))

Environment %>% 
  run(until = 50)

Many thanks for all your help/suggestions

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.