activate {simmer} | R Documentation |
Activities for activating or deactivating the generation of arrivals by name.
Sources must be defined in the simulation environment (see
add_generator
, add_dataframe
).
activate(.trj, source) deactivate(.trj, source)
.trj |
the trajectory object. |
source |
the name of the source or a function returning a name. |
Returns the trajectory object.
traj <- trajectory() %>% deactivate("dummy") %>% timeout(1) %>% activate("dummy") simmer() %>% add_generator("dummy", traj, function() 1) %>% run(10) %>% get_mon_arrivals()