activate {simmer}R Documentation

Activate/Deactivate Sources

Description

Activities for activating or deactivating the generation of arrivals by name. Sources must be defined in the simulation environment (see add_generator, add_dataframe).

Usage

activate(.trj, sources)

deactivate(.trj, sources)

Arguments

.trj

the trajectory object.

sources

the name(s) of the source(s) or a function returning the name(s).

Value

Returns the trajectory object.

See Also

set_trajectory, set_source

Examples

traj <- trajectory() %>%
  deactivate("dummy") %>%
  timeout(1) %>%
  activate("dummy")

simmer() %>%
  add_generator("dummy", traj, function() 1) %>%
  run(10) %>%
  get_mon_arrivals()


[Package simmer version 4.4.5 Index]