working_dir/ref_renege.R

library(simmer)

t <- trajectory(verbose=T) %>%
  renege_in(1) %>%
  seize("dummy", 1) %>%
  renege_abort() %>%
  timeout(2) %>%
  release("dummy", 1)

env <- simmer(verbose=TRUE) %>%
  add_resource("dummy", 1) %>%
  add_generator("arrival", t, at(0, 0)) %>%
  run()

get_mon_arrivals(env, per_resource=TRUE)
get_mon_arrivals(env, per_resource=FALSE)
get_mon_resources(env)
r-simmer/simmer documentation built on Aug. 17, 2018, 9:18 p.m.