In the previous post in this series, we mentioned that data-driven modeling in Simio may be stripped down to two key steps: getting data into Simio, then using the data to drive Simio model objects and processes. In this post, we’ll focus on how Simio Data Tables can be used to facilitate data-driven modeling and integration with external applications.
Simio Data Tables store tabular data using a standard row/column structure where individual data items can be dynamically referenced using standard Table[Row, Column] or Table[Row].ColumnName functions. The real power though comes with using Row References to map specific table rows to Simio Objects or Tokens. Once a Row Reference is set, data items are referenced using the Table.ColumnName and the specific table row is inferred from the Row Reference. This facilitates data-driven modeling where significant amounts of the model logic, and properties are specified using Data Tables.
Getting Started
Consider a customer service system model where Server objects are used to represent individual customer service processes, Entities are used to represent customers, and the processing times at the Servers depend on the customer type and the step in the customer’s processing sequence. By setting a Row Reference when an Entity is created and the customer type is known, subsequent processing in the model uses the Row Reference to directly access the customer-type specific data. As such, the Server object properties are independent of customer type since the type-specific data is stored in the table! This eliminates the need to use conditional logic to react to the customer type at each Server. Moreover, it is simple to add new customer types and experiment with different processing characteristics, customer arrival rates and the mix of customer types by editing the Data Tables rather than the model object properties and logic directly.
Defining the Table Structure
Creating Data Tables is an easy process where you define the table structure by specifying the data type for each column. Simio supports a variety of data types including standard types such as integer, real, string, DateTime, and Boolean as well as Simio-specific types such as Expression, Object reference, Element reference, and many others. For example, in the customer type table of our customer service system, we might define the customer type using an Object Reference column, the processing time for that customer type using an Expression column, and the customer priority using an integer column. Here, when a customer entity is created, the object type is specified in the table rather than hard coded in the Source object. Similarly, when the entity arrives at a Server, the priority and processing time are read from the table rather than being hard coded in the Server object.
Entering Data into the Table
After defining the structure of a table, there are three basic ways to enter data into the table – manually, as you would with a spreadsheet; using copy-and-paste from the Windows Clipboard (for example, copying to the Clipboard from an Excel worksheet and pasting from the Clipboard directly into a Simio Data Table); and importing/exporting data using a Data Binding. Manual data entry and copy-and-paste are easy to use methods for adding/editing relatively small amounts of data but can get tedious for large amounts and/or frequently changing data. This is where the use of Data Bindings shines!
Data Bindings connect Simio Data Tables to external data sources such as CSV files, Excel Workbooks, databases, and Web API URLs for easy importing and exporting. An example use case with our customer service center model might involve binding a Simio Arrival Table to a database of historical customer arrivals and using the Simio model to experiment with alternative system configurations using the actual customer arrival data. Another use case might involve using an Export Binding to write model run data to an Excel Workbook for detailed analysis using an external data analysis tool such as PowerBI or Tableau. Using Data Bindings significantly simplifies data input/output and provides a conduit to integrate Simio models with other desktop, enterprise, and cloud-based applications.
Finally, Simio Data Tables implement the relational data model using Key Columns and Foreign Keys. This allows you to “connect” related tables using common fields so that when you set a Row Reference in one table, the Row Refences for the related rows in the connected tables are automatically set. In our customer service example, the customer type table could be related to the customer arrival table by customer type, allowing us to store the customer type data in one table and the customer arrival data in another so that we don’t have to replicate data, but still have direct access to all the data that we need for a given customer or customer type.
Success with Data-Driven Modeling
Data-driven modeling is a very powerful paradigm, and its use is standard operating procedure for all models that we develop internally at Simio. Employing data-driven modeling and relational data lays the foundation for Data-generated modeling using Custom Objects as well as Simio Templates – both of which will be discussed in future posts.
To read more about Simio’s technology, driven by data, click here.