Simulations in, simulations out
What (roughly) simulations in Complexity will look like.
Complexity has demo-/semi- officially acquired a simulation mode. There is nothing about it in the user manual, and probably won't be for a while: the simulation features are still growing and being tested on different types of processes. But quite a few processes can already be simulated, with useful results. So for now, I'm writing about it here, and only here, on the blog.
What is simulation mode for? Once a process has been mapped, the map itself can help answer some important questions about how it works. Four questions are particularly useful:
- Are there steps that measurably slow the process down and limit its throughput?
- Are there steps that could be reduced without causing problems? The map often reveals steps that can be eliminated altogether by merging them with others or moving them elsewhere. But sometimes a step cannot be removed, only scaled down. For example, a task currently done by two people: what would happen if only one person did it?
- What happens if the incoming workload suddenly increases? Say a process is designed to produce 20 cabinets a day. What happens if an order for 50 comes in?
- What could be changed to increase the process's output? Which steps need more capacity to produce more?
Complexity can help answer all four questions in most cases. All you need to do is describe each step in a little more detail: how long it takes, how many people work on it, the probability of each possible outcome, and the queues involved and their sizes. Then run a Monte Carlo simulation. Complexity will show you which steps matter most when answering each question.
This is not particularly easy, and it never will be. You have to describe how things actually work, and describing reality is rarely straightforward. But once you've done that, there's no need to guess. The simulation gives you reliable answers, provided the steps have been described accurately.
How do you set it up? Let's use the existing demo map of a bread production process. All simulation parameters have already been configured, and the simulation has been run. So you don't even need to edit anything to explore the answers to these questions for this particular process.
Configuring steps
Every step has inputs and outputs, and simulation doesn't change that. What has changed is the step editor: it now has a separate section for simulation settings. Working from top to bottom, you can specify how much the step takes in, how much it produces, how frequently it does so, and how it distributes its output among the following steps.

For example, this particular step — Fine measurement — takes in salt, sugar and yeast, and outputs salt, sugar and yeast. But it doesn't distribute them randomly:

It processes them one at a time: salt first, then sugar, then yeast, and back to salt again (the general rule is to process whichever item has been waiting in the queue the longest). Each operation takes between 30 seconds and one minute. Most take around 45 seconds, the midpoint of that range, but some may take a little longer or less.

Whether a step processes inputs sequentially or all at once is controlled by its input settings. If you enable Requires all inputs, the step will wait until it has salt, sugar and yeast, then process all three together.
But that's not how it works in real life: the baker measures the salt first, then the sugar, then the yeast. So Requires all inputs is left unchecked.

Finally, at the bottom of the editor, you configure how the step sends its outputs and how it operates. Each step can have a stack (the number of people, machines or other resources working simultaneously) and its own queue of items waiting to be processed. This particular step has neither a stack nor a queue:
- Stack. This step doesn't need one because the task is performed by a single person. But other steps may be performed simultaneously by, say, 10 independent workers. If a process contains steps with a stack larger than one, simulation can help determine exactly how many workers are needed to keep the process running at its current speed.
- Queue size. Imagine an oven that can hold only 40 loaves, while the previous steps have already produced 80. In the simulation, the extra 40 will most likely drop dead (depending on the settings). But there's nothing to stop you from having a queue of loaves waiting to go into the oven, and that queue can be as large as you like. That's what the Queue size setting controls. This particular step has no queue limit (infinite queue size). That's simply because none of its three inputs spoil (see below), and they're small enough that storage isn't an issue. If you set a finite queue size, an additional setting appears: what should happen when the queue is full. You can either discard incoming items or pause the previous steps until space becomes available.
Loops
Most processes have some form of feedback, and the easiest way to represent it is usually with a loop. This particular process has one such feedback loop: checking the quality of the dough mixing and kneading.

If the dough is still too coarse, it is sent back for another round of mixing. This is configured on both ends of the loop: the receiving step and the sending step. The illustration above shows the mixing step, which is the receiving end. In its input list, dough is marked with a feedback icon. The simulation settings below specify what happens to the dough when it returns to the mixer. In this case, another 5–10 minutes are added to the mixing time, usually closer to five. But in other situations, such as finding and fixing defective products, you might choose Joins the next job instead. This means the returned item is added to the next job that comes through.

On the sending side, in this case the Manual check step, you specify the probability of sending an item back and how many times it can be sent back. Here, the probability that the dough will be too coarse is set to 30%, with a maximum of five checks. Setting a maximum is optional: the probability naturally decreases with each pass. If the initial chance is 30%, the probability of a second return is 9%, and by the third it's down to just 2.7%. So with every cycle, the chance of another check and another return gets smaller.
Objects
The final part of setting up a simulation is configuring the objects themselves. This particular map doesn't have many objects: salt, water, flour and yeast. That's pretty much all you need to make bread. But these ingredients are combined to create new objects. In this case, they become dough, which then turns into measured portions of dough, and eventually into loaves of bread. Each object can also have a maximum shelf life or processing time.

To set this up, you need to specify which objects are variants of other objects and how long they can be processed without spoiling. In this map, for example, a measured portion of dough - the Boule - is defined as a variant of dough, so it inherits the same shelf life. The Dough itself has a shelf life of three hours.
This makes it possible to see when and where objects expire while moving through a process. Take the demo map of lead processing: you can set an expiration time for leads. That's a typical business rule. Let's say a lead should spend no more than a week in the process. The simulation will then show exactly how many leads expired while waiting or being fully processed, and at which stages.
Simulation
Once you’ve configured all these settings for every step in your process, and made them realistic enough, you can switch to simulation mode and run your own simulation. Complexity will model the process using the ranges of randomness you’ve defined. If anything is missing, it will tell you exactly which steps still need data.
Set the simulation duration (the longer it runs, the more time your computer will need to process it), and you’re ready to go. Complexity generates a report organised around questions rather than dumping all the results into one huge table. These questions broadly correspond to the ones I listed above:
- How do we get more out?
- Where do we have more than we need?
- Where do we lose things?
- Can we handle a surge?
Each question gets its own card, with answers wherever the available data makes them possible. For example, if none of the steps has a stack larger than one, there’s no way to determine where you have more workers than you need.

You can also run a simulation with an increased initial inflow, compared to the baseline already defined in the map. Or you can use comparison mode: select one or two steps, change their parameters, and see how those changes affect the process as a whole.
In both cases, the simulation report includes before-and-after figures. For an increased inflow, it also shows the peak workload and how quickly the process returns to normal.
This isn't a complete description of the simulation features. For example, I haven't covered splitting objects (take one batch of dough and divide it into 40 portions), defect rates, and many other things. These details are still being refined, along with the interface, but this should give you a general idea of what simulation can do.
The good news is that all Complexity users on a paid plan can already simulate their own processes. Give it a try, and share your ideas through the feedback form at the bottom of the screen.