simmer

0th

Percentile

Create a Simulator

This method initialises a simulation environment.

Usage
simmer(name = "anonymous", verbose = FALSE)
Arguments
name

the name of the simulator.

verbose

enable showing activity information.

Value

Returns a simulation environment.

See Also

Methods for dealing with a simulation environment: reset, now, peek, stepn, run, add_resource, add_generator, get_mon_arrivals, get_mon_attributes, get_mon_resources, get_n_generated, get_capacity, get_queue_size, get_server_count, get_queue_count.

Aliases
  • simmer
Examples
# NOT RUN {
t0 <- trajectory("my trajectory") %>%
  ## add an intake activity
  seize("nurse", 1) %>%
  timeout(function() rnorm(1, 15)) %>%
  release("nurse", 1) %>%
  ## add a consultation activity
  seize("doctor", 1) %>%
  timeout(function() rnorm(1, 20)) %>%
  release("doctor", 1) %>%
  ## add a planning activity
  seize("administration", 1) %>%
  timeout(function() rnorm(1, 5)) %>%
  release("administration", 1)

env <- simmer("SuperDuperSim") %>%
  add_resource("nurse", 1) %>%
  add_resource("doctor", 2) %>%
  add_resource("administration", 1) %>%
  add_generator("patient", t0, function() rnorm(1, 10, 2)) %>%
  run(until=80)

# }
Documentation reproduced from package simmer, version 3.7.0.9000, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.