Discrete-Event Simulation Engine
SimPy FastAPI React

Find the station that holds your line back.

Cadence simulates a four-stage factory line, pinpoints the bottleneck, and quantifies what adding one more machine would change.

–orders / min
0completed
0in queues
Interactive browser preview Full discrete-event engine runs in SimPy backend

What the simulation covers

A stochastic, discrete-event model of a four-stage production line: Cutting, Assembly, Quality Inspection, and Packaging.

Parallel machines
Each station can operate multiple identical machines concurrently side by side.
Product-specific routes
Some product types bypass inspection, while others loop back from assembly for rework.
Stochastic arrivals & timing
Orders arrive at exponential intervals and station processing times follow probability distributions.
Rush orders
Priority queuing mechanisms move high-priority rush orders ahead of standard jobs.
Breakdowns & repairs
Machines experience stochastic failures and recover based on configurable MTBF and MTTR parameters.
What-if capacity analysis
Benchmark baseline performance directly against scenarios with added capacity at the bottleneck.

Six views in the dashboard

A clean, focused React interface. Each view answers a specific operational question about the production line.

Under the hood

Built with a clean separation between the simulation core, REST API layer, and interactive frontend.

Simulation Core

SimPy

Process-based discrete-event simulation engine driving queues, resource contention, and breakdowns.

REST API

FastAPI

Exposes simulation triggers and scenario comparisons over high-speed endpoints.

GET /health POST /api/simulate POST /api/compare
Client UI

React

Interactive analytics dashboard visualizing KPIs, station telemetry, and replay timelines via localhost:8000.

Run it locally

Requires Python 3.10+ and Node.js. Start the FastAPI server first, then launch the React development server.

1. Backend (FastAPI + SimPy)
cd backend
python -m venv .venv
.venv\Scripts\Activate.ps1   # macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
2. Frontend (React + Vite)
cd frontend
npm install
npm run dev

# Open http://localhost:5173