Learn R Programming

simmer (version 3.3.0.9000)

branch: Add a branch activity

Description

Adds a new activity that defines n alternative paths to the tail of a trajectory.

Usage

branch(traj, option, continue, ..., merge = "_deprecated")

Arguments

traj

the trajectory object.

option

a callable object (a function) that must return an integer between 1 and n; it will be used by the arrivals to select a path to follow.

continue

a vector of n booleans that indicate whether the arrival must continue executing activities after each path or not.

...

n trajectory objects describing each path.

merge

(deprecated) same as continue, for compatibility reasons. Support for this argument will be dropped in upcoming versions.

Value

The trajectory object.

See Also

Other methods for dealing with trajectories: create_trajectory, get_head, get_tail, get_n_activities, join, seize, release, set_attribute, timeout, rollback, leave, seize_selected, release_selected, select.