handle_unfinished {simmer} | R Documentation |
Handle Unfinished Arrivals
Description
Activity for setting a drop-out trajectory for unfinished arrivals, i.e.,
those dropped from a resource (due to preemption, resource shrinkage or a
rejected seize
) or those that leave
a trajectory.
Usage
handle_unfinished(.trj, handler, ..., tag)
Arguments
.trj |
the trajectory object. |
handler |
trajectory object to handle unfinished arrivals. A |
... |
unused. |
tag |
activity tag name to perform named rollbacks (see
|
Value
Returns the trajectory object.
See Also
Examples
traj <- trajectory() %>%
log_("arrived") %>%
handle_unfinished(
trajectory() %>%
log_("preempted!")) %>%
seize("res") %>%
log_("resource seized") %>%
timeout(10) %>%
release("res") %>%
log_("leaving")
simmer() %>%
add_resource("res", 1, 0, preemptive=TRUE, queue_size_strict=TRUE) %>%
add_generator("dummy", traj, at(0)) %>%
add_generator("priority_dummy", traj, at(5), priority=1) %>%
run() %>% invisible
[Package simmer version 4.4.6.4 Index]