Define a new resource in a simulation environment.
add_resource(.env, name, capacity = 1, queue_size = Inf, mon = TRUE, preemptive = FALSE, preempt_order = c("fifo", "lifo"), queue_size_strict = FALSE)
fifo(First In First Out: older preemptible tasks are preempted first) or
lifo(Last In First Out: newer preemptible tasks are preempted first).
queue_sizeis a hard limit. By default, preempted arrivals go to a dedicated queue, so that
queue_sizemay be exceeded. If this option is
TRUE, preempted arrivals go to the standard queue, and the maximum
queue_sizeis guaranteed (rejection may occur).
Returns the simulation environment.