Back to projects

Personal software project · 3D simulation

Sorter PPH Simulator

A 3D discrete-event simulator for cross-belt sorter plants: lay the plant out, run it, and read its throughput before anything is built.

  • Runs in the browser
  • React 19 · TypeScript
  • three.js
  • Discrete-event engine
  • Electron build
01 What it is

What it is.

An engineering tool that turns a sorter layout into measured throughput: the plant is drawn in 3D, run as a discrete-event simulation, and handed over as the files the control software and the emulator read.

Design

Lay the plant out

Sorter loop, induction lines with their feed chains, chute groups, sensors and devices, placed by drag and drop.

Simulate

Run it

Parcels are generated, metered, inducted onto cells and discharged, with recirculation, chute capacity and the belt control logic.

Deliver

Read and export

Live KPIs, analytics views, comparison studies, and exports for the control system, the emulator and the project documents.

02 Builder

3D plant builder.

  • A catalog of 27 conveyor module kinds, dropped onto the plant or placed with a click
  • Feed chains with joints, curves, inclines and merging fingers onto other lines
  • Photo-eyes, reading tunnels, tracking zones and command panels dragged along their belt
  • Every belt inspected and edited in place, with undo and redo throughout
03 Simulation

Live simulation.

  • A discrete-event engine: parcels generated, metered on the belts, inducted onto cells and discharged into chutes
  • Chute capacity, reject chutes, sort plans and recirculation with its causes
  • A control model that reproduces the belt logic step by step, every 20 ms
  • Live KPIs over 1, 5, 10 and 60-minute windows, at real time or up to 50 times faster
04 Analytics

Engineering analytics.

  • Throughput against the mechanical limit, per line and per chute group
  • Cell occupancy along the track, with the fullest and emptiest sections
  • Chute groups, the fill state of every chute and the flow reserved per line

Thirteen views in all: throughput, recirculation, utilisation and queues, track profile, induction lines, line control, chutes, parcel types, capacity analysis, report, event log and more.

Throughput. Against the mechanical limit, per line and per chute group.
Track profile. Cell occupancy along the track, with the fullest and emptiest sections.
05 Walk-through

Walk the track.

A first-person camera moves along the sorter at eye height while the simulation runs. Device labels appear as you pass them, and the parcels travel on the cells beside you.

06 Studies

Scenarios and studies.

  • Saved scenarios keep their own configuration and their last results
  • Headless runs at full speed in the background, several at once
  • Side-by-side comparison of the final KPIs
  • Replication studies over several seeds and loading profiles, with confidence on the means
  • A capacity estimate before any run: demand, mechanical limit and chute capacity
07 Files

Import and export.

Everything is read and written in the browser: no server, no installation, the files go straight from the project folder into the plant and back out.

Imports

  • Layout tables in XLSX or CSV, in either language
  • Project workbooks and PDF drawings, parsed in the browser
  • Configurations and scenario libraries of the tool
  • A site database folder, several files at once

One plant model

Sorter, lines, chute groups and devices in a single versioned configuration, reconciled against the documents with a report of every difference.

Exports

  • Configuration JSON and layout CSV
  • PPTX slide decks drawn from the layout
  • ZIP packages for the control system and the emulator
  • A layout file a SCADA builds its mimic from
08 Under the hood

How it's built.

Frontend

React 19, TypeScript in strict mode, Vite. Zustand stores with an undo and redo history.

3D

three.js through React Three Fiber. Loop geometry from track modules, instanced cells and parcels, orbit and walk cameras.

Engine

A deterministic discrete-event core with a seeded random generator, a 20 ms belt control model and a headless mode for studies.

Documents

pdf.js for the drawings, a lightweight XLSX reader for workbooks the usual parsers refuse, PPTX and ZIP writers for the exports.

Quality

Vitest unit tests on the engine, parsers and exports; Playwright browser tests on the real app; continuous integration on every push.

Delivery

Runs in the browser, or as a portable Electron build for engineers without a development environment.

09 Numbers

The project in numbers.

34k
lines of TypeScript, plus 6,600 of tests
249
unit tests on the engine, parsers and exports
21
browser tests driving the real application
27
conveyor module kinds in the catalog
13
analytics views on a running plant
9
export formats: databases, experiments, decks, tables
Designed and built end to end

Domain model, 3D rendering, simulation engine, document parsers, exports and the test suite: one engineer, one codebase.

Simone Minuz · simoneminuz.com