Learn R Programming

simmer (version 3.0.0)

add_generator: Add a generator

Description

Adds a generator to a simulation environment.

Usage

add_generator(env, name_prefix, trajectory, dist, mon = TRUE)

Arguments

env

the simulation environment.

name_prefix

the name prefix of the generated arrivals.

trajectory

the trajectory that the generated arrivals will follow (see create_trajectory).

dist

a function modelling the interarrival times (returning a negative value stops the generator).

mon

whether the simulator must monitor the generated arrivals or not.

Value

Returns the simulation environment.

See Also

Other methods to deal with a simulation environment: simmer, now, peek, peek, step, run, add_resource, get_mon_arrivals, get_mon_resources, get_capacity, get_queue_size, get_server_count, get_queue_count.