Learn R Programming

simmer (version 3.5.1.9000)

rollback: Add a rollback activity

Description

Go backwards to a previous point in the trajectory. Useful to implement loops.

Usage

rollback(.trj, amount, times = 1, check)

Arguments

.trj

the trajectory object.

amount

the amount of activities (of the same or parent trajectories) to roll back.

times

the number of repetitions until an arrival may continue.

check

a callable object (a function) which must return a boolean. If present, the times parameter is ignored, and the activity uses this function to check whether the rollback must be done or not.

Value

Returns the trajectory object.