Results / Statistics
Block Name: Statistics
Code File Location: VisualSim/actor/lib/Stats_Basic
o Compile the statistics for a sequence of scalar values- integer, double or long. For example, the input can be the current throughput. The output at the end of the simulation can show the range of the throughput during the period of the simulation. Similar experiments can be performed on latency, data size, read/write memory etc.
This block collects data arriving on the input and continuously computes the statistics.
This statistics block can sample every Nth data input. If the user wishes to collect the maximum statistical information, then one would set the 'Sample_Every_Nth_DS' parameter to 1 (default).
The 'Batch_Count_Min_Max' parameter is normally set to 1 0.0 100.0, where the first number indicates the number of batches (1), the second number indicates the start time (0.0), the last number indicates the stop time (100.0). The stop time can also be set to 'tstop', which will be interpreted by the block to insert the end of the simulation time.
The "Statistics_Name" field is printed in the BLOCK field of the output data structure.
When the stats_trigger port is triggered, current values of the statistics are reported on the stats_out output port. When the stats_reset input port is triggered, all statistics in the block is reset. Both these ports can be fired at any time during the simulation. The Histo port will output the histogram of the sequence values- X-axis will be the value and Y-axis will be the number of occurances of each column.
Refer Statistics Demo Model.
Statistic Name |
Explanation |
Mathematical Equation |
Sample Values |
Type |
Statistic_Name |
Unique name to identify the output. Added to the field called Statistics_Name in the output data structure. |
- |
Queue_Length |
String |
Number_Values |
Number of entries to this block and used to calculate the statistics. |
- |
2513 |
int |
Min_Value |
Minimum queue size during the simulation. (Value opposed to time delay or occupancy). |
// Obtain Min for X, where X0 = Double.MAX_VALUE if (Xn < Xn – 1) Xmin = Xn |
0.0 |
double |
Mean_Value |
Mean/Average queue size during the simulation (Value opposed to time delay or occupancy). |
// Obtain Mean for X Xµ = (1 / n) * (X1 + X2 + … + Xn) |
1.112216474333466 |
double |
StDev_Value |
Standard Deviation from the Mean queue size during the simulation.(Value opposed to time delay or occupancy). |
// Obtain Standard Deviation for X |
0.8256330697465197 |
double |
Max_Value |
Maximum queue size consumed during the simulation. (Value opposed to time delay or occupancy). |
// Obtain Max for X, where X0 = Double.MIN_VALUE if (Xn > Xn – 1) Xmax = Xn |
4.0 |
double |
Mean_95_Confidence |
The 95% confidence intervals is used to indicate the reliability of an estimate. How likely the interval is to contain the parameter is determined by the confidence level or confidence coefficient. The confidence level is 95%. |
// Obtain 95% Confidence Interval for Mean. Xµ95 = STDEV_95_PCT * (Xσ / Math.sqrt(n))) |
0.0322803536050639 |
double |
Data_95_StDev_196s |
This is the standard deviation of the confidence interval. |
// Obtain 95% Confidence Interval for Mean. Xµ95 = STDEV_95_PCT * (Xσ / Math.sqrt(n))) |
1.618208684980151 |
double |
Where n is the number of samples and X is occupancy or delay.
Parameter |
Explanation |
Type |
Example |
Statistic_Name |
Unique name for this block that will be printed in the BLOCK name field of the output data structure. |
String |
"Statistic_Name" |
Sample_Every_Nth_DS |
Sample every Nth data structure can be used for the purpose of computing the statistics, every value can be used (1) or every (Nth) value. |
Integer |
1 |
Batch_Count_Min_Max |
Collect N batches (int), starting at Min time (double), end at Max time (double). The number of batches can be 1. |
List of 3 integers in a string or parameters |
"1 0.0 TStop" |
Port |
Explanation |
Type |
stats_data |
This is an input port for the data samples. |
General |
stats_trigger |
This is an input port that triggers the current statistics to be placed on the output port. |
General |
stats_reset |
This input port reset all internal statistics. |
General |
histo_output |
The values can be plotted on a histogram Plotter block in VisualSim. |
Double |
output |
Output the current Statistics when trigger on the stats_trigger port. |
General |
Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation