Monday, October 26, 2015

Integrated Simulation Databases

Since the late 1990s, ExtendSim has had an embedded database as part of its simulation tool. Now in its second generation, it is so incredibly useful that I can’t imagine building a model without it. In this post, I’ll describe my favorite advantages of using the internal ExtendSim database but for a more comprehensive description of the major features please read ExtendSim Advanced Technology: Integrated Simulation Database (Diamond, Krahl, Nastasi, and Tag 2010).

Here is a list of some of the major features of the ExtendSim database:
  • Rapid data access
  • Connectivity to other data sources
  • Parent \ child relationships
  • Support for easy component scaling
  • Multiple databases in one model
  • Database aware modeling components
  • Database address attributes
  • Embedded distributions
  • Excel Add-in
  • Data linking
  • Link alerts

The first thing you should know about the ExtendSim database is that speed consideration was (and still is) a very high priority in its design. I have seen cases where a modeler used Excel or Access as the primary simulation data repository in such a way that the model interacted with it constantly during the model run. Having that constant interaction with Excel or Access during a model run tends to really slow the model down. Interacting with the internal ExtendSim database during the model run is comparable to the speed of interacting with arrays, which is really fast.

Using the internal database does not prevent you from connecting to other data repositories like Excel or Access or ODBC or ADO; however, the best practice when using another data repository is to import the input data into the ExtendSim database ONCE at the beginning of the model run, interact with the ExtendSim database during the run and then export the results to the external data repository ONCE at the end of the model run. This gives you the ability to use an external data repository to store your input and output data while using the ExtendSim database for speed during the model run.

The next major benefit of using the ExtendSim database is its visibility and the separation of model and data. I once had a discussion with someone who had just completed building a model – and he didn’t use a database! His model had roughly 300 processes in it. He used best guesses for the process times, because he didn’t have the actual data at the time he was building the model. When I spoke to him, he was beginning to get real data, and he wanted to start testing the sensitivity of the model. He was having a difficult time with the task. All of his process data was hidden in the block dialogs, which were spread out across the model. It was difficult for him to see the data he was currently using without going into every single process and looking for it!

Understandably, he was frustrated. He asked me if there was an easier way, and I suggested that he update his model using the ExtendSim database. The database helps make all of your data visible in organized table structures. This enables you to use best guesses as you are building the model, and afterwards, you can easily find and make modifications when you get real data. Using the database, the original best guess data will not get lost and forgotten.

The embedded ExtendSim database also allows the user to create parent \ child relationships between tables. This has a number of advantages.  First and foremost it helps endure data integrity but it also helps with making the data readable so the user does not have to maintain separate lists of indexes.     

The embedded ExtendSim database can also be used to help scale a model. Often, models have many processes that are similar, if not identical, except for their data. In ExtendSim, constructs like this can be encapsulated in a hierarchical block (h-block). Encapsulating the construct into an h-block makes duplication of these similar processes much easier, and it helps organize the model. In order to make maintenance of the encapsulated construct easier, the h-block can be placed in a library so that if changes are needed within the constructs, modifications may be made in one h-block and those same modifications can be automatically replicated to other identical h-blocks. The difficulty comes when the constructs have slightly different input data. This can be handled easily though by using the database to store the input data instead of storing it in the block dialogs.

Let me show you what I mean.  In the illustration below, the station construct is stored in an h-block in a library. Each station has a different process time and capacity. The process time is stored in a database table in which each station looks at a different record. Each station construct is reading the database for that process time, so each process time can be unique, even though the h-block construct for the four stations are identical. The only difference really is that they read from different records for their process time and capacity.



In summary, using the internal ExtendSim database can help make your simulation data visible and easy to find. It can speed up the run time, compared to constantly interacting with an external data repository during the simulation run. It is much easier to work with the data when the data repository is native to the simulation tool, and it can be used to help scale your model as it grows. Keep in mind that this is just a short list of the key benefits; there are many others.

If you have not already started using the ExtendSim database, I would highly encourage you to check it out.  I also teach a week long class on the ExtendSim database. We spend about two days covering the mechanics of using the database and about three days on the techniques of how to integrate it throughout a model. I cover almost all of the tricks I know. So if you have the time, then I encourage you to come and learn how to effectively use the ExtendSim database.  

YouTube video
I also have included a 30 minute overview of the ExtendSim Database on youtube.  Check that out when you have a chance.

I have included some references below for further reading.  The first one, ExtendSim Advanced Technology: Integrated Simulation Database, is a more in-depth look at the advantages of the ExtendSim database.  The next two references are some good examples of users taking full advantage of the ExtendSim database by not just creating a model but creating their own application within ExtendSim.

Diamond, B., Krahl, D., Nastasi, A., Tag, P., 2010. ExtendSim Advanced Technology: Integrated Simulation Database. In Proceedings of the 2010 Winter Simulation Conference, eds. B. Johansson, S. Jain, J. Montoya-Torres, J. Hugan, and E. Yucesan, 32-39. Piscataway, New Jersey: Institute of Electrical and Electronics Engineers, Inc.

Saylor, S., Dailey, J., 2010. Advanced Logistics Analysis Capabilities Environment. In Proceedings of the 2010 Winter Simulation Conference, eds. B. Johansson, S. Jain, J. Montoya-Torres, J. Hugan, and E. Yucesan, 2138-2149. Piscataway, New Jersey: Institute of Electrical and Electronics Engineers, Inc.


Akiya, N., Bury, S., 2011. Generic Framework for Simulating Networks using Rule-Based Queue and Resource-Task. In Proceedings of the 2011 Winter Simulation Conference, eds. S. Jain, R. R. Creasey, J. Himmelspach, K. P. White, and M. Fu, 2194-2205. Piscataway, New Jersey: Institute of Electrical and Electronics Engineers, Inc.

Popular Posts