Twinworks Buffer & Parameter Sweep

Sweep a buffer size (or any parameter) and get the throughput curve with confidence intervals.

A Twinworks project (.twinworks.json, format "twinworks-project") or a bare model with "nodes" and "links". Times in seconds, lengths in metres. Leave empty and pick a template instead.

More options

Id of the buffer/machine/conveyor/source to change, or pool:<id> for an operator pool. Default for the bottleneck template: B2.

h

Overrides the model setting.

Try an example: ·

More about this tool

Part of Twinworks

How it works

Runs a Twinworks factory model repeatedly while one parameter changes — typically the capacity of a buffer from 1 to 10 places, but also servers, cycle times, MTTR, batch sizes, conveyor speed or the number of operators. Returns throughput, lead time and WIP per value with confidence intervals, plus the knee point where extra capacity stops paying off.

  • For each parameter value the model is copied, the parameter is set and the model is simulated with the same seeds (common random numbers), so differences between values are not masked by random noise.
  • Throughput, lead time and WIP are reported as Student-t intervals across replications.
  • Overload: a value counts as overloaded when a station is busy at least 99.5 % of the time, or at least 97 % while the mean lead time varies by more than half its value across replications. Arrivals then outpace the line, queues grow for the whole run and the measured throughput only reflects the run length.
  • Knee point = the cheapest stable value whose mean throughput is at least 98 % of the best stable mean throughput. For parameters where a larger value adds capacity (buffer places, servers, operators, speed, MTBF, batch size) that is the smallest such value: beyond it, more capacity mostly adds WIP and lead time (Little’s law). For times and arrival intervals, where a smaller value adds capacity or load, it is the largest such value. Overloaded values are never the knee.

The sweep varies one parameter at a time; interactions between buffers are not optimised jointly.

Sources

Part of Twinworks

  • Twinworks Factory digital twin & production simulation

    Model a production line, simulate it and find the bottleneck — free.

    Open Twinworks

Related tools

How to use the Twinworks Buffer & Parameter Sweep

Vary one buffer size or machine parameter over a range, compare throughput, lead time and WIP per value, and find the knee where more capacity stops paying off.

What it is for

"How big should the buffer in front of the hone be?" is a classic question with an annoying answer: it depends on variability, breakdowns and the stations around it. Too small and the bottleneck starves or blocks; too big and you pay in floor space, work in progress and lead time. A sweep answers it with numbers: simulate the line once for every value and see where the curve flattens.

This tool takes a Twinworks model or template, an object id (a buffer, machine, conveyor, source, or pool:<id> for operators), a parameter and a range. Capacity is the usual choice, but you can also sweep servers, cycle time, batch size, arrival interval, conveyor speed or length, MTTR, MTBF, setup time, scrap rate or operator count. Every value uses the same seeds (common random numbers), so differences between values come from the parameter, not from luck.

It changes one parameter at a time. To spread a fixed number of places over several buffers, use the Buffer Allocation Optimiser.

Worked example

The first example sweeps buffer B2 (in front of the variable OP30 Hone station) in the bottleneck demo template from 1 to 10 places, with 4 replications of 6 h per value.

Throughput ranges from 95.9 to 102.9 parts/h over Buffer capacity 1…10 at B2; knee point at 5.

Worked example
B2 placesParts/hLead time (s)WIP
195.92917.8
298.33088.5
5101.0535810.1
10102.941612.0

The knee at 5 is the smallest size that reaches 98 % of the best stable throughput. Going from 1 to 5 places buys 5.2 parts/h. Going from 5 to 10 buys only 1.85 more, while lead time grows by another 58 s and WIP by about two parts. Cost per good part barely moves after 5 (€11.60 vs €11.58). Five places is the sensible choice unless floor space is free and lead time doesn't matter.

How to read the result

  • Points: one row per value with throughput, lead time, WIP and cost per good part, each as a mean with a confidence interval.
  • Bottleneck: the main constraint at that value. If it changes along the sweep, the parameter has moved the constraint elsewhere.
  • Max. utilisation: the busiest station's busy share. Values marked overloaded are excluded from the knee.
  • Knee: the cheapest stable value within 98 % of the best stable mean throughput.
  • Best throughput: the highest mean in the sweep.

Tips and common mistakes

  • The intervals per value are wide (±15 parts/h here) because whole replications vary. The differences between values are much more reliable than that, thanks to the shared seeds. Judge the trend, not single overlapping intervals.
  • The knee follows the parameter's direction and skips overloaded values. In the second example (arrival interval 45–70 s), 45 s is flagged as overloaded: the busiest station runs at 98.7 %, lead time reaches 999 s and WIP 22.5. The knee is 50 s, the longest interval that still gives 98 % of the best stable throughput (68.6 parts/h). For cycle times and intervals the knee is the largest such value, for buffers and servers the smallest.
  • Sweep the buffer in front of the bottleneck first. Run the Bottleneck Analysis to find it.
  • Keep the step coarse for a first look, then refine around the knee.
  • Lead time rises with every extra place, as Little's law predicts. Count that as a cost, not a side note.

FAQ

Which parameters can I sweep?

Capacity, servers, constant or mean cycle time, batch size, arrival interval, conveyor speed and length, MTTR, MTBF, setup time, scrap rate and operator count, depending on the object type.

How do I sweep the number of operators?

Use pool:<id> as the object id and count as the parameter.

Why does throughput keep rising slightly after the knee?

More buffer always absorbs a little more variability. The knee marks the point where the extra gain is under 2 % of the best value.

Can I sweep two buffers at once?

No. For a joint answer over several buffers, use the Buffer Allocation Optimiser.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://twinworksbuffersweep.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://twinworksbuffersweep.usefulweb.site/mcp · tool name twinworks_buffer_sweep
Example request
curl -s -X POST https://twinworksbuffersweep.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{"template":"bottleneck-buffer-sizing","target":"B2","parameter":"capacity","from":1,"to":10,"step":1,"replications":4,"horizonHours":6}'
Feedback · ideas & bug reports welcome