Traffic / Traffic
Block Name: Traffic

Code File Location: VisualSim/actor/lib/DS_Source


Block Overview

  o  Generate traffic based on distribution.

  o  Multiple instances of Traffic can exist in a model.   

Description

Traffic block outputs a new Data Structure (DS) at time intervals specified by the "Time_Distribution" setting. A Data Structure is a transaction containing a list of Field Names + Values. A template file containing the list of field names and initial values is specified in a .TXT or compiled .JAVA file. The name of this file is specified in the Data_Structure_Name parameter or listed in fileName parameter. To understand the Name parameter, view the Define Data Structure Example in the BDE. The fileName path uses the standard format.  Value1 and Value2 are attributes of the different distributions.

To understand the different distributions supported and the required value attributes, view the Traffic Example (VS_AR/doc/Training_Material/General/Source/Distribution.xml) in the BDE.


Parameter

Explanation

Type

Example

Data_Structure_Name

Default Value: "Header" outputs a Data Structure containing the 6 Header fields only. Additional fields maybe dynamically created in the dataflow using Expression or Decision blocks. 

User can add any data structure using the format shown in Type and the associated examples

A special Data Structure name called "Pulse" will generate a constant value of "1" for each output. 

The "Processor_DS" is a special data structure template that has all the required for fields for the Hardware Architecture blocks.

An integer number can also be entered within "" to output a integer value. This is a fixed value.

The .txt or .class extensions must not be added to the file name in this parameter. This is of type string and the file name must be within "". Refer DataStructure Demo Model for more details.

File name if located in the $VS/VisualSim/data directory.

Processor_DS

Relative path + file if located under $VS install directory.

VisualSim.data.Processor_DS

Absolute path is required for accessing files located anywhere.

"C:.VisualSim.DS.Processor_DS" on Windows and ".VisualSim.DS.Processor_DS" on Unix/Linux.

fileOrURL

This parameter selects a data structure template fileusing the Browse button.  This Parameter is an alternate to the Data_Structure_File field above.  If the user defines a file name here, the above parameter is not considered.

File Parameter format

C:/VisualSim/Data_Structure_Name.txt

(or)

C:/VisualSim/Data_Structure_Name.class


The user can link this to a fileParameter in the window.

Start_Time

This Parameter is the time delay before the first data structure is generated. The Default Value : 0.0 which is equal to one(1) TimeResolution value.

Double

0.0

Value1

Value1 is a parameter for the Time_Distribution. This is in units of time where 1.0 = 1 Second. Based on the selected distribution, this value will be used differently.

Double

1.0

Value2

Value2 is a parameter for the Time_Distribution. This is in units of time where 1.0 = 1 Second. Based on the selected distribution, this value will be used differently.

Double

2.0

Random_Seed

Random Number Seed, is the seed for the Distribution and used to determine the beginning random sequence of Data Structures generated. The value can be any number ending with L.

Long

12345L

Number_of_Transactions

Restricts the number of tyransactions that are sent from this block.  Once this number has been reached, no additional transactions will be sent out even if the Simulation Time has not completed.

Integer

123

Time_Distribution

This attribute consists of five types. Refer to the section below on Distributions for more details.  Also, look at the Traffic Demo Model for more details.

-

-



Port

Explanation

Type

Output

This is the port that the generated Data Structures are sent on.

General




Distribution

Value1

Value2

Single Event

This generates a single Data Structure.

-

-

Fixed (Mean)

This generates a Data Structures at fixed time intervals. The time interval is value in the 'Value1' parameter.

Fixed interarrival time

-

Uniform (Minimum, Maximum)

This Generates a Data Structure at variable time interval that is computed based on a Uniform Distribution with 'Value1' (minimum) and 'Value2' (maximum) parameters.

Minimum time

Maximum time

Exponential (Mean)

This generates a Data Structure at variable time interval computed based on a Exponential Distribution with 'Value1' as the Mean of the distribution. 

Mean time

-

Normal (Mean, Standard_Deviation)

This generates a Data Structure at variable time interval that is computed based on a Normal Distribution with 'Value1' as the Mean of the distribution and 'Value2' as the standard deviation of the distribution.
Note: Standard Deviation (Value_2) = 1/4 * Mean                                                                         (Value_1)

Mean time

Standard deviation time