Simudyne - The right tool for serious simulation models
Sometimes, the stars align just right… Recently, a large global corporation reached out and asked me:
Ben, we have this FlexSim model of our high-speed manufacturing floor. It is great, but too slow for our purposes. Would AnyLogic be faster?
At the time, I was too busy to really dig in but a quick AnyLogic toy model looked promising. But the stars had more in store…
About 2 weeks later, I had an unrelated call with Justin Lyon, the CEO of Simudyne:
Hi Ben, we are looking to expand our ultra-performant Simudyne ABM-tool into new application areas such as manufacturing. Would you like to explore this a bit?
My brain cells started working. This would not be just “win-win”. This would be a win-win-win:
Overview
In this post, I want to share my experience along this journey. (I will publish another post where I go deeper into the manufacturing model I built).
Disclaimer
Simudyne paid for 5 days of my time. While this may, obviously, taint my experience, I will try to be as neutral as I can. The goal of the Simudyne investment is to educate others about when to use the tool, not to praise it as the be-all-end-all solution.
We will explore
Let’s dig in…
What is Simudyne
Simudyne is a tool for ultra-large agent-based simulation models (ABMs). It is being used for typical use-cases in finance, economics and environmental sciences. Typical Simudyne models have hundreds of thousands of agents, often even millions. The underlying architecture is streamlined for efficiency, applying parallelized message passing and many other distributed techniques to speed up models.
The philosophy
While learning the tool, I quickly realized that this is different to many other agent-based simulation tools. Simudyne strongly formalizes agent-based models following a specific “philosophy”. The key reason is, again, speed: They treat agent networks as a graph, to be solved using graph theory (specifically the Pregel framework).
Their help explains it best:
Rather than treating everything in the world in a massive list to iterate through and update a world state, we approach the problem from a bottom-up representation of the world where each agent can communicate via message passing between agents to create a world state that will inform their decisions.
So it is strongly de-centralized. And you as a modeler must follow along. In other tools like AnyLogic, you define the “philosophy” yourself: You can build a strongly de-centralized ABM. But you do not have to, and most people are not even aware of the possibility. The price to flexibility is computational speed.
The framework
So what exactly do you need to follow, then? Simply put, Simudyne requires you to structure models well and then design interactions around a specific sequence of actions:
Model structure
This is the standard part that is not too different from other ABM tools. Models consist of:
Obviously, you can refine and adjust these at any time.
Sequence
Here, I had to change my thinking quite a bit, compared to my normal AnyLogic world thinking… Simudyne ticks along time steps and follows a special sequence of actions, to ensure fast parallel computation:
The message passing/receiving happens in parallel, so modelers must be careful here. Also, it is your responsibility to send the right messages at the right time to the right receivers.
In other tools, I design message passing less formally. If an agent needs to send a message, I make it do so, without worrying about fundamental structural constraints. Again: the added flexibility comes at the cost of performance. A typical Simudyne ABM can run a lot faster than a comparable AnyLogic or NetLogo model.
When to use it
Maybe the description above did not make it clear yet, so let me spell it out: Simudyne is not the right tool for any purpose. Instead, it is the right tool for specific use cases, but for those it performs amazing. In a nutshell, you should use Simudyne if you are building a “serious” model, i.e. something of real importance. Something that has a huge impact and which is beyond a simple decision or a quick consulting gig. Essentially, when you are not “toying around” anymore. For example:
Large-scale systems
Use Simudyne when you need to model systems with more than 100k agents. Typical ABM packages quickly reach their practical limits due to inefficiencies, no in-built parallelism and non-optimized models. Typical use cases are economics, financial markets or social science models (population growth, climate change…)
领英推荐
Ultra-realistic digital twins
Another use case that will become more important in the future are simulation models of complex supply chains or manufacturing systems. Take a large warehouse of Amazon, Nike or Tesco: you easily have dozens of kilometers of conveyor belts, 1000s of items being processed each minute by 100s of machines.
Traditional simulation tools also easily reach their capability limits here: model speeds can be slower than real-time, rendering them useless even for simple analysis.
However, currently building such systems with Simudyne requires a lot of skill and experience. Simudyne will need to address and improve some of their API to help build such systems faster.
Conceptual models with truly big data
Another use case that would bring traditional simulation packages to their knees is this: A company has a true big-data lake and wants to get their quants to do fast “what-if” analysis. Streamlining huge datasets into an ABM-tool and testing some hypothesis is, normally, doomed to fail if your data would create millions of agents and interactions. Simudyne is designed for these exercises.
When NOT to use it
Simply put, do not even start with Simudyne if you need:
Conceptual models of simple systems
Such models are much easier build with traditional simulation tools like AnyLogic, NetLogo, FlexSim, Simio, you name it. Plus: you get custom visualizations for free.
One-off strategic or tactical decision support tools
A client needs to get an answer on a problem, but it is a one-off job. The client must be convinced of the outcome with good visualizations and the model may not be used again (or only intermittently). Here, the ROI is still in favour of traditional tools due to their speed, visualizations, and ease of use.
Low technical abilities
Simudyne requires a good technical grounding. If you can drag’n’drop building blocks in other simulation tools but not much more, you will have a problem. Solid OOP skills are a minimum requirement here, but you should be comfortable with SDKs, distributed computing and cloud deployments as well.
Simudyne advantages
This tool has amazing capabilities if you use it right and throw it at the right problems.
Tech stack
Simudyne is an SDK that builds upon on the most modern tech stack you can dream off. You can use any IDE (but go for IntelliJ of course ;) ) and work with the Maven build tool. It works on Windows, Mac and Linux. You can deploy it … well anywhere really. Working with Simudyne is like working for Google or Apple: you just use the latest and greatest standard IT tools.
Speed
Simudyne is designed for execution speed. As described above, it even forces you to follow a specific framework to make it work as fast as possible. So you may need extra effort in designing your model towards that framework but it is worth it: you gain ridiculous performance for complex, large systems.
Support
First, the Simudyne help is actually quite well done. Also, you have good step-by-step tutorials. But many tools have that these days. What makes Simudyne special is the fast and direct support you get from the developers. These folks are really helpful, especially in helping you translate a real system into the best “Simudyne way”.
Disadvantages
Just like anything, there are disadvantages as well, no need to shy away here. It depends on your skills and use-case if these are deal-breakers or irrelevant:
IDE
I have stated that the modern Simudyne tech stack is a huge plus. However, if you are used to the standard simulation-tool visual IDEs, using IntelliJ or Eclipse can be intimidating. But even as a seasoned coder myself, I struggled with a purely code-based IDE. Simply finding functions took me a little longer than my visual brain needs in AnyLogic.
Model visualization
Simudyne provides a default model visualization and UI. This looks cool initially (See image at the top of this article) but is very limited for customization.
However, this is actually done on purpose. You should use this to your advantage: Simudyne is intended to be used with custom visualization tools downstream, giving you all the flexibility you need.
Accessibility
As said before, Simudyne sits on a very modern tech stack. While this is great for seasoned coders, beginning simulation modelers might struggle a lot. If you previously dragged some blocks into AnyLogic or FlexSim, this is a whole new game. There is a ton of things to learn before you should even begin doing serious Simudyne work (see my tips below). Simudyne is a serious tool for serious uses :)
How to best learn Simudyne
Let’s assume you know very little about simulation, agent-based models and programming. Here is how you should approach learning Simudyne (you can simply cut off the points you already feel comfortable and join later):
Wrapup
Hope this helps some of you in understanding Simudyne and when to use it. In one sentence: Use Simudyne if you need to solve a big, serious problem and implement it into ongoing processes.
ML Engineer zypl.ai
1 年Thank you for this article, very interesting. Can you recommend this tool for a credit scoring model?
Founder, HASH
3 年HASH is a free and open-source simulation engine, also designed to scale, which utilizes the 'actor model' as well. A bit more on this message-passing approach here for folks who are interested: https://hash.ai/glossary/actor-model (HASH itself is JavaScript, Python and Rust as opposed to Java)
Technology Entrepreneur // Author // Mentor // Poet
3 年Benjamin Schumann, PhD - Very well written and analyzed !
AI Luminary Scientist and Distinguished Fellow
3 年Thanks for the review Ben! This is a fascinating development in the simulation world! However, here is my question - while current non-big simulation software have trouble with 100,000s of agents, why does one need to model with 100,000 of agents (not 100,000 types of agents)? Increasing the scale increases the overall computational requirements exponentially (due interactions between agents and environments etc.). What is the benefit of increasing the scale (not complexity) in simulation modeling? Is the expectation we get more emergent phenomenon not observed otherwise? Very curious of what use cases need such massive scale...
CEO, Simudyne helps institutions solve complex problems and make better decisions. Barclays Techstars '17
3 年Cem Dilmegani Thought I'd draw your attention to this interesting post on the use of Simudyne's SDK in manufacturing.