Numeric Source Block

dataSourceHelp

Description

The Numeric Source block provides a source of random variation using pseudo-random number generators. This block can also read numbers from a SAS data set or JMP data table.

A collection of discrete and continuous distributions are available, or you can provide the file path for the SAS data set or JMP data table along with the numeric variable column name.

The data provided by the Numeric Source block can be viewed as a stream of numbers, and the numbers are pulled from the stream one after another during a simulation. For example, each time a value is pulled from the OutValue port of a Numeric Source block, the block outputs a number from its current data stream by generating a sample from its related distribution or by reading a value from the data set, whichever is appropriate. If the last observation is reached when reading from a data set, the process resets to the beginning of the column.

The Numeric Source block provides three types of data streams: Theoretical, Fitted, and Data Driven. The Theoretical data streams include a collection of theoretical discrete and continuous distributions. The Fitted data streams are these same distributions that can be fitted using an input data variable (column) in a SAS data set or JMP data table. After the parameters of the distributions are estimated, the input data set is not needed during a simulation run. The Data Driven data streams require an input data set and include options such as empirical distributions and nonhomogeneous Poisson processes, in addition to the numeric SAS data column.

Fixed Ports

InUpdate

Input Boolean value port that signals an update of input data and stream parameter specifications. The new specifications are pulled from the InStreamPolicy or InDataPolicy ports (or both) if these ports are connected. A false Boolean value is ignored.

InStreamPolicy

Input string value port from which the new stream parameter specifications are pulled after an update signal is received. The format for specifying the value for the Theoretical data streams is as follows:
class==dataStreamClass;attribute1==attribute1Value;...;attributeN==attributeNValue;Random Stream Seed==seedValue
where:

dataStreamClass

is the fully-qualified Java class name of a data stream type.

attribute1

is the name of the first parameter associated with the specified data stream type.

attribute1Value

is the value of the first parameter associated with the specified data stream type.

attributeN

is the name of the last parameter associated with the specified data stream type.

attributeNValue

is the value of the last parameter associated with the specified data stream type.

seedValue

is the value of the random stream seed, with integer values in the range of 0 to the Java Long.MAX_VALUE.

For example, possible values for a string input value might be as follows:

class==com.sas.analytics.simulation.datastream.distribution.Exponential;Mean==10;Random Stream Seed==100

class==com.sas.analytics.simulation.datastream.distribution.Gamma;Scale==5;Shape==3.2

If you want to keep the same distribution but alter one or more parameter settings for the distribution, you only need to supply the information that is required for the parameter that you want to change. For example, if you are using a normal distribution and you want to change the mean value that is associated with the distribution, possible values for the string input value might be as follows:

Mean==1.2

Mean==10

The format for specifying the value for the Data Driven data streams is as follows:
Lazy Loading==BooleanValue;Random Stream Seed==seedValue
where:

BooleanValue

is either true or false.

seedValue

is the value of the random stream seed, with integer values in the range of 0 to the Java.Long.MAX_VALUE. The SAS Data Column type does not have the Random Stream Seed option.

OutValue

Output number port for the numeric values to be pulled.

Dynamic Ports

InDataPolicy

Input string value port from which the new input data specifications are pulled after an update signal is received. This port is available only for the Data Driven data streams. The format for specifying the value is as follows:
attribute1==attribute1Value;attribute2==attribute2Value;...;attributeN==attributeNValue
where:

attribute1

is the name of the first parameter associated with the specified Data Driven Type.

attribute1Value

is the value of the first parameter associated with the specified Data Driven Type.

attributeN

is the name of the last parameter associated with the specified Data Driven Type.

attributeNValue

is the value of the last parameter associated with the specified Data Driven Type.

For example, possible values for a string input value for the Discrete Empirical Data Driven Type might be as follows:

File Path==C:\SimStudio\projects\discemp1.sas7bdat;X==age;Y=pmf

X=group2;Y=prob2

Dialog Box Controls

Specify the type of data stream to be provided by this Numeric Source block.

When the Theoretical type is selected, the following dialog box controls are available:

Type

From the list, select the distribution to sample from. The Parameters section will be updated to reflect the distribution.

Stream Parameters

This area provides fields for modifying the parameter values associated with the selected distribution. Each distribution has a Random Stream Seed entry field. Although Simulation Studio automatically assigns a different seed for each source of randomness, you can use this field to specify the seed value. Valid values for this field are integers in the range of 0 to the Java Long.MAX_VALUE.

Reset Sampling at Update

This option can be used to reset the random substream for the current replication during a simulation run. If selected, this option resets the random substream back to the beginning when a true Boolean value is received at the InUpdate port. By default, this option is not selected.

When the Fitted option is selected, the following dialog box controls are available:

Input Data

This area provides fields to specify the file path of input SAS data set or JMP data table and the variable (column) name for distribution fitting. Click Fit Distribution to send the fitting request to the JMP program to perform the fitting. If you do not provide the file path or variable name, you can provide these directly using the JMP user interface before the fitting operation proceeds. The fitting results can be sent back from the JMP program to update the rest of the dialog box contents, including the associated distribution Type and Stream Parameters controls described below. You can also use these controls to edit the parameters.

Type

From the list, select the distribution to sample from. The Parameters section will be updated to reflect the distribution.

Stream Parameters

This area provides fields for displaying and modifying the parameter values associated with the selected distribution. Each distribution has a Random Stream Seed entry field. Although Simulation Studio automatically assigns a different seed for each source of randomness, you can use this field to specify the seed value. Valid values for this field are integers in the range of 0 to the Java Long.MAX_VALUE.

Reset Sampling at Update

This option can be used to reset the random substream for the current replication during a simulation run. If selected, this option resets the random substream back to the beginning when a true Boolean value is received at the InUpdate port. By default, this option is not selected.

When the Data Driven option is selected, the following dialog box controls are available:

Type

From the list, select the distribution or data stream to sample from. The following Input Data and Stream Parameters section will be updated to reflect the selection.

Input Data

This area provides fields to specify the file path of an input SAS data set or JMP data table and the variable or column names. The Load from Remote SAS Workspace Server checkbox indicates that the input SAS data set file is to be loaded from the remote SAS Workspace Server host specified in the Configuration dialog box.

Stream Parameters

This area provides fields for modifying the parameter values that are associated with the selected distribution or data stream. The Discrete Empirical, Empirical, NHPP Count, and NHPP Rate type have a Random Stream Seed entry field. Although Simulation Studio automatically assigns a different seed for each source of randomness, you can use this field to specify the seed value. Valid values for this field are integers in the range of 0 to the Java Long.MAX_VALUE.

All Data Driven types have the Lazy Loading Boolean field. If the Lazy Loading field is false, the input data set file has to be loaded at the start of simulation. Otherwise, the data file is loaded only when its contents are needed during simulation.

Reset Sampling at Update

For the SAS Data Column type value, this option resets the current data set back to the first observation when a true Boolean value is received at the InUpdate port. If the InDataPolicy port is also connected and a new data set is specified, then the new data set starts at the beginning with the first observation if the Reset Sampling at Update option is selected. For the Discrete Empirical, Empirical, NHPP Count, and NHPP Rate type values, this option, if selected, resets the random substream for the current replication back to the beginning when a true Boolean value is received at the InUpdate port.

Candidates for Design of Experiments

Factors

DataStreamDescription(text), InputDataPolicy(text), ResetStreamAtUpdate(Boolean)
When the Theoretical option is selected, the format for specifying the value of the DataStreamDescription factor is as follows:
class==dataStreamClass;attribute1==attribute1Value;...;attributeN==attributeNValue;Random Stream Seed==seedValue
where:

dataStreamClass

is the fully-qualified Java class name of a data stream type.

attribute1

is the name of the first parameter associated with the specified data stream type.

attribute1Value

is the value of the first parameter associated with the specified data stream type.

attributeN

is the name of the last parameter associated with the specified data stream type.

attributeNValue

is the value of the last parameter associated with the specified data stream type.

seedValue

is the value of the random stream seed, with valid integer values in the range of 0 to the Java Long.MAX_VALUE.

For example, possible values for a DataStreamDescription factor might be as follows:

class==com.sas.analytics.simulation.datastream.distribution.Exponential;Mean==4

class==com.sas.analytics.simulation.datastream.distribution.Normal;Mean==1;Std Dev==2

If you want to keep the same distribution but alter one or more parameter settings for the distribution, you only need to supply the information that is required for the parameter that you want to change. For example, if you are using an exponential distribution and you want to change the mean value associated with the distribution, possible values for the DataStreamDescription factor might be as follows:

Mean==4

Mean== 4.5

When the Data Driven option is selected, the format for specifying the value of the DataStreamDescription factor is as follows:
Lazy Loading==BooleanValue;Random Stream Seed==seedValue
where:

BooleanValue

is either true or false.

seedValue

is the value of the random stream seed, with integer values in the range of 0 to the Java.Long.MAX_VALUE. The SAS Data Column type does not have the Random Stream Seed option.

When the Data Driven option is selected, the format for specifying the value of the InputDataPolicy factor is as follows:
attribute1==attribute1Value;attribute2==attribute2Value;...;attributeN==attributeNValue
where:

attribute1

is the name of the first parameter associated with the specified Data Driven Type.

attribute1Value

is the value of the first parameter associated with the specified Data Driven Type.

attributeN

is the name of the last parameter associated with the specified Data Driven Type.

attributeNValue

is the value of the last parameter associated with the specified Data Driven Type.

For example, possible values for the InputDataPolicy factor for the SAS Data Column Data Driven type might be as follows:

File Path==C:\SimStudio\projects\data1.sas7bdat;Variable Name==age

Variable Name==cost

Responses

None