SIMPROCESS® - Model Fit


ModelFit™ Automated Distribution Fitting - User Defined Distributions

There are three methods for creating User Defined Distributions listed on the Define pull-down menu. The first, Standard…, customizes an existing SIMPROCESS distribution. The second, Tabular…, creates a statistical distribution from discrete data points using a table format. Auto Fits... automatically fits a distribution from sample data at the beginning of a simulation. The sample data can be in an ASCII file, spreadsheet, or database. ModelFit is used to perform the distribution fitting. (See Help/About SIMPROCESS... for information on ModelFit.) Note that the Auto Fit feature is licensed separately from SIMPROCESS. These User Defined Distributions can be used anywhere in the model where a statisticaldistribution is specified.

Auto Fits Distributions - creates a statistical distribution from sample data, on request or at the beginning of a simulation, using ModelFit. The sample data can be read from an ASCII file, spreadsheet, a database or a combination of these. Once you are finished entering the data, choose OK and the Auto Fit Distribution you have just defined is added to the list box. This distribution can now be used anywhere in the model where a statistical distribution is specified.

Up to three data sources, one of each of the types below can be used. The data retrieved from all sources will be used to construct a list of numeric values. The combined list will be passed to ModelFit to attempt to obtain a fitted distribution.

File
Check Use File Data Source to use an ASCII file as a data source. The Browse button can be used to locate the desired file. It is recommended that the file be in the model's directory. The file must contain a single numeric value on each line, with no headers or other non-numeric information present.
Spreadsheet
Check Use Spreadsheet Data Source to use a spreadsheet file as a data source. The Browse button can be used to locate a spreadsheet file, which can be an Excel Workbook file or an XML Spreadsheet file. It is recommended that the file be in the model's directory. These other fields are also required:
  • Sheet Name: The name of the worksheet in the selected spreadsheet file from which data will be read.
  • Starting Row: The first row from which data should be read. Note that row numbers are numeric, rather than alphabetic as they appear in Excel, so Row A would be entered as 1, Row B as 2, etc.
  • Column: Enter the column number from which the sample data will be read.
Both the Starting Row and Column fields are distributions. Thus, these values can be parameterized, (with values such as Evl(Model.StartRow) or Evl(Model.Column) , for example, where model attributes are used). Note that the Read Data and Fit Now buttons described below cannot be used when such parameterization is used. Data will be read from the column specified, beginning at the starting row indicated, continuing downward until an empty cell is found.
Database
Check Use Database Data Source to use an SQL database as a data source. The following fields are required:
DSN/Properties File: This field should contain the information needed to connect to the database. It may contain a DSN (Data Source Name) defined in the Windows ODBC control panel, or the name of a properties file containing necessary connection information. See Chapter 13 of the SIMPROCESS User's Manual for more information on using databases with SIMPROCESS and for the contents of a properties file, which is optional on Windows and required on other platforms.
SQL Query: Enter an SQL statement which will return the sample data when executed. The query may be parameterized by using model attributes. For example, the SQL statement "Select TIME_VALUE from TimeTable" can be changed to "Select Model.TableColumn from TimeTable" to allow the name of the column to be determined at simulation time by substituting the value of the designated model attribute. In fact, any portion of the SQL statement which containing the string "Model." (case sensitive, and including the "dot") will indicate that such parameterization has been done, and the resulting statement must be syntactically valid in order to obtain data for distribution fitting. (Note that such parameterization will prevent use of the Read Data or Fit Now buttons described below.) Only one column of data is read from the query results, and it must be numeric. Therefore, any query returning multiple columns of data is allowable if the first is numeric.
Buttons
View Data: When no data sources are parameterized (see the descriptions of Spreadsheet and Database data sources above), clicking this button will attempt to build a list of numeric values from all sources. It will report any errors it encounters. In the dialog which follows, it will display a scrollable list of the numeric values returned on the left and summary statistics about the sample data on the right. In order to obtain summary statistics, there must be no less than two samples.


Fit Now: When no data sources are parameterized (see the descriptions of Spreadsheet and Database data sources above), this button will first attempt to read from all data sources. If successful, it will pass the returned list of numeric values to ModelFit to obtain a fitted distribution. If the returned distribution is valid for SIMPROCESS (see statistical distributions for more information), it will be formatted and placed into the Fitted Distribution field.

Distribution Fitting Hints
The checkboxes labeled Set Default Type and Set Default Bounds allow for supplying "hints" to ModelFit about the sample data. Selecting Set Default Type enables a choice of Continuous (the default) or Discrete. Selecting Set Default Bounds enables setting values for the lower and upper bounds. In Enter Lower Bound Value, values of "-Infinity" and "0.0" are offered, as these are commonly used lower bound values. Other values can be entered as desired. In Enter Upper Bound Value, the commonly used upper value of "Infinity" is provided, but other values can likewise be entered here. When bounds are used, the upper bound value must be greater than the lower bound. If neither of these checkboxes is selected, no hints will be provided to ModelFit. See Auto Fits Distributions in Chapter 3 of the SIMPROCESS User's Manual for more information.

Always Execute Auto Fit at Simulation Start: Checking this will cause automatic distribution fitting from the data sources defined above each time simulation starts. Any Auto Fit Distribution without a Fitted Distribution value will automatically be fitted at simulation start irrespective of this setting. This will include any Auto Fit Distribution defined via this dialog without using the Fit Now button.

Stream: Select the starting value for the random number stream to be used when drawing random samples from the fitted distribution.

Fitted Distribution: When an Auto Fit distribution has been fitted, the result will be displayed in this field. The contents of this field are editable, which allows moving the cursor around in order to view any portion that may not be visible. Any changes made to the field are discarded immediately upon leaving it, which includes clicking any button or other field on this dialog. Any text selected in this field can be copied to the system clipboard using platform-specific keyboard commands so that it can be pasted elsewhere as needed. The details button at the right of this field can be used to view the individual parameters of the fitted distribution, as well as to view a plot of the distribution. Any changes made in the detail dialog will not be reflected in this field.

ModelFit Warnings: When the Fit Now button is selected, this field will contain the text of any warnings returned by ModelFit as it examines the sample data. Text in this field can be selected using the mouse and platform-specific keyboard commands can then be used to copy it to the system clipboard, from which it can be pasted elsewhere if needed.