Activities for activating or deactivating the generation of arrivals by name.
Sources must be defined in the simulation environment (see
add_generator
, add_dataframe
).
Arguments
- .trj
the trajectory object.
- sources
the name(s) of the source(s) or a function returning the name(s).
- ...
unused.
- tag
activity tag name to perform named rollbacks (see
rollback
) or just to better identify your activities.
Examples
traj <- trajectory() %>%
deactivate("dummy") %>%
timeout(1) %>%
activate("dummy")
simmer() %>%
add_generator("dummy", traj, function() 1) %>%
run(10) %>%
get_mon_arrivals()
#> name start_time end_time activity_time finished replication
#> 1 dummy0 1 2 1 TRUE 1
#> 2 dummy1 3 4 1 TRUE 1
#> 3 dummy2 5 6 1 TRUE 1
#> 4 dummy3 7 8 1 TRUE 1