Sewing line efficiency calculator for garment factories.
Calculates the industry-standard SAM-based efficiency metric, target output, required worker count, and line balance / bottleneck analysis. Built and used in production by Scan ERP.
pip install garment-line-efficiencyEfficiency % = (Output × SAM) / (Workers × Hours × 60) × 100
Where:
- Output = pieces produced
- SAM = Standard Allowed Minutes per garment (a.k.a. SMV)
- Workers = number of operators on the line
- Hours = working hours
Example: 25 workers × 8 hours = 12,000 available minutes. Produced 200 pieces of a SAM-15 garment = 3,000 minutes earned. Efficiency = 25%.
from garment_line_efficiency import (
calculate_efficiency,
calculate_target_output,
calculate_required_workers,
calculate_line_balance,
classify_efficiency,
)
# Basic efficiency
calculate_efficiency(output=200, sam=15, workers=25, hours=8)
# → 25.0
# Target output for a desired efficiency
calculate_target_output(efficiency=50, sam=15, workers=25, hours=8)
# → 400.0
# Workers needed to hit a target
calculate_required_workers(target_output=500, sam=15, efficiency=60, hours=8)
# → 26.0417
# Line balance / bottleneck
calculate_line_balance([
{"operation": "Shoulder join", "sam": 0.5},
{"operation": "Sleeve attach", "sam": 0.8},
{"operation": "Side seam", "sam": 0.6},
{"operation": "Hem", "sam": 0.4},
])
# → {"bottleneck": "Sleeve attach", "max_sam": 0.8, "avg_sam": 0.575,
# "balance_ratio": 71.875, "total_sam": 2.3, "operation_count": 4}
# Classify against industry benchmarks
classify_efficiency(50) # → 'AVERAGE'
classify_efficiency(70) # → 'EXCELLENT'
classify_efficiency(80) # → 'WORLD_CLASS'| Efficiency % | Classification |
|---|---|
| < 35% | BELOW_STANDARD |
| 35–50% | AVERAGE (typical for Bangladesh / India / Nepal) |
| 51–65% | GOOD |
| 66–75% | EXCELLENT |
| > 75% | WORLD_CLASS |
- garment-smv-calculator — SMV / SAM calculation
- garment-piece-rate — piece-rate payment
- garment-dhu-calculator — DHU quality metric
- garment-aql-calculator — ISO 2859-1 AQL sampling
MIT © Santosh Rijal / Scan ERP