View source: R/simmer-methods.R
| add_generator | R Documentation | 
Attach a new source of arrivals to a trajectory from a generator function.
add_generator(.env, name_prefix, trajectory, distribution, mon = 1,
  priority = 0, preemptible = priority, restart = FALSE)
| .env | the simulation environment. | 
| name_prefix | the name prefix of the generated arrivals. If several names are provided, several generators will be defined with the same parameters. | 
| trajectory | the trajectory that the generated arrivals will follow (see
 | 
| distribution | a function modelling the interarrival times (returning a negative value or a missing value stops the generator). | 
| mon | whether the simulator must monitor the generated arrivals or not (0 = no monitoring, 1 = simple arrival monitoring, 2 = level 1 + arrival attribute monitoring) | 
| priority | the priority of each arrival (a higher integer equals higher priority; defaults to the minimum priority, which is 0). | 
| preemptible | if a seize occurs in a preemptive resource, this parameter
establishes the minimum incoming priority that can preempt these arrivals (an
arrival with a priority greater than  | 
| restart | whether the activity must be restarted after being preempted. | 
Returns the simulation environment.
Convenience functions: at, from,
to, from_to, when_activated.
Other sources: add_dataframe.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.