Adds a new activity that defines n alternative paths to the tail of a trajectory.
branch(traj, option, merge, ...)
the trajectory object.
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.
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.
The trajectory object.
Other methods to deal with trajectories: create_trajectory, get_head, get_tail, get_n_activities, seize, release, set_attribute, timeout, rollback.