Connecting Models to Live Data
By Nancy Zupick, Consulting & Support Manager
Published: January 23, 2017
Categories: Tips & Tricks
There are various methods of reading in data to a model in Arena, one of the more popular methods is the Direct Read feature which allows you to read in data directly to Variables and Expressions. Variable data can be read in at the beginning of the simulation; replication or prior to the model being compiled (PreCheck). Expressions only allow you to read in data prior to the model run so the PreCheck option is the only one available and defined by default.
To highlight how this feature works, the Arena SMARTS example: External Data Files Read Expressions from Excel.doe will be used as a small example of this very powerful feature. (Arena’s SMARTS files are located in the directory C:\Users\Public\Documents\Rockwell Software\Arena)
To begin, of course we need to start with the data, in the example you will find that a file: Populate Expression.xls has been referenced and given the name File Read Expressions from Excel.
Two recordsets have been defined and these are referencing Named Ranges from within the Excel file itself.
The next step after getting the file set up is to create a link between the Arena element and the recordset. In the example below, exp_Process Time references the Arena file name to use and the Recordset within the file that has the data needed for this expression.
Once the data has been linked to the Variable or Expression, you can change the data in Excel and have the Arena model updated accordingly.
Applications of this feature include:
- Reading in large data sets at the beginning of model run to be used over the course of the simulation instead of reading in information as each entity is created.
- Reading in schedule data
- The ability to simplify the entry of data for variables and expressions for users who use the simulation for analysis but are not as familiar with Arena.
Sign up for the Newsletter
Arena User Group
Arena has a very active user community on LinkedIn. Ask questions, learn about best practices and connect with other simulation professionals.