Adds a resource to a simulation environment.
add_resource(env, name, capacity = 1, queue_size = Inf, mon = TRUE,
preemptive = FALSE, preempt_order = "fifo")
the simulation environment.
the name of the resource.
the capacity of the server.
the size of the queue.
whether the simulator must monitor this resource or not.
whether arrivals in the server can be preempted or not based on seize priorities.
if the resource is preemptive and preemption occurs with more than one arrival in the server, this parameter defines which arrival should be preempted first. It must be `fifo` (First In First Out: older preemptible tasks are preempted first) or `lifo` (Last In First Out: newer preemptible tasks are preempted first).
Returns the simulation environment.
Convenience functions: schedule. Other methods for dealing with a simulation environment: simmer, reset, now, peek, onestep, run, add_generator, get_mon_arrivals, get_mon_attributes, get_mon_resources, get_n_generated, get_capacity, get_queue_size, get_server_count, get_queue_count.