API & MCP

Everything a person can do on Twinworks Line Capacity Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Twinworks Line Capacity Calculator

Analytic capacity of a serial production line: takt time from demand and available time, theoretical and effective capacity of every station with parallel machines and batch sizes, OEE = availability × performance × quality with downstream scrap, the bottleneck with and without losses, load at demand, Little’s law lead time for your work in process and the Factory Physics best-case, practical-worst-case and worst-case benchmarks. Enter stations or read them from a Twinworks model.

Inputs of Twinworks Line Capacity Calculator
FieldTypeDefaultDescription
stationstable—Stations in flow order. Cycle time per unit and machine (for a batch station: per batch). Availability, performance and quality in percent (empty = 100 %).
templateselect (, three-station-line, line-with-failures, assembly-two-feeders, job-shop-routings, bottleneck-buffer-sizing, conveyor-packaging, mm1-validation, shared-forklifts, plc-control)—Or read the stations from a template
modeltextarea—Or a Twinworks model JSON. A .twinworks.json project or model; the serial line from its source to its sink is read (mean cycle times, servers, MTBF/MTTR availability, ideal cycle time, scrap).
availableMinutesnumber450Available time per period. Net production time, e.g. a 8 h shift minus 30 min breaks = 450 min.
demandnumber—Demand per period. Optional: gives the takt time and the load at demand.
wipnumber—Work in process. Optional: units in the line for Little’s law (lead time = WIP ÷ throughput).

Example request

Three stations, one with two parallel machines, OEE losses, 400 units per 450-minute shift

curl -X POST https://twinworkslinecapacity.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"stations":[{"name":"Saw","cycle":40,"availability":95,"performance":95,"quality":99},{"name":"Mill","cycle":96,"parallel":2,"availability":85,"performance":90,"quality":98},{"name":"Deburr","cycle":38,"availability":98,"performance":95,"quality":100}],"availableMinutes":450,"demand":400,"wip":20}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "twinworks-line-capacity": { "type": "http", "url": "https://twinworkslinecapacity.usefulweb.app/mcp" }
  }
}