StochSD: A Full Potential CSS Language for Dynamic and Stochastic Modelling, Simulation and Statistical Analysis

Abstract
It is vital that a well-defined conceptual model can be realized by a macro-model (e.g., a Continuous System Simulation (CSS) model) or a micro-model (e.g., an Agent-Based model or Discrete Event Simulation model) and still produce mutually consistent results. The Full Potential CSS concept provides the rules so that the results from macro-modelling become fully consistent with those from micro-modelling. This paper focuses on the simulation language StochSD (Stochastic System Dynamics), which is an extension of classical Continuous System Simulation that implements the Full Potential CSS concept. Thus, in addition to modelling and simulating continuous flows between compartments represented by “real” numbers, it can also handle transitions of discrete entities by integer numbers, enabling combined models to be constructed in a straight-forward way. However, transition events of discrete entities (e.g., arrivals, accidents, deaths) usually happen irregularly over time, so stochasticity often plays a crucial role in their modelling. Therefore, StochSD contains powerful random functions to model uncertainties of different kinds, together with devices to collect statistics during a simulation or from multiple replications of the same stochastic model. Also, tools for sensitivity analysis, optimisation and statistical analysis are included. In particular, StochSD includes features for stochastic modelling, post-analysis of multiple simulations, and presentation of the results in statistical form. In addition to making StochSD a Full Potential CSS language, a second purpose is to provide an open-source package intended for small and middle-sized models in education, self-studies and research. To make StochSD and its philosophy easy to comprehend and use, it is based on the System Dynamics approach, where a system is described in terms of stocks and flows. StochSD is available for Windows, macOS and Linux. On the StochSD homepage, there is extensive material for a course in Modelling and Simulation in form of PowerPoint lectures and laboratory exercises.