Queues

Updated: 2025-09-27

Queues can also be analyzed statistically. In GPSS-Plus, they behave exactly like resources, but they are managed separately through specific structures called QUEUER.

To enable statistics collection, it is enough to wrap access to the resource with QUEUE and DEPART:

queue Qventanilla1
seize ventanilla1
depart Qventanilla1

This enables the automatic calculation of:

  • The number of entities in the queue over time (R_BIN_*)

  • The waiting time each entity spends in the queue (E_BIN_*)

In the report, you can visualize graphically how the queue behaved: when it formed, how long entities waited, and whether the resource sizing was sufficient.

The following example shows a FACILITY with frequent queues. By applying QUEUE/DEPART, the system captures all the statistics with no additional code.

 

 

Example

/*

  	 	Queues
 
*/
SYSTEM {TYPE:OPTIONS,Speed:7}
POSITION {NAME:POS1,X:620,Y:360}

QUEUER {NAME:Qventanilla1,X:374,Y:424
	,R_BIN_START:0,R_BIN_SIZE:1,R_BIN_COUNT:20 
    ,E_BIN_START:0,E_BIN_SIZE:1,E_BIN_COUNT:20
    }

Facility {NAME:ventanilla1,X:373,Y:365,capacity:5}
START 200

;*****************************************************
GENERATE 5,3,0,0 {NAME:GEN1,X:111,Y:366}
ADVANCE 10 {TO:ventanilla1}

queue Qventanilla1
seize ventanilla1
depart Qventanilla1
ADVANCE 20,10
release ventanilla1

ADVANCE 10 {TO:POS1}
ENDGENERATE 1