Initializes a new instance of a Queue object.
Queue name. This is the name that will appear in reports generated by the Simulation.getStatsTable method. If ommitted, the queue will not be included in any reports.
Queue capacity. If an entity tries to enter a queue that does not have enough capacity, it enters a wait state until another entity leaves the queue and enough capacity becomes available. If ommitted, the queue has infinite capacity.
Object with parameters used to initialize the Queue.
Gets the average dwell time for entities/units in this queue.
Gets the average queue length in entities/units.
Gets or sets the Queue capacity.
The queue's capacity limits the flow of entities through the simulation. When an entity tries to enter a queue that is at capacity, it is forced to wait until another entity exits the queue.
This property is set to null by default, which means the queue has infinite capacity.
Gets or sets the Queue capacity.
The queue's capacity limits the flow of entities through the simulation. When an entity tries to enter a queue that is at capacity, it is forced to wait until another entity exits the queue.
This property is set to null by default, which means the queue has infinite capacity.
Gets an array containing the entities currently in the Queue.
Gets a Map where the keys are the entities in the queue and the values are {@link QueueItem} objects containing information about the entities.
Gets the last simulated time when an entity entered or left the queue.
Gets the maximum dwell time for entities/units in this queue.
Gets the maximum queue length in entities/units.
Gets or sets the Queue name.
The queue's name is used in output reports such as the ones created by the Simulation.getStatsTable method.
Gets or sets the Queue name.
The queue's name is used in output reports such as the ones created by the Simulation.getStatsTable method.
Gets the number of entities currently in the queue.
This value is usually, but not always, the same as the number of queue capacity units in use.
By default, entities entering queues use up one capacity unit. In this case, the pop and unitsInUse properties will return the same value. But if entities take arbitrary queue capacity units when they enter the queue, those values will be different.
Gets the total number of entities/units that were seized and released during the simulation.
Gets the total number of entities that have entered the queue since the simulation started.
Gets the total number of capacity units currently in use.
The Entity.enterQueue method allows entities to seize arbitry capacity units when entering queues. If all entities seize one capacity unit when entering the queue, then the unitsInUse property returns the same value as the pop property.
internal
Number of capacity units to seize.
Generated using TypeDoc
Class that represents a resource and collects statistics within a simulation.
We refer to queues and resources interchangeably. Resources are just Queues with limited capacity. Seizing a resource is the same as entering a Queue, and releasing a resource is the same as leaving a Quue.
Queues can be seized and released by entities while the simulation runs using the Entity.enterQueue and Entity.leaveQueue methods.
When that happens, the simulation collects aggregate statistics about the number of entities in the queue and the amount of time they spent there.
For example, the script below causes entities to enter a waiting queue, seize one capacity unit of a server queue, leave the waiting queue, undergo a delay that represents the service, then leave the server:
Queue statistics can be obtained at the end of the simulation by inspecting the queue's grossPop and grossDwell Tally objects.
You can also generate complete reports on queue utilization using the Simulation.getStatsTable method.
In addition to the Entity.enterQueue and Entity.leaveQueue methods, SimScript has an Entity.seize method that provides a shorter way to instruct entities to enter one or more waiting queues (unlimited capacity), seize a resource (limited capacity), undergo a delay, and leave the waiting queues.
For example, the code below uses the Entity.seize method to perform the same tasks as the script listed above: