Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > QUEUE Functions

QUEUE AGE AVERAGE(queue,quant) AVERAGE AGE in the QUEUE

Scroll Prev Top Next More

Returns the average age of the oldest quant  elements in queue.  This is useful for tracking performance.  If quant is less than or equal to zero, or bigger than the total amount in the queue the average is taken over all elements in the queue.

Restrictions: The argument must be the name of a variable defined using QUEUE FIFO or QUEUE FIFO ATTRIB.  If you use any other variable as an argument QUEUE AGE AVERAGE will return :NA:.

NOTE For attribute queues this function assumes that TIME STEP is constant and will return an incorrect number if this is not the case.

Units:QUEUE AGE AVERAGE(queue,queue) --> time (returns the same units as Time)

Example

Waiting= QUEUE FIFO(Arriving,Servicing,Init Profile,100,20)

Overtime Mult= IF THEN ELSE(QUEUE AGE AVERAGE(Waiting) > 25,1.25,1)

In this example a 25% overtime would be applied any time the average waiting time exceeded 25.

Availability: Not PLE or PLE Plus.

See also: QUEUE FIFO, QUEUE FIFO ATTRIB

Sample model: QUEUE functions.mdl in FunctionExamples