Learn R Programming

simmer (version 3.2.1.9000)

seize: Add a seize activity

Description

Adds a new activity capable of seizing a resource to the tail of a trajectory.

Usage

seize(traj, resource, amount = 1, priority = 0, preemptible = 0,
  restart = FALSE)

Arguments

traj

the trajectory object.

resource

the name of the resource.

amount

the amount to seize.

priority

the priority of the seize (a higher integer equals higher priority; defaults to the minimum priority, which is 0).

preemptible

if the seize occurs in a preemptive resource, this parameter establishes the minimum incoming priority that can preempt this arrival (a seize with a priority equal to `preemptible` or more gains the resource; by default, any seize may cause preemption in a preemptive resource).

restart

whether the activity must be restarted after being preempted.

Value

The trajectory object.

See Also

Other methods for dealing with trajectories: create_trajectory, get_head, get_tail, get_n_activities, release, timeout, set_attribute, branch, rollback.