Abstract
In modeling and simulation it is often necessary to simulate a model with a variety of settings and evaluate the simulation results with measured data or previously acquired results. As doing this manually is error-prone and ineffective, scripting languages are often used to automate this process. In general a simulation description is tool and model dependent. Therefore, simulating the same model with the same simulation description in different simulation tools or comparing two different models with the same settings is often not easily achieved. We propose an object-oriented, tool-independent, easy-to-use, domain-specific scripting language to describe simulations in an exchangeable and uniform manner. Through this simulation description the simulation settings and the simulation environment can easily be changed while syntax and sequence of commands remain the same. The language is Python based and is designed to be simple, well-readable and intuitive even with marginal programming experience while maintaining Pythons’ strength. The language uses an in-house Python library which provides interfaces to different simulation environments (so far Dymola, OpenModelica, Simulink). This library can also be used directly in Python, enabling experienced Python users to keep describing their simulations in Python but benefiting from our efforts to achieve tool-independence.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The library and language is online on github: https://gitlab.tubit.tu-berlin.de/a.mehlhase/PySimulationLibrary. This is still a test version and is still under development.
References
Bergmann, F.T., Cooper, J., Le Novère, N., Nickerson, D.P., Waltemath, D.: Simulation experiment description markup language (SED-ML) Level 1 Version 2. J. Integr. Bioinform. 12(2) (2015)
Blochwitz, T., et al.: Functional Mockup Interface 2.0: the standard for tool independent exchange of simulation models. In: Proceedings of the 9th International Modelica Conference, Linköping Electronic Conference Proceedings, pp. 173–184. Linköping University Electronic Press (2012)
Bruce, D.: What makes a good domain-specific language? APOSTLE, and its approach to parallel discrete event simulation. In: Kamin, S. (ed.) DSL 1997 - First ACM SIGPLAN Workshop on Domain-Specific Languages, in Association with POPL 1997 (1997)
Cellier, F.E.: Continuous System Modeling. Springer Science and Business Media, New York (1991)
Cellier, F.E.: The complexity crisis. In: Proceedings of the 8th International Joint Conference on Software Technologies SIMULTECH 2013, pp. IS–5 (2013)
Dassault Systemes, A.B.: Dymola. http://www.3ds.com/products-services/catia/capabilities/systems-engineering/modelica-systems-simulation/dymola. Accessed 21 Sep 2014
Ewald, R., Uhrmacher, A.M.: SESSL: a domain-specific language for simulation experiments. ACM Trans. Model. Comput. Simul. 24(2), 11: 1–11: 25 (2014)
Ganeson, A., Fritzson, P., Rogovchenko, O., Asghar, A., Sjlund, M., Pfeiffer, A.: An OpenModelica Python interface and its use in Pysimulator. In: 9th International Modelica Conference (2012)
Helms, T., Himmelspach, J., Maus, C., Rwer, O., Schtzel, J., Uhrmacher, A.M.: Toward a language for the flexible observation of simulations. In: Proceedings of the 2012 Winter Simulation Conference (WSC), pp. 1–12 (2012)
Hillston, J., Pitt, J., Wirsing, M., Zambonelli, F.: Collective adaptive systems: qualitative and quantitative modelling and analysis (Dagstuhl Seminar 14512). Dagstuhl Rep. 4(12), 68–113 (2015)
Lie, B., Haugen, F.: Scripting Modelica models using Python. SNE - Simul. News Eur. 23, 161–170 (2012)
Mehlhase, A.: A Python framework to create and simulate models with variable structure in common simulation environments. Math. Comput. Model. Dyn. Syst. 20(6), 566–583 (2013)
Open Source Modelica Consortium: Open Modelica. www.openmodelica.org/. Accessed 03 Dec 2015
Peng, D., Warnke, T., Uhrmacher, A.M.: Domain-specific languages for flexibly experimenting with stochastic models. Simul. Notes Eur. SNE 25(2), 17–122 (2015)
Scilab: http://www.scilab.org/products/scilab. Accessed Jan 2015
Association, T.M.: https://www.modelica.org. Accessed Jan 2015
TheMathWorks: MATLAB version 7.12.0 (R2011a). The MathWorks Inc., Natick, Massachusetts (2011)
TheMathWorks: Simulink version 7.12.0 (R2011a). The MathWorks Inc., Natick, Massachusetts (2011)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing AG
About this paper
Cite this paper
Mehlhase, A., Jähnichen, S., Czwink, A., Heinrichs, R. (2016). A Library and Scripting Language for Tool Independent Simulation Descriptions. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation: Foundational Techniques. ISoLA 2016. Lecture Notes in Computer Science(), vol 9952. Springer, Cham. https://doi.org/10.1007/978-3-319-47166-2_43
Download citation
DOI: https://doi.org/10.1007/978-3-319-47166-2_43
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-47165-5
Online ISBN: 978-3-319-47166-2
eBook Packages: Computer ScienceComputer Science (R0)