System Dynamics Modeling—Now Available with the Business Simulation Library
System dynamics (SD) is a very powerful and flexible modeling paradigm, ideally suited to tackle strategic business, economics and public policy issues. Some years ago, Guido Wolf Reichert, management consultant and developer for BSL Management Support, Germany, stumbled into problems while modeling the public transport system in a German metropolis. He had reached the technical limits of the established SD software. While looking for alternatives, he discovered Wolfram System Modeler.
Developing the Business Simulation Library
In this blog, the developer will explain his motivation for creating the Business Simulation library (BSL) and how the library makes it easy, convenient and fast to model dynamical systems in business, ecology and social sciences in general without any need to write equations. The library is available for download for free at the System Modeler library store.
Q: Tell us a bit about yourself. Why did you develop the library?
A: I am a management consultant employing computer simulation to help clients make better decisions by better understanding the complexity of the system under management. In my work, I am mainly using system dynamics, a modeling methodology developed by Jay W. Forrester in the 1960s.
Some years ago during a rather challenging project to model the public transport system in a German metropolis, I needed to expand my toolset, as the established system dynamics software I was using reached its technical limits. At that time I discovered Wolfram Mathematica and became instantly hooked. In that project, I then used Mathematica mainly for modeling data and for testing, while the system modeling itself was done in Java by a programmer, who used my system dynamics model diagrams and translated them.
Later, when I had become a rather savvy programmer in the Wolfram Language myself, I started to use Mathematica to run external system dynamics models and to code differential equations in Mathematica directly. But one needs a GUI to model systems, which is how I became aware of Wolfram System Modeler and its SystemDynamics library from reading Mikael Forsgren’s Wolfram Blog post. But, I have to be very honest here, the SystemDynamics library it announced did not convince me—and so I let matters rest a bit.
Some years later, having stumbled upon Modelica models by Michael Tiller and Peter Junglas, who were using acausal connectors for SD models, I became interested enough to actually learn Modelica. That, in the end, got me going.
Q: Can you share some thoughts on the importance of system dynamics? Why would one be interested in modeling social systems?
A: In the introductory video for the Business Simulation library, I have used two diagrams that are derived from the ones used by Hartmut Bossel in his introductory text on modeling and simulation. Essentially, a lot of social systems in business, finance and economics or politics are too complex to be understood by treating them as “black boxes”—we need to at least make them “gray” in the sense that we observe the relevant structure of the system (e.g. its interconnectedness) and have “curve-fitting” approximations happen only at levels deeper down in our models.
To give a current example, we cannot fruitfully understand the COVID-19 pandemic by fitting the parameters of a normal distribution or a Gompertz curve. If we have a total lockdown, then the system’s behavior will not look like a regular sigmoid curve. We are well advised to model the essential processes operating within the system in order to come up with reasonable estimates regarding answers to what-if questions.
The pandemic exemplifies the need to “explain” actions taken by a regulator, irrespective of it being a government, a public organization or a corporation. Not doing so in a reasonable way virtually pushes people into rebellion and drives them to “alternative explanations” and “alternative facts.”
COVID-19 is just one example of a problem faced by society that is amenable to modeling and simulation—climate change is another good example for a much more complex problem of tremendous importance. Here again, politicians are well advised to convincingly argue their actions. The En-ROADS policy simulation model impressively shows how system dynamics modeling can be a great way to do just that.
Q: What is the Business Simulation library doing differently than existing approaches in Modelica?
A: In a dedicated system dynamics software, users can add, say, four flows to a single stock very quickly by simple drag-and-drop procedures, and users can write equations for these flows simply as “parameters.” A Modelica library for system dynamics has to match this kind of ease and flexibility as far as possible.
The thing one needs to realize is that in Modelica, that kind of flexibility is available for acausal connectors, i.e. physical connectors, that are used to model the transition of conserved entities. The BSL is using acausal connectors, e.g. stock and flow ports, which will transmit a rate of flow and the current amount in a connected stock at the same time.
Q: Can you elaborate on this? Why will a modeler care?
A: Well, let’s have a look at a process that is ubiquitous in economic and ecological models: exponential growth. The “Hello, World!” dynamical system model is population growth at constant birth and death rates with one stock for the whole population. The following diagram shows how this model will look in a typical SD software package:
Now let’s compare this to an equivalent model in System Modeler using the new library, which has been parameterized in a slightly different fashion using the parameter lifespan instead of a fractional death rate:
In a system dynamics package, we need to draw six connections, while using the BSL we need to draw only four connections. In fact, only two connections would suffice as we can model the rate and the lifespan as parameters encapsulated with the process components (i.e. EXP Growth and EXP Decay) to speed up model building. The following little table shows the complete comparison:
The BSL is visually much more expressive: parameter values are nicely shown in the diagram, and it is completely clear what kind of “processes” are changing the states of the system, e.g. the population size in the example. While in the BSL, modelers usually do not need to write equations, they also do not need to inspect equations to understand what is going on. For example, in the system dynamics diagram, a model using exponential decay with a given residence time would look exactly like one using exponential decline at a fractional rate. To tell the difference—and to check for modeling errors—we do need to look at the actual equations. Using the BSL, the model’s diagram contains all the information we need.
The whole design of the BSL underlines the similarity of business process modeling (e.g. event-driven process chains) and a strategic business simulation with regard to physical processes: stocks are shown in red like events, while flows appear in green like activities/functions on a process map.
“[A] simulation model—even if it is
a large model—needs to fit on a single page.”
Q: Can I make large-scale models as well? What is the level of complexity it can handle?
A: Stafford Beer, the father of management cybernetics, postulated that any viable system will have a recursive structure: it will be a system of viable systems. The object-oriented approach in Modelica takes the same route in dealing with real-world complexity. Essentially, a simulation model—even if it is a large model—needs to fit on a single page.
Using the BSL, you can build arbitrarily complex models from the basic building blocks included in the library in a hierarchical fashion. The stylized model of an industrial supply chain network, shown in the following figure, may illustrate this. The complex system is shown as an interconnected system of systems exchanging conserved quantities (e.g. “matter”) and information:
In that model, we can “drill down” into the model of producer p1 to discover that it again will consist of subsystems, a decision-making unit (the management) and operations. While the management subsystem processes information for decision making, which is typically modeled by some kind of rule-based policy, the operational subsystems deal (at least to a significant part) with tangible entities and processes that transform them from one state into another:
Operational processes can finally be translated into a dynamical model and, as I have demonstrated in the introductory examples shipping with the library, using pre-built components helps to speed up building larger models. In the example SimpleProductionChainIII, shown next, the pre-built components Diffusion and FirstOrderStockAdjustment are used to model new product adoption and production planning, respectively:
While there are presently no large live models to show yet—as the library has just been released for the first time—it is pretty clear that it will be possible to build models that have the same scope as the En-ROADS model mentioned previously. The advantage of the library is that it will offer all the speed and maintenance advantages of object orientation.
Q: Who can use the library? Does it need any prior knowledge, i.e. do I have to know some literature?
A: I am convinced that the library and its pre-built components make modeling and simulation in social science applications as easy as possible. Nevertheless, it is rather abstract if you are not used to the approach of system dynamics. So, while not necessary, I would recommend some literature.
If you are coming from business and would like to build mainly strategic business simulations, then Kim Warren’s Strategic Management Dynamics is a great book to read. A more comprehensive introduction to system dynamics modeling is given by Andrew Ford. His text is also—given its title, Modeling the Environment—a great place to start if you have an interest in environmental modeling.
While John Sterman’s Business Dynamics still is widely considered to be the definitive text on system dynamics modeling, my personal favorite for a very thorough introduction to modeling and simulation (not only) in the social sciences is Hartmut Bossel’s textbook Systems and Models. In that book, you will also find some explanation for his widely acknowledged take on sustainability using orientor theory, which is implemented in the library.
Q: What are your plans for the further development of the library?
A: The focus with regard to this first release has clearly been on robustness. The basic library classes should (hopefully) remain as they are now. In upcoming releases, I would like to add more “molecules of structure,” e.g. typical building blocks of system dynamics models that help to reduce the development time.
Another avenue will be to make use of the tight integration between System Modeler and the Wolfram Language. System dynamics has a lot to gain from embracing stochastic modeling approaches—especially modern Bayesian ones. Here the workflow for using prior knowledge and incoming data to “learn” should be made as convenient as possible.
Download the BSL library from the System Modeler library store to test for yourself. You can also download an unrestricted 30-day trial of System Modeler 12.2 and modify the included models to your own liking, or create your very own models for exploration, learning or advanced analysis.
- H. Bossel, Systems and Models: Complexity, Dynamics, Evolution, Sustainability, Norderstedt: Books on Demand, 2007.
- A. Ford, Modeling the Environment, 2nd ed., Washington, DC: Island Press, 2010.
- J. D. Sterman, Business Dynamics: Systems Thinking and Modeling for a Complex World, Boston: McGraw-Hill Higher Education, 2000.
- K. Warren, Strategic Management Dynamics, Chichester: John Wiley & Sons, 2008.