Learn R Programming

simmer (version 3.1.1)

add_generator: Add a generator

Description

Adds a generator to a simulation environment.

Usage

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

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 (0=no monitoring, 1=simple arrival monitoring, 2=level 1 + arrival attribute montoring)

Value

Returns the simulation environment.

See Also

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