=Paper=
{{Paper
|id=Vol-2066/emls2018paper02
|storemode=property
|title=Challenges in Modularization of Discrete Event Simulations
|pdfUrl=https://ceur-ws.org/Vol-2066/emls2018paper02.pdf
|volume=Vol-2066
|authors=Sandro Koch
|dblpUrl=https://dblp.org/rec/conf/se/Koch18
}}
==Challenges in Modularization of Discrete Event Simulations==
Challenges in Modularization of Discrete Event Simulations Sandro Koch sandro.koch@kit.edu Karlsruhe Institute of Technology Abstract Quality MA Quality MA RL RL SEC SEC Due to digitalization software systems in general and PE PE simulations, in particular, are becoming more and PR PR more complicated. This results in increased develop- DE DE ment cost and development time of simulations. Dif- ME ME ferent approaches have demonstrated that to handle OP OP complexity, modularization of monolithic simulations EL EL Life- Life- enables the reuse of already developed modules and cycle SW BP SW BP Domain cycle Domain reduces the overall complexity. The High-Level Ar- chitecture, a widely used and researched approach, is (a) Software and business pro- (b) Reliability simulation of a cess simulation consisting of mechanical system consisting the standard for distributed and modularized simu- four modules at design time of four modules at runtime lations. However, there are not many alternatives to the existing methods, and the modularization process Figure 1: Performance (PE), Reliability (RL), Maintain- of current simulations is not well documented and re- ability (MA), Security (SEC), Privacy (PR), Mechanics searched. This paper gives an overview of the existing (ME), Electronics (EL), Business Processes (BP), Soft- approaches and shows possible research topics in the ware (SW), Operations (OP), Development (DE) domain of modular discrete event simulations. Fur- thermore, we propose the idea of an Architecture De- scription Language and resulting from it, a template simulation depends on the desired information a sim- solution for analyzing existing discrete event simula- ulation must deliver and in which life-cycle period, tions. development- or runtime, the simulation runs. Our focus lies in the quality simulation of software 1 Introduction systems. Performance is the central aspect which we simulate in the context of software systems. Fig. 1 Software is gaining increasing importance in all as- shows an excerpt of the combination of simulation pects of our daily lives. Therefore, the software qual- modules which are divided into three dimensions: ity has to be assured to secure the overall quality of quality, domain, and life-cycle. Based on a distinct information systems.As a system grows, especially a set of simulation modules, different types of simula- long-living system, it is difficult to implement and test tions are created. Part (a) shows a maintainability all possible changes in advance (i.e., different change simulation (MA) of a mechanical system (ME) dur- scenarios). The simulation of such systems enables the ing the operational life-cycle (OP). Part (b) shows system architect to see the impact of possible changes a reliability (RL) and security (SE) simulation of an or configurations without the concrete implementa- electrical- (EL) mechanical (ME) system with busi- tion. In the context of quality simulation, there are ness processes (BP) during the development life-cycle different kinds of quality aspects. Besides the per- (DE). Although an analytical approach solves security formance simulation, reliability, security, privacy, and and reliability, the impact on other quality aspects of maintainability might be of some interest regarding the system (e.g., an effect on the performance of an quality assurance. During the lifetime of a project, offline CPU core) can be simulated. not all possible simulation requirements can be fore- seen and not all use cases can be considered dur- 2 Challenges in modularizing ing the design phase. Therefore a simulation should be extensible for further aspects and also combinable discrete event simulations with other simulations to prevent duplications. The We have identified four problems to the current state problem of simulating systems is not exclusive to the of discrete event simulation development. This section domain of software development. The type of used presents the occurring challenges while designing and EMLS 2018: 5th Collaborative Workshop on Evolution and Maintenance of Long-Living Software Systems @ SE18, Ulm, Germany 43 implementing modularized discrete event simulations. the existing simulations available which results in re- duced costs and maintenance effort. A general ap- 2.1 Simulation Segregation (C1) proach for simulation coupling to integrate simula- To allow composable simulations as shown in Fig. 1 tions which are not explicitly developed with the HLA a separation into modules is necessary. Segregation standard is missing. points in existing simulations must be identified, a process or guideline does not exist. If a new simulation 2.3 Simulation Interoperability (C3) is developed, reasonable modules concerning reusabil- The interoperability of simulation modules is another ity and maintainability have to be defined. The High- problem we have identified. It should be possible to Level Architecture (HLA) [3] standard allows to break use a simulation module in a different domain with- down a simulation into different modules. Thus, sim- out making adjustments to the module itself. Apart ulations can be developed in a modular way. The in- from different domains, a simulation module should be tention of the HLA approach is, to have multiple sim- able to communicate with another simulation module ulations separated distinct modules. An architectural without modifying either of the modules. The stan- view of an HLA simulation shown in Fig.2. Besides dardization of a modular and distributed simulation the simulation modules, it is possible to add moni- is defined in the HLA standard. But an architectural toring and live participants to the overall simulation. formalization is missing, and structural analysis is not It was the purpose to allow distributed simulations, possible. 2.4 Simulation Behavior Live Participants Preservation (C4) A further problem arises when a simulation is designed in a modular way. It has to be ensured that the re- sults of a modularly designed simulation are the same Data Collection Interfaces to as the results of a monolithic simulation which runs Simulations Passive Viewer Live Players the same kind of simulation. Besides the results of an individual simulation module compared to non- modularized simulation, the expectation value of a composed simulation with multiple modules has to be Runtime Infrastructure the same as if the simulation was monolithic. Current approaches have no way of determining or guarantee Figure 2: Functional view of a HLA simulation [4] behavior preservation if a simulation is modularized. In the ”Related Work” section (4), simulation mod- in order to combine the computing power of multiple eling and modularization approaches are presented. systems. But HLA only enables the use simulation Also approaches for creating compose- and inter- modules, the process of how to modularize or design operable simulations and simulation modules are in- a modular simulation is not defined. Also, best prac- troduced. By looking at different domains, it might be tices or patterns are not existent. possible to exchange individual building blocks within the simulation not only within a domain but also in- 2.2 Simulation Coupling (C2) terdisciplinary. A simulation which consists of multiple modules must be coupled to allow communication between this dis- 3 Approaches in tinct simulation modules. Simulations must be cou- simulation modularization pled to enable communication and synchronization Considering the evolution and maintenance of in between simulations. The HLA standard specifies software-aided simulations a distinct language in com- how to handle the exchange of data between simu- bination with model-driven engineering approaches lations and how to design individual communication would be the next step in developing simulations. packages. Simulations are managed by the Run-Time- Different existing simulations should then be realized Infrastructure (RTI) [3]. The RTI monitors the sim- based on this language to extract a template solution ulations and manages the data exchange between the for modular simulations. simulation modules. Therefore, the HLA standard describes interfaces to connect a simulation with the 3.1 Creating an ADL for Simulations RTI. Also, the data exchange between simulations and This approach addresses the challenges C1 and C2. the RTI is encapsulated in a distinct model [11]. Different approaches to simulation coupling and mod- To add a simulation to the RTI The intra- ularization must be analyzed to create an Architecture communication of a simulation module or the com- Description Language (ADL) for modular simulations. munication between modules of one simulation is not Therefore, it is a good idea to use an existing simula- given. This is necessary to allow the combination of tion of business processes and software systems as a EMLS 2018: 5th Collaborative Workshop on Evolution and Maintenance of Long-Living Software Systems @ SE18, Ulm, Germany 44 basis. Since this type of simulation already exists in ADL. Thus it is possible to identify common prac- Palladio [15] with IntBIIS [17], it is advisable that the tices among the present adapted simulations. Com- assessments test this case precisely. mon practices can lead to a guideline of best prac- The first option is to implement HLA for business tices and ideally to design patterns for modular sim- processes in the Palladio context. The conceptual part ulations. consists of the analysis of existing HLA implementa- tions, concepts and interactions already in use, as well 4 Related Work as the design for the structure of the future simulation. Modularization of software is an already established The conceptual part is followed by the implementa- topic within the software engineering community. The tion of the designed structure with a final evaluation. creation of components as in the Palladio Compo- The evaluation focuses on preserving the behavior of nent Model [15] on an architectural level or the mod- the newly developed simulation in comparison to the ularization of code generation transformations [14] on already existing monolithic implementation. code level are some examples. But a modularization In addition to the implementation of the HLA ap- scheme for discrete event simulations is missing. proach, at least one further approach should be im- plemented in the context of the business processes. 4.1 Simulation Modeling The knowledge gained from this should enable a com- To analyze simulations, an ontological analysis can lay mon structure to be extracted. If this is not possible, the foundation of a robust knowledge-based system. choose an approach by which the ADL is designed. The work of Perakath et al. [8] shows that an ontology The successful creation of an ADL for simulations is facilitates the modeling of simulation. Cetinkaya et of particular importance for the extraction of a tem- al. [10] utilizes model-driven development approaches plate solution. to support the development of simulations. They pro- 3.2 Extracting a Template Solution pose a framework to aid with the modeling process for simulations. Law’s reference book ”Simulation Mod- This approach also addresses the challenges C1 and eling and Analysis” [1] does not use an ontological C2. The generated ADL is only the basis for the ap- or meta-modeling approach but gives an overview of plication of different simulation templates. A tem- general modeling approaches in the domain of sim- plate is to be used to determine how the structure ulations. All approaches have in common that the of simulation coordination is realized. For example, composition and interoperability aspect is not consid- a template defines whether the time is managed cen- ered. trally in one component or each simulation component got its time management. Since there are different ap- 4.2 Architecture Description Languages proaches how simulations can be coordinated and how Using a meta model centric approach requires a main- the division of individual simulation roles is handled, tainable and evolvable structure. Strittmatter et multiple template solutions are possible. Therefore al. [13] proposed modular reference structure which approaches are to be implemented with the help of meets these criteria. This approach can be used to the ADL so that they can be compared based on var- design an ADL regarding the structural criteria, but ious quality criteria. it provides no solution for the modularization of sim- Because of the experience with the HLA approach ulations. Medvidovic et al. [5] evaluate the benefits of in the ADL designing process, implementing HLA ADL’s in the domain of software development. The with the ADL is the next step towards a template work of McKenzie et al. [7] analyzes the utility and solution. As described, at least one other approach effectiveness of ADL’s in the context of simulations. has to be implemented with the ADL to be able to But their analysis is restricted to the federation struc- compare the approaches. ture of the HLA standard. 3.3 Designing an Analysis and Optimiza- 4.3 Composability and Interoperability tion Framework of Simulations This approach will help to segregate or design simu- To make simulation modules reusable they must be lations (C1) or to specify how behavior preservation compose- and inter-operable. Petty et al. [6] pub- (C4) can be realized. Based on a common base (the lished a composability lexicon to clear the connota- proposed idea of an ADL) for modular simulations, tion of composability in the context of simulations. existing simulations can be modularized. If the sim- The Distributed Interactive Simulation (DIS) [2] stan- ulation is already modularized, it can be adapted to dard realized the composability of simulations on the the developed ADL. A survey of simulation experts protocol level. Based on the DIS standard, the High- can help us to identify and avoid pitfalls in the simula- Level Architecture (HLA) [4] evolved. The CODES tion design Therefore, the ADL has to be introduced approach of Teo et al. [9] utilizes an ontology approach to simulation experts, to allow these experts to ex- to model a discrete event simulation. And Topçu et press their current simulation design process with the al. [16] use the HLA standard in combination with EMLS 2018: 5th Collaborative Workshop on Evolution and Maintenance of Long-Living Software Systems @ SE18, Ulm, Germany 45 modeling approaches. These proposed approaches are [6] M. D. Petty and E. W. Weisel. “A composability very restrictive regarding the standards they use, and lexicon”. In: Spring Simulation Interoperability none have an approach for generic simulations. Workshop. Vol. 2003. 2003, pp. 181–187. 4.4 Decoupling of Monolithic Simulations [7] F. D. Mckenzie, M. D. Petty, and Q. Xu. “Use- fulness of software architecture description lan- If an existing, monolithic simulation has to be modu- guages for modeling and analysis of federates larized the modeling of simulations should be used and and federation architectures”. In: Simulation compose- and interoperability has to be integrated. 80.11 (2004), pp. 559–576. Papadopoulos et al. [12] proposed an approach of au- tomated decoupling of simulations. [8] P. Benjamin, M. Patki, and R. Mayer. “Using ontologies for simulation modeling”. In: Winter 5 Conclusion Simulation Conference. IEEE, 2006, pp. 1151– 1159. There are not so many solutions for modular simula- tions. The DIS and HLA standards are one of the few [9] Y. M. Teo and C. Szabo. “CoDES: An inte- solution approaches. But a common base for mod- grated approach to composable modeling and ular, composable and distributed simulation is not simulation”. In: Simulation Symposium, 2008. available. A generic architecture driven approach is ANSS 2008. 41st Annual. IEEE, 2008, pp. 103– also not available. The architectural aspects would al- 110. low structural analysis regarding existing simulations. [10] D. Cetinkaya, A. Verbraeck, and M. D. Seck. Decoupling approaches are rare and need further re- “MDD4MS: a model driven development frame- search. If structural analyses are available, then an work for modeling and simulation”. In: Proceed- aided or automated process of modularizing simula- ings of the 2011 summer computer simulation tions can be developed. Design patterns and bad conference. Society for Modeling & Simulation smells in simulations design which is based on struc- International, 2011, pp. 113–121. tural analyses could be possible. Overall would this [11] B. Möller. “The HLA tutorial v1. 0”. In: Pitch base make simulations more accessible and compara- Technologies, Sweden (2013). ble. Therefore this research topic might create a new field of view for simulations. [12] A. V. Papadopoulos and A. Leva. “Automat- ing dynamic decoupling in object-oriented mod- Acknowledgement elling and simulation tools”. In: 5th Inter- national Workshop on Equation-Based Object- This work was partially supported by the MWK Oriented Modeling Languages and Tools UK. (Ministry of Science, Research and the Arts Baden- Linköping University Electronic Press, 2013, Württemberg) in the funding line Research Seed Cap- pp. 37–44. ital (RiSC). [13] M. Strittmatter et al. “A Modular Refer- References ence Structure for Component-based Architec- ture Description Languages”. In: 2nd Interna- [1] A. M. Law, W. D. Kelton, and W. D. Kel- tional Workshop on Model-Driven Engineering ton. Simulation modeling and analysis. Vol. 2. for Component-Based Software Systems. 2015, McGraw-Hill New York, 1991. pp. 36–41. [2] D. S. Committee et al. “The DIS vision: A map [14] R. Jung, R. Heinrich, and W. Hasselbring. to the future of distributed simulation”. In: In- “GECO: A Generator Composition Approach stitute for Simulation and Training (1994). for Aspect-Oriented DSLs”. In: Cham: Springer [3] J. S. Dahmann. “High level architecture for sim- International Publishing, 2016, pp. 141–156. ulation”. In: Distributed Interactive Simulation [15] R. H. Reussner et al. Modeling and simulating and Real Time Applications, 1997., First Inter- software architectures: The Palladio approach. national Workshop on. IEEE, 1997, pp. 9–14. MIT Press, 2016. [4] J. S. Dahmann, R. M. Fujimoto, and R. M. [16] O. Topçu et al. Distributed Simulation: A Model Weatherly. “The department of defense high Driven Engineering Approach. Springer, 2016. level architecture”. In: 29th conference on Win- [17] R. Heinrich et al. “Integrating business process ter simulation. IEEE Computer Society, 1997, simulation and information system simulation pp. 142–149. for performance prediction”. In: Software & Sys- [5] N. Medvidovic and R. N. Taylor. “A classi- tems Modeling 16.1 (2017), pp. 257–277. fication and comparison framework for soft- ware architecture description languages”. In: IEEE Transactions on software engineering 26.1 (2000), pp. 70–93. EMLS 2018: 5th Collaborative Workshop on Evolution and Maintenance of Long-Living Software Systems @ SE18, Ulm, Germany 46