Stats-In_Memory

Parent Previous Next

Result / Statistics Generator 
Block Name: Statistics-In_Memory

Code File Location: VisualSim/actor/lib/Stats_Memory

Block Overview

  o  Compile the statistics for a sequence of scalar values- integer, double or long. The statistics are updated in a memory specified by the memory_name and memory_type parameters of the block.  This memory value can be accessed from any Virtual Machine, Processing or Decision blocks like any other Memory location.  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.

Description

    This block updates statistics based on the token arriving on the stats_data port.  The statistics are updated in a memory specified by the memory_name and memory_type parameter. 

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 data structure.  The data structure is stored in the Memory and is never output.

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 Profile_Statistics Demo Model.

BLOCK Stats_Basic             DS_NAME   Basic_Stats                  
DELTA 0.0                     TIME      5.625067999999972E-7         
INDEX 0                       ID        69                           

Statistic_Name                String    Queue_Length                 
Number_Values                 int       2513                         
Min_Value                     double    0.0                          
Mean_Value                    double    1.112216474333466            
StDev_Value                   double    0.8256330697465197           
Max_Value                     double    4.0                          
Mean_95_Confidence            double    0.0322803536050639           
Data_95_StDev_196s            double    1.618208684980151            



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
 Xσ = Math.sqrt ((1 / n) * ((X1 - Xµ)2 + (X2 - Xµ)2  + … + (Xn - Xµ)2))

STDEV_90_PCT = 1.6448530004790

STDEV_95_PCT = 1.9599610823207

STDEV_99_PCT = 2.5758345145732

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.


Field Detail

Statistic_Name

public Parameter Statistic_Name


Sample_Every_Nth_DS

public Parameter Sample_Every_Nth_DS


Batch_Count_Min_Max

public Parameter Batch_Count_Min_Max


Statistic_Type

public StringAttribute Statistic_Type


Memory_Name

public Parameter Memory_Name


Memory_Type

public StringAttribute Memory_Type


input

public TypedIOPort input


Created with the Personal Edition of HelpNDoc: iPhone web sites made easy