Using the new XMILE Standard to run System Dynamics Models on the Web and in Mathematica
As part of our business prototyping methodology we often build System Dynamics models to help our clients make better decisions about the future of their business. Building models and experimenting with new business ideas and designs is fun – but models are only useful if you can use them to tell a story that motivates stakeholders to make decisions and take action. These stories are more than just a model – at a minimum they contain data and graphs about the business’ past and scenarios about how the business may develop in future. This post illustrates how simulation models can be embedded in powerful story-telling environments, such as websites and Wolfram Mathematica®.
Why Storytelling is Imporant
Simulation models are great tools for business transformation: you can use them to understand the situation a business is in now, to design and test new business ideas, business models and strategies and to evaluate possible future scenarios.
But in our experience, the best analysis and the best ideas are of little worth if you can’t use them to tell a good story that motivates stakeholders to take action and to implement the necessary changes.
So what mostly happens is that the stories are written up and presented as a slide show, using tools such as Microsoft Powerpoint® or Adobe InDesign®.
Now while I am a great believer in beautifully designed and well presented slideshows, I always feel that the interactive power of simulation models is lost in such presentations.
How We Tell Stories Using Simulation Models and Modern Web-Technology
For many years now my team and me have been searching for a way to combine both interactive simulations and storytelling into a single, seamless presentation. Fortunately, two recent advances in simulation technology and in web technology have given us the tools we need to do this:
- XMILE is a new interchange format for System Dynamics models based on XML. In essence this means that System Dynamics models are now saved in a format that can be read by humans and – more importantly – interpreted by software scripts. In our case, we create and maintain our System Dynamics models using iseesystem’s Stella Architect® modelling environment. Stella Architect supports the XMILE format, which enables us to import these models into other tools – in particular we have created a small framework that enables us to import a model in XMILE format into a web-page and then run it in a web-browser. The XMILE standard is maintained by OASIS, read more about it on the OASIS website.
So how do we go about building stories using these technologies?
For simple models, the process is straightforward:
- Build the model using Stella
- Build the presentation layer using web technology.
The great advantage of this approach is that we can maintain the model in Stella, but we can easily make the model available to a wide audience (everyone has a browser!).
It is important to maintain the model in a modelling tool such as Stella, because even small system dynamics models can be conceptually difficult to understand: in fact it is almost impossible without the visualisation provided by tools such as Stella. And the best thing about this approach is that we can fine tune the model and presentation layer independently of each other (as long as we don’t rename or remove the model elements that are presented in the presentation layer)
To give you a feeling for what a browser-based simulation looks like, I’ve embedded a small example simulation for you to play with below. The model simulates whether it is possible to complete some open tasks within a given deadline. You can make assumptions about how productive you will be and how much overtime you will invest, depending on the schedule pressure (which we defined as the ratio of the effort required to get the remaining work done to the maximum effort you can invest given the time that remains).
We built the model using Stella Architect and create a web app using the D3 framework. The simulation itself runs in our simulation framework, which imports XMILE models and runs them in a web browser (i.e. all calculations are done in the web browser, there is no interaction with the web server).
I’ve included the stock and flow diagram of the entire model below.
Using Mathematica to Prototype more Complex Stories
When it comes to more complex models, the story telling process and the modelling process are more closely intertwined: we build an initial model, then start writing the story around it. During the writing process new questions and insights arise, which lead to changes in the model.
With such an iterative approach, it is not really feasible to write the initial story using web technology: because building interactive web applications is not straightforward, the storyline needs to be fairly clear before you start building the web-application. So in these situations we prototype the story in Wolfram Mathematica® first and don’t start building the web app before the story is stable. This works because Mathematica provides a powerful environment that supports writing interactive documents, we have developed a Mathematica library that allows us to import and run System Dynamics models using XMILE.
Thus for more complex situations are approach is as follows:
- Build the model using Stella Architect
- Import the model into Mathematica and build the story.
- Repeat steps 1 and 2 until model and story are complete.
- Build an online presentation using web technology, using the Mathematica presentation as a basis.
Because Mathematica is so powerful, the process is actually fairly straightforward (at least if you know a little about Mathematica :-)) – I will provide a more detailed illustration of how this works in my next post.
Give it a try!