StochSD
Developer(s) | Leif, Erik and Magnus Gustafsson |
---|---|
Initial release | May 15, 2017 |
Stable release | 2022.01.02
/ January 2, 2022 |
Repository | github |
Written in | JavaScript |
Operating system | Windows, macOS, Linux |
Type | System Dynamics with stochastic extensions |
License | GNU Affero General Public License |
Website | stochsd |
StochSD[1] (Stochastic System Dynamics) is a free, open-source Continuous System Simulation (CSS) package intended for small and medium-sized models in education, self-studies and research. Technically, StochSD is based on the Insight Maker[2] engine with its DE-solver, function library, error checker, macro facility, etc., while the design, graphical user's interface, construction elements, result presentation, file handling, link checking, etc. are different. Also, tools for sensitivity analysis, and optimisation with or without constraints are included. In particular, StochSD includes features for stochastic modelling, post-analysis of multiple simulations, and presentation of the results in statistical form.
The design and development of StochSD were done during 2017–2022 with support from Uppsala University, Karolinska Institute, and the Swedish University of Agricultural Sciences.
StochSD was designed to fulfil the two purposes:
- To provide an open-source CSS language based on the System Dynamics[3][4][5] philosophy, where a system is described in terms of stocks (compartments) and flows, and where pedagogic aspects, ease of use and understanding are prioritised.
- To enable a macro (CSS) model in StochSD to produce results that are fully consistent (i.e.,contradiction-free) with those from a micro (Discrete Event Simulation (DES) or Agent-Based Simulation) model of a well-defined system under study. This old consistency problem was stepwise solved between 2000 and 2010.[6][7][8][9][10] This property is denoted Full Potential CSS modelling, see below.
Education and self-studies
[edit]To support the use in education and self-studies, the StochSD package as well as course material to enable courses in classical CSS and Full Potential CSS modelling and simulation are provided at the StochSD website. This course material contains lectures, laboratory exercises, instructive models, and StochSD manuals, which mainly are based on material developed at Uppsala University and the Swedish University of Agricultural Sciences for courses in modelling and simulation.
StochSD is downloaded in many countries from all continents,[11] and can also be run directly in a web browser (of which there is no statistics). It is described, compared and discussed,[12][13][14][15][16] demonstrated in educational videos,[17][18][19] and also referred to in various languages.[20][21][22]
Full potential CSS modelling
[edit]The Full Potential CSS concept is an extension of classical Continuous System Simulation, which provides the rules to make the results from macro-modelling consistent with those from micro-modelling.[6][7][8][9]
Briefly, in addition to modelling and simulating continuous flows between stocks represented by ‘real numbers’, StochSD can also handle transitions of discrete entities by integer numbers. But in contrast to including individual entities into a CSS model, StochSD preserves the aggregated macro approach for discrete entities by transferring integer number of entities (e.g., arrivals, accidents, deaths) during a time-step.[6] However, such transitions may 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, as well as devices to collect statistics during a simulation and from multiple replications of the same stochastic model.[1] In StochSD the construction and simulation of e.g. queuing models[7] or combined discrete and continuous models[10] are done in a straightforward way (see example below).
The Full Potential concept also includes rules for how a stage has to be expanded into a structure of stocks and flows in order to reproduce a specific sojourn-time distribution, how attributes are to be handled, and where and how different types of uncertainty (structural, transition, initial value, parameter, and signal uncertainties) should be implemented.[9]
Example: continuous vs. combined discrete and continuous model
[edit]A continuous prey-predator model[23][24] and a combined model with continuous prey (e.g. X= Grass) and discrete predators (e.g. Y = Sheep), as well as a replication of the combined model are shown below.
Continuous model
Now assume that the births and deaths of the sheep are discrete random events with the expected rate d⋅X⋅Y and e⋅Y, respectively, then the number of events per time interval is Poisson distributed. The StochSD function PoFlow(expected_value) handles this by drawing a random number for each DT. The modifications to obtain a combined model are shown in red, below.
Combined discrete and continuous model
In the replication shown, the discrete predators became extinct at around 235 time units (e.g., months). The continuous prey then increases logistically to an equilibrium without further stochastic variations.
Comparing a continuous prey-predator model with the combined model reveals that the continuous model, starting at the equilibrium state (as in this example), will only produce two straight horizontal lines. Starting the continuous model outside the equilibrium state will make it approach the equilibrium for both species without lasting variations. Further, a phenomenon such as extinction cannot occur for a continuous model.
Creating the combined model, shown above, is straightforward. The traditional alternative of constructing a combined continuous and discrete model, with its mixture of disparate DES and CSS concepts, synchronisation of two different time-handling methods, and requiring a special combined simulation language is not an attractive option for a macro study.
References
[edit]- ^ a b "StochSD User's Manual and Tutorial" (PDF). 2024-02-02.
- ^ Fortmann-Roe, Scrott (2014). "Insight Maker: A general-purpose tool for web-based modeling & simulation". Simulation Modelling Practice and Theory. 47: 28–45. doi:10.1016/j.simpat.2014.03.013.
- ^ *Forrester, Jay W. (1961). Industrial Dynamics. Pegasus Communications. ISBN 978-1-883823-36-8.
- ^ *Forrester, Jay W. (1968). Principles of Systems. Pegasus Communications. ISBN 9781883823412.
- ^ Meadows, Donella (2008). Thinking In Systems: A Primer. Chelsea Green Publishing. ISBN 978-1844077250.
- ^ a b c Gustafsson, Leif (2000). "Poisson Simulation—A Method for Generating Stochastic Variations in Continuous System Simulation" (PDF). Simulation. 74 (5): 264–274. doi:10.1177/003754970007400501.
- ^ a b c Gustafsson, Leif (2003). "Poisson Simulation as an Extension of Continuous System Simulation for the Modeling of Queuing Systems" (PDF). Simulation. 79 (9): 528–541. doi:10.1177/003759703040234.
- ^ a b Gustafsson, Leif; Sternad, Mikael (2007). "Bringing consistency to simulation of population models – Poisson Simulation as a bridge between micro and macro simulation". Mathematical Biosciences. 209 (2): 361–385. doi:10.1016/j.mbs.2007.02.004. PMID 17412368.
- ^ a b c Gustafsson, Leif; Sternad, Mikael (2010). "Consistent Micro, Macro and State-Based Population Modelling". Mathematical Biosciences. 225 (2): 94–107. doi:10.1016/j.mbs.2010.02.003. PMID 20171974.
- ^ a b "The Poisson Simulation Approach to Combined Simulation" (PDF). Technical Report R091, Signals and Systems, Uppsala University. Retrieved 2024-02-02.
- ^ "SourceForge statistics of downloads for StochSD". sourcerforge.net. Retrieved 2024-02-02.
- ^ "The Cosy Project – Inventory of Complex Systems Project (2020-1-SE01-KA203-077872) funded with support from the European Commission of the European Union". 2024-02-02.
- ^ "OnWorks – StochSD download for Linux, description and screenshots". 2024-02-02.
- ^ "Linux Mint – Installation of StochSD software". 2024-02-02.
- ^ "AlternativeTo - Crowdsourced software recommendations". 2024-02-02.
- ^ "zbMATH Open — an information service for mathematical software". 2024-02-02.
- ^ "Simulation einer Bewegung mit konstanter Geschwindigkeit mit StochSD". YouTube (in German). 2024-02-02.
- ^ "Simulation einer beschleunigten Bewegung mit StochSD". YouTube (in German). 2024-02-02.
- ^ "Genauigkeit einer Simulation mit dem Eulerverfahren mit StochSD". YouTube (in German). 2024-02-02.
- ^ "stochsd:随机系统动力学的实验室环境". csdn.net (in Chinese (China)). 2024-02-02.
- ^ "StochSD описание, скриншоты и видео". vse-analogi.ru (in Russian). 2024-02-02.
- ^ "Sobre Stochsd". alternativapara.com.br (in Brazilian Portuguese). 2024-02-02.
- ^ Volterra, Vito (1926). "Fluctuations in the Abundance of a Species Considered Mathematically". Nature. 118 (2972): 558–560. Bibcode:1926Natur.118..558V. doi:10.1038/118558a0.
- ^ *Braun, Martin (1993). Differential Equations and Their Applications: An Introduction to Applied Mathematics. Texts in Applied Mathematics. Vol. 11. Springer Verlag. doi:10.1007/978-1-4612-4360-1. ISBN 978-0-387-97894-9.