simmer

0th

Percentile

Create a Simulator

This method initialises a simulation environment.

Usage
simmer(name = "anonymous", verbose = FALSE, mon = monitor_mem(),
  log_level = 0)
Arguments
name

the name of the simulator.

verbose

enable showing activity information.

mon

monitor (in memory by default); see monitor for other options.

log_level

debugging level (see log_).

Value

Returns a simulation environment.

See Also

Available methods by category:

Aliases
  • simmer
Examples
# NOT RUN {
## a simple trajectory that prints a message
t0 <- trajectory("my trajectory") %>%
  log_("arrival generated")

## create an empty simulation environment
env <- simmer("SuperDuperSim")
env

## add a generator and attach it to the trajectory above
env %>% add_generator("dummy", t0, function() 1)

## run for some time
env %>% run(until=4.5)
env %>% now()           # current simulation time
env %>% peek()          # time for the next event
env %>% stepn()         # execute next event

# }
Documentation reproduced from package simmer, version 4.0.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.