# Twinworks Bottleneck Analysis > Find the constraint of a production line and test fixes: ranked bottlenecks with what-if gains. Ranks the stations of a Twinworks factory model by how often they constrain the line (active-period method: sole and shifting bottleneck shares), explains the dominant loss (working, breakdowns, setups, waiting for operators) and simulates typical improvements of the top bottleneck — an extra server, a 10 % faster cycle, faster repairs, shorter setups, more operators or a bigger buffer — with paired confidence intervals. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://twinworksbottleneckanalysis.usefulweb.site/ (interactive tool at https://twinworksbottleneckanalysis.usefulweb.site/tool) - JSON API: POST https://twinworksbottleneckanalysis.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://twinworksbottleneckanalysis.usefulweb.site/api/v1/tool) - OpenAPI: https://twinworksbottleneckanalysis.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://twinworksbottleneckanalysis.usefulweb.site/mcp - tool `twinworks_bottleneck_analysis` ## Inputs - model (textarea): Model or project JSON - 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. - template (select): Or start from a template - replications (integer): Replications - horizonHours (number): Run length per replication - Overrides the model setting. - whatIf (boolean): Simulate improvement options for the top bottleneck ## Method - Each replication records, per station, every active period (uninterrupted time working, in setup, under repair/maintenance or waiting for an operator; starved and blocked times end a period). - At every instant the station with the longest current active period is the bottleneck. Where the periods of consecutive bottlenecks overlap, both are shifting bottlenecks; otherwise the station is the sole bottleneck (Roser, Nakano & Tanaka 2001). - Stations are ranked by sole + shifting share (averaged over the window of replication 1, votes = how often a station was the top bottleneck across replications); ties are broken by active percentage. - What-if options for the top station are simulated with the same seeds as the baseline (common random numbers); the gain interval is a paired Student-t interval of the throughput differences. ## Limits - Improvement options are illustrative single changes; real fixes have costs and side effects that the model may not capture.