Building the Model: Advanced Elements > External Files > File Types

File Types

External files may be defined as one of several types depending upon the purpose of the file.

General Read File

A General Read file contains numeric values read into a model using a READ statement. Values must be separated by a space, comma, or end of line. Any non-numeric data will be automatically skipped when obtaining the next numeric value. See Read for correct syntax and examples. For example, if you specify a normal distribution such as N(5,1) in the General Read file, ProModel will not return a numeric value following the distribution. Instead, it will read in the first value, 5, and the next value, 1.

 

A General Read file must be an ASCII file. Data created in a spreadsheet must be saved as a text file.

General Write File

A General Write file is used for writing text strings and numeric values using the WRITE and WRITELINE statements. Text strings are enclosed in quotes when written to the file, with commas automatically appended to strings. This enables the files to be read into spreadsheet programs like Excel or Lotus 1-2-3 for custom viewing, editing, and graphing. Write files may also be written to using the XWRITE statement which gives the modeler full control over output and formatting. See Write, WriteLine, or Xwrite for correct syntax and examples.

 

If you write to an external file during multiple replications or a single, independent run, the data will be appended to the data from the previous replication. However, if the RESET statement is used, the data is overwritten for each replication.

Entity-Location File

An Entity-Location file (or expression file) is an Excel spreadsheet file containing numeric expressions listed by entity and location name. Entity names should appear across the top row, beginning in column 2, while location names should be entered down the first column, beginning on row 2. A numeric expression for each Entity-Location combination is entered in the cell where the names intersect. An example of a spreadsheet file is shown next.

To use the value stored in an Entity-Location file as an operation time, call out the file identifier in the operation logic as shown in the following example. (In this example, “SvcTms” is the File ID of the desired Entity-Location file.)

Please Note: If the Excel file contains more than one sheet of data, only the first sheet will be read in.

Process Table

Entity...

Location...

Operation (min)...

EntA

Loc1

WAIT SvcTms()

Routing Table

 

Output...

Destination...

Rule...

Move Logic...

1

EntA

Loc2

FIRST 1

MOVE FOR 5

By specifying SvcTms() with no arguments in the parentheses, a value is returned from the Entity-Location File “SvcTms” for the current entity at the current location, i.e., EntA at Loc1. You may also return the value stored in any other cell of an Entity-Location file by explicitly specifying the entity and location names in the parentheses, e.g., SvcTms(EntB, Loc1) or SvcTms(EntC, Loc2).

Arrivals File

An Arrivals file is a Excel spreadsheet file containing arrival information normally specified in the Arrival Editor. One or more arrival files may be defined and referenced in the External Files Editor. Arrival files are automatically read in following the reading of the Arrival Editor data. The column entries must be as follows:

 

Column Data

A Entity name

B Location name

C Quantity per arrival

D Time of first arrival

E Number of arrivals

F Frequency of arrivals

G through... Attribute assignments

 

Columns A through F may have any heading desired as long as the data is of the proper type. If attributes are to be assigned, columns G and higher should have headings that match the names of the attributes being assigned. The following example illustrates these points.

Example

The values in the spreadsheet cells must be a numeric expression as opposed to a formula commonly used in spreadsheets. For example, if cell E4 in the spreadsheet above was actually a formula generating the value 100, the value ProModel generates is zero. ProModel only recognizes expressions for the Qty, Time, Number, and Frequency columns in a spreadsheet.

 

When defining an External Arrivals File, you do not need to define arrivals in the Arrivals edit table. If several entities are scheduled to arrive at the same time, entities arrive in the system according to the order in which they appear in the arrival list. However, when there is more than one occurrence for the arrival record, the next entity will not arrive until the frequency has elapsed. Meanwhile, other entities listed below the record may be allowed to arrive.

Please Note: If the time of the first arrival is zero and there is only one arrival of some quantity, you do not need to complete additional cells. Likewise, if there is only one arrival at a time other than zero, you do not need to fill in additional cells after the Time entry.

Please Note: If the Excel file contains more than one sheet of data, only the first sheet will be read in.

Shift File

A Shift file type is automatically created in the External Fields table when you assign a calendar to a location or resource. If calendars have been assigned, they will be automatically added as a Shift record type in the External Files table. If no path is listed for the calendar file, ProModel will first search in the directory where the model exists and then in the default models directory specified in the application Options.

Please Note: Creating a shift file record in the External Files Editor should not be done. It is done automatically through the shift assignment.

DLL File

A DLL file is needed when using external subroutines through the XSUB() function. See Subroutines for more information.

Array File

An Array file record is automatically created in the External Files table when you define an Excel file as the Import or Export file for an array. When a file has been assigned to an array, it will be automatically added as an Array record type in the External Files table. If no path is listed for the file, ProModelwill first search in the directory where the model exists and then in the default models directory specified in the application Options.

Other External Files

In addition to allowing the user to define external files, ProModel creates other external files. ProModel automatically creates and/or opens files depending on the specifications in the model. Below is a description of the different files ProModel creates (* indicates files that remain open while the model is running):

 

Extension Type Description

CSV ASCII Export Data (comma delimited)

MOD* Binary Model File

RDB Binary Output Database (basic statistics)

RDT Binary Output Time Series data

SED* Binary Seed File used to store seed values for each replication

TRC* ASCII Trace File

GLB Binary Graphic Library Files

PMOV ProModel Output Viewer Settings File that stores all the settings and options for reports and charts so they can be recreated when viewing simulation results in Output Viewer.

PMCAL ProModel Calendar File

Open Files

Depending on the model specifications, there may be some occasions where several files need to be open simultaneously to execute the model. There is a feature which allows the user to access up to 255 open files at any time. The [General] section of the promod.ini file contains the following statement: OpenFiles=n where n is the number of files between 20 and 255. The default is 40. To change the number of available open files, simply edit thepromod.ini file such that OpenFiles equals the desired number and then restart ProModel. There is also the option to close files using the CLOSE statement. See Close.


© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com