Inspection queue capacity
Executed discrete-event study using synthetic inspection workloads.
Reference results
| Scenario | Completed / shift | Turned away / shift | Unfinished / shift | Mean shift p95 wait (min) |
|---|---|---|---|---|
| 1 inspector / WIP 8 / FIFO | 188.4 [184.4, 192.3] | 59.9 [55.5, 64.4] | 4.6 [3.9, 5.3] | 32.2 [30.9, 33.4] |
| 1 inspector / WIP 24 / FIFO | 196.0 [191.8, 200.2] | 38.1 [33.4, 42.9] | 18.8 [17.2, 20.4] | 76.5 [72.5, 80.5] |
| 2 inspectors / WIP 8 / FIFO | 239.0 [233.4, 244.7] | 12.0 [10.1, 14.0] | 1.9 [1.4, 2.3] | 11.8 [10.9, 12.8] |
| 2 inspectors / WIP 24 / FIFO | 251.0 [244.7, 257.3] | 0.1 [-0.1, 0.2] | 1.9 [1.4, 2.3] | 19.4 [17.7, 21.2] |
| 2 inspectors / WIP 24 / SPT | 251.1 [244.8, 257.4] | 0.0 [0.0, 0.0] | 1.9 [1.4, 2.3] | 17.4 [15.2, 19.6] |
For the reference inputs, one inspector with WIP 8 completes 188.4 jobs per shift and turns away 59.9. Increasing only the WIP limit to 24 changes those means to 196.0 and 38.1; the completed-job p95 wait rises from 32.2 to 76.5 minutes.
Two inspectors with WIP 8 complete 239.0 jobs per shift and turn away 12.0. WIP 24 with the same staffing completes 251.0 and turns away 0.1. The second inspector changes service capacity; the larger buffer only absorbs work already offered.
The conditional operating choice is two inspectors with FIFO and a WIP cap chosen against the cost of upstream refusal and available floor space. Use WIP 8 as the smaller-space option and compare WIP 24 if upstream work cannot be diverted. This study does not price labor, floor space or lost orders, so it does not establish the economic optimum.
SPT uses each job class's expected service duration, never its actual sampled duration. It can favor quick work while detailed inspections wait; class-replications.csv exposes that tradeoff. Priority rules need a maximum-wait or due-date constraint before use on customer work.
Inputs and operating rules
- All inputs are synthetic. A shift starts empty, lasts exactly 28,800 seconds, has no warm-up removal, and stops without draining the queue. This is a terminating-shift experiment, not a steady-state capacity estimate.
- Arrivals follow a piecewise Poisson process: 30/hour except a 20-minute, 70/hour burst before the first break. Job classes are 70% quick and 30% detailed; their means are 77 and 187 seconds. Within-class service time is lognormal with CV 0.45.
- After each of the first two visits a job returns with probability 0.12, waits 60 seconds externally to the inspector, and retains its admitted WIP slot. Every job exits after its third visit. Exiting means inspection completed, not an assumed quality acceptance; scrap and defect disposition are outside the model.
- Every inspector takes 15, 30 and 15 minutes of breaks. A busy inspector finishes the current visit first, then takes the entire deferred break. The second inspector's scheduled breaks are offset by 15 minutes.
- Capacity counts running, waiting and rework-delay jobs together. A new arrival at the limit is turned away and counted; it does not vanish and it does not re-enter later. No upstream storage, retry system or downstream machine is simulated.
- Each of 40 seeds generates its full arrival/service/rework stream before any policy runs. Policies under the same input condition receive identical jobs. The four input conditions are separate experiments, with 800 total scenario-shift runs.
One shift in detail
Input sensitivity
Statistical method
Each interval is the sample mean across 40 independent shifts plus or minus t(0.975, 39) times the sample standard deviation divided by sqrt(40). These are nominal 95% Monte Carlo confidence intervals for scenario means, not prediction intervals and not uncertainty bounds for the synthetic input assumptions. They are not adjusted for multiple comparisons.
Waiting-time rows summarize the mean of each shift's empirical 95th percentile. They are not a pooled customer-level percentile or a confidence interval for one common distribution quantile. Completed-job waiting can be biased downward when long jobs remain unfinished; the separate unfinished count, observed all-admitted waiting and class-level files remain part of the comparison.
Paired differences subtract the one-inspector/WIP-8/FIFO result for the same seed before calculating the interval. Lower-to-upper interval bounds and the unrounded values are in the CSV files.
A nominal t interval can extend below zero for rare count outcomes; the raw bounds are retained rather than silently clipped. When all observed counts are zero, its zero width is not evidence of zero risk. The separate rejection-risk-ci.csv gives exact binomial (Clopper-Pearson) 95% intervals for the probability that a shift turns away at least one arrival. With 0 of 40 such shifts, the upper bound is 8.81%.
The M/M/1 benchmark uses exponential arrivals and service with lambda=0.6, mu=1. After removing the first 5,000 completed jobs, the simulated mean waiting time must lie within 6% of the independent analytical value 1.5. This warm-up applies only to that benchmark, not to the shift experiment.
| Scenario | Shifts with refusal | Probability interval |
|---|---|---|
| 1 inspector / WIP 8 / FIFO | 40 / 40 | 91.19% to 100.00% |
| 1 inspector / WIP 24 / FIFO | 40 / 40 | 91.19% to 100.00% |
| 2 inspectors / WIP 8 / FIFO | 39 / 40 | 86.84% to 99.94% |
| 2 inspectors / WIP 24 / FIFO | 1 / 40 | 0.06% to 13.16% |
| 2 inspectors / WIP 24 / SPT | 0 / 40 | 0.00% to 8.81% |
Verification
20 tests passed. The executed study adds conservation and area checks to every one of the 800 runs. Maximum job-balance residual: 0; maximum waiting-area discrepancy: 6.4e-10 seconds; maximum WIP-area discrepancy: 9.31e-10 seconds.
Files and reproduction
Run instructions · Scenario means and intervals · Paired differences · All replications · Time-study plan
python -m pip install -r requirements.txt python run.py python -m unittest -v
Limits
- No factory observations or staffing trial were used. The virtual operating trial adds batch arrivals and staff absence. Fatigue, learning, inspection errors, equipment failures and space geometry remain outside the model.
- Turned-away work is an upstream burden, not a throughput improvement. Economic or whole-line bottleneck conclusions need an extended system boundary and observed costs.
- Completed-job tail waits are censored by the end of the shift; unfinished work is reported explicitly. The added virtual trial separately follows up to two hours of clearance. Neither study estimates overnight carryover or a long-run stationary distribution.
Virtual validation
Executed synthetic and theoretical run-through. The report includes cases, acceptance results and model boundaries.