Modelling Complex Systems
Interactive simulation for modelling cognitive load, psychological safety, and hidden defects in complex systems.
Optimized for larger screens
Some simulations are best viewed on larger screens in landscape orientation, but they might work on your phone. I just don't optimise for them.
Built With
Overview
Overview
Agent-based simulation modelling the spread of entropy, error, and delay within complex organisational systems. Moves beyond simple “randomness” to show mechanisms from queuing theory, information theory, and organisational psychology.
Demonstrates how structural constraints (intermediation) and human factors (psychological safety, cognitive load) interact to create unpredictable effects on throughput and stability.
tl;dr Quick Explanation
tl;dr Quick Explanation
Bureaucracy (Ford Model)
The default scenario. Small squares (process gates) represent blockages like paperwork or approval steps. An abundance of stoppages slows the system, turning work (blue dots) to blocked (red).
Adjusting work volume and environment noise can find equilibrium, but throughput remains limited. The solution is reducing blockages.
Ideal Flow (Tesla Model)
Demonstrates the impact of load. Maximising work volume causes team rings to turn yellow then red, overflowing at an increasing rate. This causes system stutter (Shannon Entropy) and contributes to Little’s Law, slowing the system further—mirroring real organisational dynamics.
Scientific Basis & Mathematical Laws
Scientific Basis & Mathematical Laws
Core scientific principles:
Kingman’s Formula (Queuing Theory)
- Origin: John Kingman, 1961.
- Concept: Wait time (Wq) does not increase linearly with utilisation (ρ); it increases exponentially as utilisation approaches 100%.
// Calculate utilisation (capped at 99% to prevent infinite wait times)
const utilisation = Math.min(0.99, this.cognitiveLoad / 100);
// Apply cubic decay to processing speed as utilisation approaches 100%
// This approximates the sharp "hockey stick" curve of Kingman's Formula
this.processingSpeedMod = 1.0 - Math.pow(utilisation, 3);In Simulation: Nodes have a Cognitive Load capacity. As a node’s load exceeds 80%, its processing speed drops according to a cubic decay curve . This visually demonstrates why “busy” teams suddenly gridlock.
Little’s Law
- Origin: John Little, 1954.
Concept: The long-term average number of items in a stable system (L) is equal to the long-term average effective arrival rate (λ) multiplied by the average time an item spends in the system (W).
In Simulation: The WIP (Work In Progress) metric tracks L. Users can observe that increasing Frequency (λ) without increasing node speed results in an explosion of Lead Time (W), which is similar to a traffic jam forming when cars enter a highway faster than they exit.
// L (WIP) = λ (Arrival Rate) * W (Lead Time)
// In simulation, we track L directly as the number of active items
const L = workItems.length;
// Lead time (W) accumulates as items wait in queues
if (blocked) {
this.timeWaiting++;
} else {
this.timeActive++;
}Brooks’ Law
- Origin: Fred Brooks, The Mythical Man-Month, 1975.
- Concept: “Adding manpower to a late software project makes it later.” This is due to the combinatorial explosion of communication channels, calculated as .
In Simulation: The Coordination Penalty increases automatically as you add Value Units (nodes). This adds a global “noise” factor to the system, simulating the friction of alignment in larger groups.
// Metcalfe's Law / Brooks' Law derivative
// Coordination Penalty ∝ N(N-1)/2
const pairs = (nodeCount * (nodeCount - 1)) / 2;
const penalty = pairs * 0.0015;
// Applied as 'noise' to every action
const totalNoise = config.noiseLevel + penalty;Shannon Entropy (Information Theory)
- Origin: Claude Shannon, 1948.
- Concept: Entropy measures the level of uncertainty or disorder in a system.
In Simulation: The System Entropy metric analyses the spatial distribution of work items. Low entropy indicates structured, predictable pulses of work. High entropy indicates scattered, unpredictable jitter, which is a hallmark of unstable systems.
// Calculate Shannon Entropy H(X) = -Σ P(x) log P(x)
let entropy = 0;
workItems.forEach(w => {
// distribution of work items across links
const idx = links.indexOf(w.link);
if (idx > -1) distribution[idx]++;
});
distribution.forEach(count => {
if (count > 0) {
const p = count / workItems.length;
entropy -= p * Math.log(p);
}
});The Kalman Filter
- Origin: Rudolf Kalman, 1960.
- Concept: An algorithm that uses a series of measurements observed over time, containing statistical noise, to produce estimates of unknown variables.
In Simulation: When enabled, the Prediction Layer (represented by a cyan dashed ring) attempts to ‘chase’ and estimate the true Cognitive Load (the solid ring), filtering out stochastic jitter. It visually demonstrates the difficulty management faces in distinguishing “signal” (true capacity issues) from “noise” (random fluctuations).
// 1. Predict (Time Update)
let predNext = this.kfEstimate;
this.kfErrorCov = this.kfErrorCov + this.kfProcessNoise;
// 2. Update (Measurement)
const K = this.kfErrorCov / (this.kfErrorCov + this.kfMeasureNoise);
this.kfEstimate = this.kfEstimate + K * (measuredLoad - this.kfEstimate);
this.kfErrorCov = (1 - K) * this.kfErrorCov;The Hidden Factory (Rework)
- Origin: Armand Feigenbaum / Six Sigma.
- Concept: A significant portion of capacity is often consumed by correcting defects that were not caught at the source.
In Simulation: When Psychological Safety is low, errors are hidden (purple dots). These have a 50% chance of being rejected at the end of the line and sent back to the start, consuming capacity without generating value.
if (Math.random() < errorChance) {
if (Math.random() < config.psychSafety) {
// High Safety: Stop the line (Visible Error)
this.blockTimer = 40;
return false;
} else {
// Low Safety: Hide the error (Latent Defect)
workItem.isDefect = true;
return true;
}
}Human Factors
Human Factors
These controls model the soft-skills/psychological dimension of the system.
Psychological Safety
Definition: The belief that one will not be punished or humiliated for speaking up with ideas, questions, concerns, or mistakes (Amy Edmondson).
- High Safety: Teams stop the line when an error occurs (red blockage). This hurts short-term flow but prevents technical debt.
- Low Safety: Teams pass the error downstream to avoid blame. The dot turns purple (Hidden Defect) and continues moving, creating false flow metrics but eventual rework.
Cognitive Load
Definition: The total amount of mental effort being used in the working memory (John Sweller).
Mechanism: Represented by the coloured ring around a node. Work items add load; time decays it. High load triggers the Kingman effect (slowdown) and increases the probability of error generation.
Environmental Noise (Occasion Noise)
Definition: Transient variability in judgement or performance caused by external factors (mood, weather, interruptions) (Daniel Kahneman).
Mechanism: Adds random “jitter” to particle movement speed and increases the base probability of gate failure, independent of structural design.
System Design
System Design
These controls model the structural architecture of the organisation.
Value Units (Nodes)
Represents teams, departments, or servers. Increasing nodes increases capacity but incurs the Coordination Penalty (Brooks’s Law).
Intermediation (Gates)
Represents approval steps, handovers, bureaucracy, or middleware.
- Effect: Each gate is a potential failure point. Even with 99% reliability, a chain of 5 gates has only ~95% system reliability (0.995^5).
- Gridlock: In high-load states, gates become bottlenecks that drastically reduce Flow Efficiency.
Organisational Scenarios
Organisational Scenarios
Ideal Flow (The Tesla Model)
- Theory: Disintermediation. By removing approval gates and trusting the system, flow efficiency is maximised. Errors are rare and caught immediately.
- Observation: Note the high speed and consistent rhythm of the blue dots, representing optimal flow state.
Bureaucracy (The Ford Model)
- Theory: High intermediation. The system is designed for control, not flow. While stable under low load, it gridlocks easily under high load due to the sheer number of stoppage points.
- Observation: Watch how gates become bottlenecks, creating cascading delays throughout the system.
Toxic Crunch
- Theory: The “Death March.” Low safety forces teams to hide errors. Throughput looks high (dots are moving), but the system is actually churning out defects (purple dots) that will return as rework.
- Observation: Observe the high volume of ‘movement’ masking the accumulation of purple defects. This simulates ‘vanity metrics’ where teams look busy but are actually creating technical debt.
Stochastic Chaos
- Theory: High Entropy. Even without structural blockers (gates), the sheer amount of environmental noise prevents stable flow. Particles jitter and stall randomly, making prediction impossible.
Scaling Startup (Hypergrowth)
- Theory: Brooks’s Law in action. Rapid team growth outpaces process development. The coordination penalty N(N-1)/2 explodes as nodes increase.
- Observation: Watch the coordination penalty metric climb rapidly. The system transitions from “Flowing” to “Overloaded” as communication overhead dominates.
Enterprise Silos (Fragmentation)
- Theory: Conway’s Law visualised. High gate count represents approval chains between organisational silos. Work items stall at departmental boundaries.
- Observation: Note the high WIP and low throughput. Red blockages occur frequently at gates as work waits for cross-team approvals.
Lean Factory (Toyota TPS)
- Theory: Toyota Production System principles. Small, empowered teams with WIP limits and andon cord culture. Errors trigger immediate stops, preventing downstream waste.
- Observation: Steady, predictable flow with low WIP and high efficiency. Occasional red stops resolve quickly, preventing defect accumulation.
Remote First (Distributed Work)
- Theory: Kahneman’s “occasion noise” applied to distributed work. Time zones, async communication, and home interruptions add variability to all processes.
- Observation: Jittery movement and unpredictable delays. Entropy remains elevated despite reasonable structural design.