simmer: Create a Simulator

Description Usage Arguments Value See Also Examples

View source: R/simmer-methods.R

Description

This method initialises a simulation environment.

Usage

1
simmer(name = "anonymous", verbose = FALSE, mon = monitor_mem())

Arguments

name

the name of the simulator.

verbose

enable showing activity information.

mon

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

Value

Returns a simulation environment.

See Also

Available methods by category:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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

simmer documentation built on May 1, 2018, 5:03 p.m.