 EZStrobe Queues & Properties

EZStrobe Queues

Queues are Activity Cycle Diagram (ACD) nodes that hold resources. Resources enter a Queue by initialization at the start of simulation, or when instances of activities that precede the Queue finish and release resources. Resources are removed from a Queue when a Combi activity starts (creates an instance of itself) and draws resources from a directly-preceding Queue.

The ACD fragment below shows a Queue that is initialized with 16 resources. This Queue has two incoming links: one link from the Pred activity (could be a Normal or a Combi) that releases 3 resources to the Queue whenever an instance of Pred finishes; and another link from some other activity (not shown) that releases 1 resource whenever its instances finish. Outgoing links can only connect a Queue to the directly-succeeding Combi activities that draw resources from it. In the ACD below, two Combi activities draw from Queue: the Succ Combi which draws 6 resources whenever it starts, and some other Combi at the right (not shown) which draws 1 resource.

In the ACD above, only the name of the Queue and its initial content are specified in the Queue Properties form. To bring up the the Queue Properties form double-click the Queue. The other information shown is defined by the links that release resources to, or that draw resources from, the Queue.

Queue Statistics

As a simulation proceeds, a Queue collects statistics that are calculated on the basis of a graph of Queue content as a function of simulation time like the one shown below:

The graph above extends from simulation time 0 to simulation time 1.9. Imagine that the graph is drawn by initially setting the pencil down at point (0,0) and then drawing as indicated by the arrow heads without ever lifting the pencil up.

The table below shows Queue statistics, how they are calculated, and how they can be accessed in formulas (shown in parenthesis below the Queue statistic name). For the example calculations in this table, it is necessary to know "the area under the graph" (15.1 res-time units) as well as the area under a graph of the content squared (126.3 res2-time units).

 Current Content (Queue.CurCount) The current content is the height of the graph at the pencil's last position. In the graph above this is 10 res units. Average Content (Queue.AveCount) The average height of the graph. Obtained by dividing the area under the graph by the simulation time. In the graph above the average content is 15.1/1.9=7.95 res units. Content Standard Deviation (Queue.SDCount) The standard deviation of the height of the graph. Indicates the variability of the content.  If M denotes the area under a graph of the content squared, the Standard Deviation is sqrt[(M/SimTime)-AveCount2]. In the graph above the standard deviation of the content is sqrt[(126.3/1.9)-7.952]=1.82 res units. Minimum Content (Queue.MinCount) The height of the graph at its lowest point. Considering the part of the graph after the Queue has been initialized. In the graph above the minimum content is 4 res units. Maximum Content (Queue.MaxCount) The height of the graph at its highest point. In the graph above the maximum content is 16 res units. Total Content (Queue.TotCount) The total number of resource units that have entered the Queue. Obtained by adding the length of all the "up" movements of the pencil, shown in red in the graph above. The total content of the graph above is 34 res units. Average Wait (Queue.AveWait) The average time spent by resources in the Queue. This is obtained by dividing the area under the graph by the Queue's Total Content. The average wait thus considers the time that resources currently in the Queue have been waiting, not just those that have already left. The average wait in the graph above is 15.1/34=0.44 time units. Last Amount Received (Queue.LastAmtReceived) The length of the last "up" movement of the pencil. The last amount received in the graph above is 1 res unit.

EZStrobe can collect more detailed statistics about Queues than those mentioned above. If Microsoft Excel is available, EZStrobe can also create a chart of Queue content as a function of time.

The Queue Properties form has two pages. To invoke it, double-click the Queue. The first page, Basic Properties, is shown below.

The Graph population vs time option tells EZStrobe to create in Excel a graph of Queue content as a function of time. It should be noted that this option slows down simulation significantly and produces graphs that need to be customized in Excel to suit specific needs. However, when selected for Queues whose content over time is of interest, it is very useful. The Queue Statistics Graph above is an example of a customized chart. The graphs produced by EZStrobe include markers for each point and a thick line type, which make these graphs attractive only when they contain a handful of data points. Hiding point markers and reducing the portion of the graph that is visible by adjusting the x-axis properties are typically necessary to make these graphs attractive.

The Collect statistics in bins option tells EZStrobe to collect the data needed for a histogram of Queue content as a function of time. The number of bins specified in the Bins field are created between the From and To values. Underflow and overflow bins are also created. The binned statistical output will appear in the simulation report in the Stroboscope IDE and, for 14 bins between 4 and 18, will look as follows:

Content     TotTime  %Time
=============================
< 4.00        0.00   0.00
< 5.00        0.05   2.63
< 6.00        0.15   7.89
< 7.00        0.50  26.32
< 8.00        0.85  44.74
< 9.00        1.05  55.26
< 10.00        1.40  73.68
< 11.00        1.80  94.74
< 12.00        1.90 100.00
< 13.00        1.90 100.00
< 14.00        1.90 100.00
< 15.00        1.90 100.00
< 16.00        1.90 100.00
< 17.00        1.90 100.00
< 18.00        1.90 100.00
>= 18.00        0.00   0.00

The output above indicates, for example, that the percentage of time that the Queue contained less than 7 resources was 26.32%, and that the total time that the Queue content was greater than or equal to 7 but less than 8 was 0.85-0.50=0.35 time units.

Integral Statistics

The second page of the Queue Properties form, Integral Statistics, is for the collection of statistics for the Queue on the basis of a larger unit than that modeled by the Queue. The Integral Statistics page for the model used in Multi-Step Activities in EZStrobe - 2, Non Identical or Non Consecutive Steps is shown below. Please see that page for a detailed explanation of Integral Statistics. In essence, rather than plotting Queue contents as a function of time, the Integral Statistics option first divides the Queue contents by Divisor and then graphs only the integer portion of the result.