System Dynamics

“System dynamics is a perspective and set of conceptual tools that enable us to understand the structure and dynamics of complex systems. System dynamics is also a rigorous modeling method that enables us to build formal computer simulations of complex systems and use them to design more effective policies and organizations. Together, these tools allow us to create management flight simulators-microworlds where space and time can be compressed and slowed so we can experience the long-term side effects of decisions, speed learning, develop our understanding of complex systems, and design structures and strategies for greater success.”

John Sterman, “Business Dynamics: Systems Thinking and Modeling for a Complex World” 

System Dynamics is mostly used in long-term, strategic models and assumes high level of aggregation of objects being modeled: people, products, events, and other discrete items are represented in SD models by their quantities. Therefore they lose any individual properties, histories or dynamics. If this level of abstraction is OK for your problem, SD may be the right method to use. If you feel however that individual details are important, you can always re-conceptualize all or part of your model using Agent Based or Discrete Event (process-centric) methods staying within the same AnyLogic environment.

SD Modeling in AnyLogic

AnyLogic supports design and simulation of feedback structures (stock and flow diagrams and decision rules, including array variables AKA “subscripts”) in a way most SD modelers are used to. You can:

  • stockandflow.pngDefine stock and flow variables one by one or using a “flow tool”
  • Use automatic “code completion” in formulas
  • Define “shadow” variables for better readability of your model
  • Use table functions (lookup tables) with step, linear, or spline interpolation
  • Define dimensions of both enumeration and range types
  • Define subdimensions and subranges
  • Define array variables with arbitrary number of dimensions
  • Use multiple formulas for different parts of an array variable
  • Use both SD-specific and standard Java mathematical functions

One of the notable features of AnyLogic stock and flow diagram is that the dependency arrows (both of flow type and “arc” type) are always synchronized with the actual formulas: the dependency arrow from A to B will appear automatically when you type A in the formula of B and disappear when you exclude A. For flow arrows it works also the other way around: if you delete the arrow, A will be excluded from the formula of B.

During or after the model run you can view the current values of the variables directly on the diagram and their charts over time in pop-up windows that appear on a mouse click.

sdruntime.png

Hierarchical and object-oriented SD modeling

Being an OO tool, AnyLogic naturally offers all benefits of OO approach to system dynamics modelers. You can define complex models in a hierarchical manner where logically separate parts of the stock and flow diagram are contained in different active objects and expose only their interface variables (as inputs or outputs). Moreover, you can develop a frequently met SD pattern, embed it in an active object class and reuse it as many times as you wish within one model or across models.

Creating flight simulators. Publishing SD models on the Web

SD model (as any other model in AnyLogic) can be made visual and interactive: you can add charts or arbitrary graphics to animate the model, and you can add sliders, buttons, text inputs, etc. to control the model execution at runtime. The set of supported graphics tools and controls in AnyLogic is a lot more rich than in any other SD tool.

As long as AnyLogic models are 100% Java applications, they naturally can be published on the web as applets. Unlike in other existing solutions, you do not need to setup the model on the web server and maintain the interaction between the remote client interface and the model: the whole model will automatically run on the client machine within the applet. You obviously can choose which parts of the model you wish to expose to the users. A plenty of SD applets generated by AnyLogic are published on this website.

Combining SD models with agent based and discrete event models

AnyLogic is the only tool that allows you to combine SD model components with components developed using agent based or discrete event methods. This can be done in many different ways. For example, you can model the consumer market using SD and the supply chain using AB approach. You can model the population of a city in a disaggregated way (as agents) and the underlying economic or infrastructural background in SD style. You can even put SD diagrams inside agents: e.g. SD can model the production process inside a company, whereas the company may be an agent at a higher level. Technically, interfaces and feedbacks between SD and AB or DE are very easy: some SD variables can be used in the decision logic of agents or be parameters of process flowcharts, and the latter in turn may modify other SD variables.

AnyLogic SD model applets online

alpicon.gif Bass Diffusion (also array version)

alpicon.gif Predator Prey

alpicon.gif Inventory Workforce

alpicon.gif SIR (Susceptible Infectious Recovered)

alpicon.gif Patient Flow

alpicon.gif Population (also array version)

alpicon.gif Urban Dynamics

alpicon.gif Supply Chain and Product Diffusion (combined SD + AB model)

alpicon.gif Ward Medication Management (combined SD + AB model)