title: Architecture for a Flexible and Scalable Simulation Engine
Creators: name: Holcomb Jr., Robert C.
Publisher: name: Old Dominion University Libraries
Year: 2011

description: Simulation is used by many different industries to gain insight on actions and decisions that may be too dangerous or costly to perform in reality. Although the use of computers to assist with modeling and simulation has been studied for quite a while, computer infrastructure, hardware, and capabilities are changing at a rapid pace. Computer software once written is difficult and costly to change, especially in order to take advantage of the advances in computer hardware. This thesis focuses on the design and implementation of a software simulation architecture that allows flexibility in the modeling conducted and scalability in the size of the simulation. Also, given the parallel nature of current computer hardware as well and the trends of future hardware being developed, this design allows for a flexible system that is capable of taking advantage of the hardware on which it is employed on today as well as future systems.

The basis for the simulation engine is a multi-layered approach. At the core layer, concurrency is achieved through the core concept that data is never shared and interactions occur between participating entities through a common message passing interface. All messages are distributed from a central kernel to event handlers that subscribe to specific messages or groups of messages. The next higher level of the design is the task management system. The task management system executes tasks at a specific frequency and utilizes a task thread pool to allow concurrent work to be conducted with worker threads. The entity management layer is built on top of the task layer and manages the creation of abstract entities comprised only of attributes and behaviors. The highest layer is the application specific layer, and is built on top of the entity and task layers. The application layer provides the definitions for the entities, and controls the environment that entities participate in and manages the simulation logic tasks.

In addition to the design of the simulation architecture, a study was conducted on the efficiency of the programming language C# in comparison to C++. The study examined efficiency both in terms of processing performance as well as productivity from a software development view point. In order to gain insight into the productivity offered by both languages, selected parts of the simulation engine architecture were implemented using both the C# language and the C++ language.

To show that the design of the simulation engine is viable, a functional simulation application was implemented on top of the architecture to show the scalability and flexibility inherent in the design. An application was developed that enabled a player to explore a 3D environment and interact with entities that existed within the environment. The simulation application demonstrates many aspects of the design including data driven entity designs, high entity loads, distributed processing, utilization of the custom GUI library, 3D visualization and audio. In addition to the simulation implementation, performance tests of several key aspects of the core architecture were performed to identify the best performing method to use in the final implementation. Also performed was performance testing of the simulation architecture to show how well it scaled with the number of processors present in the system.