Twinworks Factory Simulation
Simulate a production line: throughput, lead time, WIP, OEE and the bottleneck, with CIs.
How it works
Runs the Twinworks discrete-event simulation on a factory model (sources, buffers, machines with failures and setups, assembly, conveyors, quality checks, operators and shift calendars). Returns throughput per hour, lead time, WIP with a Little’s-law check, per-station states and OEE, the bottleneck and a cost per good part, with Student-t confidence intervals across seeded replications.
- Discrete-event simulation with a binary-heap event calendar; ties are processed in (time, priority, insertion order) so every run is reproducible.
- Parts are pushed downstream with blocking after service: a machine that cannot hand its part on is “blocked”; a machine without parts is “starved/idle”.
- Each random quantity (arrivals, cycle times, failures, routing choices) has its own seeded stream, so scenario changes do not shift other random numbers (common random numbers).
- Statistics are reset after the warm-up. Replications use derived seeds; intervals are Student-t intervals of the replication means.
- Little’s law is checked as L (time-average WIP) versus λ·W (departure rate × mean time in system); differences above 5 % signal a non-stationary system or too short a run.
- OEE = availability × performance × quality with planned time = time on shift minus planned maintenance; availability losses = breakdowns + setups; performance = ideal cycle time × parts ÷ run time (starving and blocking reduce it); quality = good ÷ processed.
- Bottleneck: active-period method (Roser et al.) — at each moment the station with the longest uninterrupted active period (working, setup, repair, maintenance, waiting for an operator) is the bottleneck; overlaps between consecutive bottlenecks count as shifting.
A simulation is only as good as its input data. Validate cycle times, failure data and routings against your shop floor before making investment decisions.
Sources
- Law, A. M.: Simulation Modeling and Analysis, 5th ed. (McGraw-Hill, 2015) — event scheduling, replications, confidence intervals (McGraw-Hill)
- Roser, Nakano & Tanaka: A practical bottleneck detection method (Winter Simulation Conference 2001) (WSC)
- Hopp & Spearman: Factory Physics, 3rd ed. — Little’s law, VUT/Kingman equation, line throughput (Waveland Press)
- Nakajima, S.: Introduction to TPM — Overall Equipment Effectiveness = availability × performance × quality (Productivity Press)
- Little, J. D. C.: A proof for the queuing formula L = λW (Operations Research 9(3), 1961)
Part of Twinworks
-
Twinworks Factory digital twin & production simulation
Model a production line, simulate it and find the bottleneck — free.
Related tools
- Twinworks Bottleneck Analysis – Find the constraint of a production line and test fixes: ranked bottlenecks with what-if gains.
- Twinworks Buffer & Parameter Sweep – Sweep a buffer size (or any parameter) and get the throughput curve with confidence intervals.
- Twinworks Line Balancing – Assign assembly tasks to stations for a takt time: efficiency, balance delay and smoothness index.
- Twinworks Queueing Check – M/M/1, M/M/c, M/D/1, M/G/1 and Kingman waiting times — optionally verified by simulation.
How to use the Twinworks Factory Simulation
Simulate a production line from a template or your own model and read throughput, lead time, WIP, OEE, the bottleneck and cost per part with confidence intervals.
What it is for
Spreadsheet capacity plans assume every machine runs at its average speed all the time. Real lines don't: cycle times vary, machines break down, full buffers block and empty ones starve. A discrete-event simulation plays that out part by part, so you see the throughput and lead time the line will actually deliver.
This tool runs the Twinworks simulation engine on a model. You can start from one of seven templates (a 3-station line, a line with failures and shifts, assembly, a job shop, a bottleneck demo, a conveyor packaging line and an M/M/1 validation case) or paste a Twinworks project or bare model JSON with nodes and links. Times are in seconds, lengths in metres. You set the run length, warm-up, seed and number of replications, and get results with Student-t confidence intervals.
The result links back to the Twinworks app, where you can open the model, edit it on the canvas and watch the animation. The simulation is only as good as its inputs, so check cycle times and failure data against the shop floor first.
Worked example
The first example runs the 3-station line template with 5 replications. The model has random arrivals every 55 s on average and three machines with triangular cycle times: Saw 35/40/50 s, Mill 40/48/58 s and Deburr 30/38/45 s, with 5-place buffers between them. Each run lasts 8 h including a 30-minute warm-up.
3-station line: 63.8 ± 3.7 good parts/h (95 % CI, 5 replications), mean lead time 324 s, WIP 5.86; bottleneck: Mill.
The station table shows the Mill busy 88.8 % of the time, the Saw 75.9 % and Deburr 68.6 %. The Mill is the bottleneck 87.3 % of the time and is never blocked, but it still starves 11.2 % of the time. The cost block reports €6.51 per good part in replication 1 and a 6.44–6.81 interval across all five. Little's law checks out: L = 5.44 against λ·W = 5.44, an error of 0.16 %.
Here's the point worth noticing: an arrival every 55 s means only about 65 parts per hour come in, while the Mill could manage about 74 at its 48.7 s average cycle. This line is limited by its arrivals. Speeding up the Mill won't raise output; more incoming work would.
How to read the result
- Throughput: good parts per hour, mean and interval across replications. The headline number.
- Lead time: time from arrival to sink, with p50/p90/p95. The p90 (500 s here) is what a customer feels on a bad day.
- WIP and Little's law: average parts in the system. A relative error above 5 % means the run is too short or the system isn't stationary.
- Stations: share of time busy, in setup, waiting for an operator, blocked, idle, down or off shift, plus OEE.
- Bottleneck: the active-period ranking (sole and shifting shares) with plain-language recommendations.
- Cost: machine time, labour, material, overhead, scrap and cost per good part.
Tips and common mistakes
- Always use several replications. One run gives one random sample and no interval at all.
- Make the warm-up long enough to fill the buffers, or the empty start flatters lead time.
- The same seed gives the same result. Change it to check that a conclusion isn't luck.
- A station with high utilization isn't automatically the constraint. Compare its throughput limit with the arrival rate, as in the example.
- Detailed station numbers come from replication 1; the intervals come from all replications. Don't mix them up when you quote figures.
FAQ
Can I simulate my own line?
Yes. Paste a project exported from the Twinworks app, or a model JSON with nodes and links.
How many replications do I need?
Five is a reasonable start. If the interval is too wide to decide between options, add replications.
Why do the summary and the lead-time block show different means?
The summary uses the mean across replications (324 s); the lead-time block details replication 1 (298 s).
Does OEE include starving and blocking?
Yes, through performance. Breakdowns and setups lower availability.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://twinworkssimulate.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://twinworkssimulate.usefulweb.site/mcp· tool nametwinworks_simulate
Example request
curl -s -X POST https://twinworkssimulate.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"template":"three-station-line","replications":5}'