The problem with "Average" time
When exploring the technical foundations of Sri Lanka's massive garment manufacturing industry for my final-year SLIIT research project, one critical inefficiency kept surfacing: line balancing.
Garment factories run on precise margins. A shirt goes through dozens of consecutive workstations (cutting, stitching collars, attaching sleeves). Historically, industrial engineers balance these lines using deterministic data calculating the average Standard Minute Value (SMV) for a task and assigning workers accordingly to meet a specific target cycle time.
But humans aren't machines. Operator fatigue, thread breaks, and fabric handling complexities mean that a task taking 45 seconds on average might take 30 seconds on one attempt and 70 seconds on another. When you string 40 of these highly variable tasks together, deterministic averages fail. A bottleneck forms rapidly, work-in-progress (WIP) piles up, and the entire production line stalls.
Enter StitchFlow
I developed StitchFlow to move industrial engineering from reactive troubleshooting to proactive prediction. Instead of waiting for a floor manager to notice a pile of unfinished garments, StitchFlow ingests real-time production data and calculates where a bottleneck is mathematically guaranteed to happen next.
The core novelty of the system lies in replacing static SMV values with stochastic line-balancing algorithms. We stop pretending time is a constant and start treating it as a probability distribution.
“You cannot manage a dynamic manufacturing environment with static mathematics. Time on the factory floor is a probability, not a promise.”
The Mathematical Engine
In a stochastic model, the processing time for a specific task i isn't a fixed number. It is a random variable, ti, which we model using a Normal Distribution with a specific mean (μi) and variance (σi²).
If a specific workstation k is assigned a set of tasks (let's call that set Sk), the total time it takes for that workstation to finish its piece is Wk:
Because the individual tasks are normally distributed, the total workstation time is also normally distributed. The mean of the workstation time is the sum of the task means (Σμi), and the variance is the sum of the task variances (Σσi²).
To detect a bottleneck, StitchFlow calculates the probability that a workstation will exceed the required Cycle Time (C). If this probability crosses a dangerous threshold, the system triggers an alert. The probability function looks like this:
By calculating this continuously using live data feeds from the floor, StitchFlow identifies high-variance workstations that look fine on average, but are mathematically doomed to fail as the shift progresses.
Real-time variance trackingDesigning for the factory floor
As a practicing UI/UX designer, I knew that complex mathematics is entirely useless if the end user can't interpret it in seconds. A production supervisor dealing with the noise and chaos of a garment factory doesn't have time to look at probability density functions or calculate standard deviations.
I built the StitchFlow dashboard with extreme visual restraint. The UI translates the stochastic data into a simple traffic-light heat map across the digital representation of the production line. High variance thresholds instantly highlight a specific workstation in red, alongside a plain-English recommendation (e.g., "Reassign floating operator to Station 12").
The architecture runs cleanly on a local-first philosophy, ensuring that brief interruptions in internet connectivity a common reality on industrial floors don't halt the algorithm's predictive capabilities.
The short version
Relying on averages to manage a dynamic workforce results in unpredictable delays. By leveraging stochastic algorithms, StitchFlow allows factories to embrace variance rather than ignore it, turning raw production data into actionable, real-time operational foresight.

I design and build digital products from Sri Lanka. If you're interested in industrial engineering tech or want to discuss this research, feel free to reach out.
