Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > QUEUE Functions

QUEUE AGE IN RANGE(queue,minage,maxage) Number in QUEUE with AGE IN RANGE

Scroll Prev Top Next More

Returns the number or elements in a queue at least as old as minage and not older than maxage.  You can use :NA: in place of minage or maxage to return the number of elements no older than maxage or no younger than minage respectively.  

NOTE To prevent numerical surprises you might want to increase the range somewhat by, for example, using a minimum of 4.95 instead of 5.0.

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

Restrictions: The first 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 IN RANGE will return :NA:.

Units:QUEUE AGE IN RANGE (queue units) --> queue units (returns the same units as the queue)

Example

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

Overtime Mult= IF THEN ELSE(

        QUEUE AGE IN RANGE(Waiting,19.95,:NA:) > 50,1.25,1)

In this example a 25% overtime would be applied any time that more than 50 people have been waiting for 20 minutes or more.

Availability: Not PLE or PLE Plus.

See also: QUEUE FIFO, QUEUE FIFO ATTRIB

Sample model: QUEUE functions.mdl in FunctionExamples