Twinworks. Factory digital twin & production simulation
Draw a production line on a floor plan and watch a discrete-event simulation run it in 2D or 3D. Live KPIs show throughput, OEE and the bottleneck; scenarios and sweeps answer what-if questions.
Features
Twinworks is a factory digital twin. Draw a production line on a floor plan with sources, buffers, machines, assembly stations, conveyors, quality checks and operators, then watch a seeded discrete-event simulation animate it in 2D or 3D. Live KPIs show throughput, lead time, WIP with a Little’s-law check, OEE per machine, state Gantt charts and the bottleneck, and the scenario manager, parameter sweeps and cost model turn it into a what-if laboratory.
Own simulation engine
Seeded discrete-event simulation with a binary-heap event calendar, warm-up, replications and Student-t confidence intervals — the same code powers the API.
Realistic randomness
Constant, uniform, triangular, truncated normal, exponential and lognormal cycle times, arrivals by interval, schedule, batch or unlimited supply.
Failures & maintenance
Breakdowns with MTBF/MTTR distributions on calendar or operating time, planned maintenance, setups on product change and batch processing.
Operators, shifts & transport
Shared resource pools and shift calendars; stations model loaded vehicle trips and empty returns, and the transport planner estimates their times from routes, shared aisles and the fleet.
Conveyors, routing & PLC control
Accumulating and non-accumulating conveyors; routing by percentage, round robin, shortest queue, product or routing; and a PLC program (Structured Text, ladder or state machine) that switches stations, sources and diverters in lock-step with the simulation.
Assembly, quality & rework
Kit assembly from several feeders, inspection with scrap and rework loops, product variants with colours and job-shop routings.
Bottleneck detection & line capacity
Active-period method with sole and shifting bottlenecks plus utilization ranking, recommendations and what-if gains — and an analytic line capacity check with takt time, OEE and Little’s law.
Scenarios side by side
Clone the model, change it and compare scenarios with paired confidence intervals on the same random numbers.
Sweeps & buffer optimiser
Sweep a buffer size, server count, cycle time, MTTR or crew size and see the throughput curve with its knee point — or let the optimiser distribute a fixed number of buffer places for maximum throughput.
Cost model
Machine hourly rates, labour, material, scrap and overhead roll up to a cost per good part and profit per scenario.
Import, reports & exports
Build a line from a spreadsheet station table (CSV), print a KPI report, export the CSV event log and time series, JSON model and PNG/SVG of the layout and every chart.
API & MCP tools
Simulate, rank bottlenecks, balance lines, calculate line capacity and check queueing formulas. A separate material transport scheduler estimates shared-fleet waiting and travel times.
Screenshots
Templates
Start from a ready-made project and change it to fit.
3-station line
A simple serial line: random arrivals, three machines with triangular cycle times and two small buffers. The classic starting point.
Line with failures & shifts
Saturated three-machine line with random breakdowns (MTBF/MTTR), planned maintenance, a two-shift calendar with breaks and an operator pool. Shows availability losses in OEE.
Assembly with two feeders
Housings and covers are made on two feeder lines and joined at an assembly station (1 housing + 2 covers), followed by an end-of-line test with scrap and a rework loop. Assembly needs an operator from a shared pool.
Job shop with routings
Three product families visit four machine groups in different orders (product routings). A transport hub dispatches each part to the next step of its routing; the mill needs a 2.5-minute setup whenever the product family changes.
Bottleneck demo with buffer sizing
Five stations, tiny buffers and one variable station in the middle. Use the bottleneck analysis to find the constraint, then sweep the buffer in front of it from 1 to 10 to see where more space stops paying off.
Conveyor packaging line
A bottling and packaging line: filler, non-accumulating transfer belt, labeller with micro-stops, accumulating buffer table, case packer (12 bottles → 1 case), checkweigher and a pallet conveyor. Shows how accumulation decouples a failing labeller from the packer.
Queueing validation (M/M/1)
Poisson arrivals (mean 60 s) and an exponential machine (mean 48 s, ρ = 0.8) with an unlimited queue. Theory: mean wait in queue Wq = ρ/(μ−λ) = 192 s, Lq = 3.2. Run 20 long replications and compare the confidence interval.
Shared forklift fleet
Two cells hand finished pallets to transport stations that share one pool of two forklifts. Each trip is loaded travel (cycle time) plus an empty return; the forklift stays busy while delivery is blocked. Set the pool to one forklift to see the transport queue grow.
All 9 templates
PLC-controlled line
A three-station line whose infeed is switched by a PLC program in lock-step with the simulation: Structured Text two-point control stops releasing parts at 4 parts in B1 and resumes at 1. Analyze → Control (PLC)… shows the program, the bindings and the scan trace; the second scenario runs without the PLC.
Built-in tools
Twinworks uses these tools. Each one also has its own page and works on its own, on its page, through the JSON API and through MCP.
- Twinworks Factory Simulation Twinworks engineSimulate a production line: throughput, lead time, WIP, OEE and the bottleneck, with CIs.
- Twinworks Bottleneck Analysis Twinworks engineFind the constraint of a production line and test fixes: ranked bottlenecks with what-if gains.
- Twinworks Line Balancing Twinworks engineAssign assembly tasks to stations for a takt time: efficiency, balance delay and smoothness index.
- Twinworks Buffer & Parameter Sweep Twinworks engineSweep a buffer size (or any parameter) and get the throughput curve with confidence intervals.
- Twinworks Buffer Allocation Optimiser Twinworks engineDistribute a fixed number of buffer places over a line for maximum throughput.
- Twinworks Queueing Check Twinworks engineM/M/1, M/M/c, M/D/1, M/G/1 and Kingman waiting times — optionally verified by simulation.
All 9 tools
- Twinworks Line Capacity Calculator Twinworks engineTakt time, bottleneck, OEE, throughput and Little’s law lead time of a production line.
- Material Transport Scheduler Twinworks engineSchedule shared vehicles and inspect travel and waiting times.
- Twinworks PLC Scan Simulator Twinworks engineStructured Text, ladder or state machine + input timeline → scan-by-scan outputs, timers and trace.
For AI agents
Twinworks runs on a deterministic engine. The same functions are available as tools with a JSON API and MCP, so scripts and AI agents get exactly the results the app shows.
- Twinworks Factory Simulation – Simulate a production line: throughput, lead time, WIP, OEE and the bottleneck, with CIs.
Tool page ·POST https://twinworks.usefulweb.site/api/v1/tools/twinworks-simulate/calculate· MCPtwinworks_simulate - Twinworks Bottleneck Analysis – Find the constraint of a production line and test fixes: ranked bottlenecks with what-if gains.
Tool page ·POST https://twinworks.usefulweb.site/api/v1/tools/twinworks-bottleneck-analysis/calculate· MCPtwinworks_bottleneck_analysis - Twinworks Line Balancing – Assign assembly tasks to stations for a takt time: efficiency, balance delay and smoothness index.
Tool page ·POST https://twinworks.usefulweb.site/api/v1/tools/twinworks-line-balance/calculate· MCPtwinworks_line_balance - Twinworks Buffer & Parameter Sweep – Sweep a buffer size (or any parameter) and get the throughput curve with confidence intervals.
Tool page ·POST https://twinworks.usefulweb.site/api/v1/tools/twinworks-buffer-sweep/calculate· MCPtwinworks_buffer_sweep - Twinworks Buffer Allocation Optimiser – Distribute a fixed number of buffer places over a line for maximum throughput.
Tool page ·POST https://twinworks.usefulweb.site/api/v1/tools/twinworks-buffer-allocation/calculate· MCPtwinworks_buffer_allocation - Twinworks Queueing Check – M/M/1, M/M/c, M/D/1, M/G/1 and Kingman waiting times — optionally verified by simulation.
Tool page ·POST https://twinworks.usefulweb.site/api/v1/tools/twinworks-queue-formulas/calculate· MCPtwinworks_queue_formulas
- MCP endpoint (Streamable HTTP):
https://twinworks.usefulweb.site/mcp - Project file format (JSON Schema): https://twinworks.usefulweb.site/project.schema.json
- OpenAPI description: /openapi.json · llms.txt · API & MCP
Build a project through the API, then open it in the app with a link to https://twinworks.usefulweb.site/app#project=<base64url JSON>.
Import & export
Import
- Twinworks project (.twinworks.json)
- Twinworks model JSON
- Station table (CSV/TSV from a spreadsheet, MES or routing sheet)
- Project link (#project=…)
Export
- Twinworks project (.twinworks.json)
- CSV event log
- CSV time series
- CSV station KPIs
- PNG and SVG of the layout
- PNG and SVG of charts
- PLC scan trace (CSV)
- Printable KPI report (PDF via print)
Keyboard shortcuts
| Keys | Action |
|---|---|
| V | Select tool |
| C | Connect tool |
| 1 … 8 | Place source, buffer, machine, assembly, split, conveyor, quality check, sink |
| Space | Play / pause simulation |
| Home | Reset simulation |
| . | Single step (next event) |
| Shift + F | Fast-forward to the end |
| Ctrl + R | Run experiment (replications) |
| Ctrl + Z / Ctrl + Y | Undo / redo |
| Ctrl + C / Ctrl + V / Ctrl + D | Copy / paste / duplicate |
| Delete | Delete selection |
| Arrow keys | Nudge selection (Shift = 1 m) |
All 19 shortcuts
| Keys | Action |
|---|---|
| R | Rotate selection 90° |
| F | Zoom to fit |
| G | Toggle snap to grid |
| T | Switch 2D plan / 3D view |
| Ctrl + S | Save project file |
| Ctrl + O | Open project file |
| ? | Keyboard shortcuts |
Tutorials
Learn Twinworks step by step.
- Your first production line in 5 minutesPlace a source, a buffer, a machine and a sink, connect them, press play and read throughput, lead time and the bottleneck. No account, nothing to install.Beginner 5 min
- Failures, shifts and operatorsMake the model realistic with breakdowns (MTBF/MTTR), planned maintenance, setups on product change, shared operators and a two-shift calendar with breaks.Intermediate 12 min
- Find the bottleneckUse the active-period method, utilization, the state Gantt chart and OEE to find what really limits your line — and test fixes with the what-if analysis before spending money.Intermediate 10 min
- Scenarios and buffer sweepsClone your model into what-if scenarios, compare them side by side with paired confidence intervals, sweep a buffer size to find the knee of the throughput curve, and let the optimiser place a fixed number of buffer places.Intermediate 15 min
- Assembly, routings and qualityJoin parts from two feeder lines at an assembly station, add an end-of-line test with scrap and a rework loop, and model a job shop where each product family follows its own routing.Advanced 15 min
- Line balancing and cost per partDistribute assembly tasks over stations for a takt time with the ranked positional weight method, turn the result into a simulated line, and read the cost per good part.Intermediate 10 min
Frequently asked questions
Can my team work on one factory model together?
Yes, with a free usefulweb account. File → Save to workspace… puts the whole project with all scenarios into a shared workspace; teammates open it with File → Open from workspace… or a shared link, and every change syncs live. Viewers see the model read-only but can still run simulations and experiments. Comments can point at a station, buffer or other object. Without an account, Twinworks keeps working as before.
Can I test PLC logic against the factory model?
Yes. Analyze → Control (PLC)… binds a small PLC program to the model: sensors such as part present, buffer full or machine busy feed its inputs, and its outputs switch a station's run permit, a source's release or a split's divert. Write Structured Text (an IEC 61131-3 subset with TON/TOF/TP timers and CTU/CTD counters), ladder rungs or a state machine. Every scan cycle is a simulation event, and Test run compares the line with and without the program. It is a simulation only; nothing connects to real controllers.
Is Twinworks really free?
Yes. Projects are stored in IndexedDB and as files you download. No account is needed, and data is sent to our server only if you call the API yourself or save to a shared workspace.
How accurate is the simulation?
The engine is validated against queueing theory: M/M/1 and M/M/c waiting times fall inside the simulated confidence intervals, a deterministic line produces exactly 1 ÷ bottleneck cycle time, and Little’s law holds within a few percent in steady state. The accuracy of your model depends on your input data.
Why do I need replications and a warm-up?
A single random run is one sample. Replications with different seeds give a confidence interval for each KPI, and the warm-up removes the empty-line start so averages describe steady operation.
How is the bottleneck detected?
With the active-period method: whichever station has been working (or under repair, in setup, waiting for an operator) without interruption the longest is the bottleneck at that moment. Overlaps between successive bottlenecks are shifting bottlenecks. Utilization is shown as a second indicator.
How is OEE calculated?
Availability = run time ÷ planned time (breakdowns and setups are losses, shift breaks and planned maintenance are not planned time), performance = ideal cycle time × parts ÷ run time, quality = good ÷ processed parts. OEE is their product.
Can an AI agent build and run a model?
Yes. The project format is documented as a JSON schema; the twinworks-simulate, twinworks-bottleneck-analysis, twinworks-buffer-sweep, twinworks-buffer-allocation, twinworks-line-balance and twinworks-queue-formulas tools are available via the JSON API and MCP, and results contain an “Open in Twinworks” link.
Can I import data from my MES, ERP or a spreadsheet?
Yes, as files: File → Import line from table turns a CSV/TSV station list (name, cycle time, distribution, servers, buffer, MTBF/MTTR, scrap …) into a line, and models are plain JSON that a script can generate. Live connectors to MES/ERP systems are not included.
How does the buffer optimiser work?
Analyze → Optimise buffer allocation distributes a fixed number of buffer places: every buffer starts at the minimum and each further place goes to the buffer where it adds the most throughput, with the same random numbers for every candidate. It also tells you how few well-placed places reach today’s throughput. The same engine is the twinworks-buffer-allocation API/MCP tool.
Can I model forklifts or AGVs shared between stations?
Yes, as shared-vehicle transport stations: a machine whose cycle time is the loaded trip borrows a vehicle from a resource pool and keeps it through blocked delivery and an empty return. The Shared forklift fleet template shows it. Individual vehicle positions and traffic are not simulated in the factory model. Analyze → Transport planner… builds a route plan from the model, schedules the moves on two-way segments with shared aisles, shows queue waits and vehicle utilisation, exports CSV and writes the estimated travel times back to the stations in one undoable step.
Limitations
What Twinworks does not do (yet):
- The PLC of the Control module runs an IEC 61131-3 subset (no arrays, strings, structures or user function blocks), reacts only at its scan times and can hold stations, sources and diverters but not conveyors; it is not a certified runtime and has no real I/O.
- Discrete parts only: no continuous flow (liquids, bulk material) or fluid tanks.
- Connections are instantaneous unless modeled with a conveyor or a shared-vehicle transport station. Vehicle stations use loaded cycle and empty return times; individual positions, traffic and path finding are not simulated during a run. The transport planner estimates those times separately with an even request rate and shortest uncongested paths.
- Operators are pooled resources without walking times, skills matrices or individual schedules.
- Conveyors use a slot model (length ÷ pitch) rather than exact physics; merges and curves are not modelled geometrically.
- The 3D view is a schematic visualisation, not CAD; no import of 3D models or DWG floor plans.
- Optimisation covers buffer allocation (greedy, one place at a time); other parameters are explored with one-parameter sweeps rather than a general optimisation solver.
- On phones the plan opens view-only (pan, pinch-zoom, simulate); editing can be switched on but is easiest on a tablet or computer.
- API calls are limited to roughly 40 million events per request; long studies run best in the app.
Other apps

Virtual electronics workbench
Draw a circuit, switch it on, and measure it with real-feeling bench instruments.

Math notebook
Solve, graph, test and visualise in one notebook — with data, findings and a report.

Sky & space atlas
See the sky of any place and moment, plan eclipses and satellite passes, print star maps.

Robot motion studio
Simulate robot arms: kinematics, trajectories, collisions, program export.

Phone sensor instruments & measurement log
Your phone as 14 pocket instruments, with a measurement log you can export and share.

Card and board games table
47 card games and 8 board games: Skat, Bridge, Draughts, Go and more, at home or online.
Twinworks opens in a browser tab, free and with no sign-up.













