Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > QUEUE Functions

QUEUE ATTRIB QUANTITY(queue,quant) MINimum ATTRIBute in the QUEUE

Scroll Prev Top Next More

Returns the oldest elements in queue such that the sum of their total attributes add up to quant.  For example, suppose you have a queue of orders (Order) with an attribute of order size (Item/Order).  You would pass this function the processing capacity (Item/Day) times TIME STEP (Day) to determine how many orders could be processed today.

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

Units:QUEUE ATTRIB QUANTITY(queue units,attrib units*queue units) --> queue units

Example

in process = QUEUE FIFO ATTRIB(orders,completions,order size,0,
flat,flat,100,1,10) 

flat ((0,1),(1,1))

completions = QUEUE ATTRIB QUANTITY(in process,capacity * TIME STEP) / TIME STEP

Here flat is simply a flat Lookup so that the age distribution is even and the attribute distribution is constant at 1.

When necessary, this function will allocate part of the inflow from a later time to meet the quantity. If there is not enough in the queue to meet the target quant then the total amount in the queue will be returned.

Availability: Not PLE or PLE Plus

See also: QUEUE FIFO ATTRIB

Sample model: QUEUE ATTRIB functions.mdl in FunctionExamples