Finding Hidden Queues in Operations
Context: Queue theory applies everywhere, but most businesses don't recognize their queues. Here's how we identify and model hidden queuing systems.
The Universal Queue Pattern
Every business process has:
- Arrivals: Work that needs doing
- Service: The doing of the work
- Waiting: The time between arrival and service
The challenge: these elements are often invisible or unnamed.
Common Hidden Queues
The Email Inbox Queue
import numpy as np
from collections import defaultdict
def model_email_queue(inbox_data):
arrivals = inbox_data['received_times']
responses = inbox_data['response_times']
avg_wait = np.mean(responses - arrivals)
queue_length = len([e for e in inbox_data if not e['responded']])
observation_period = max(arrivals) - min(arrivals)
arrival_rate = len(arrivals) / observation_period
implied_queue_length = arrival_rate * avg_wait
return {
'actual_queue': queue_length,
'implied_queue': implied_queue_length,
'queue_health': 'stable' if abs(queue_length - implied_queue_length) < 0.1 else 'unstable'
}
The Approval Chain Queue
def trace_approval_flow(approval_logs):
stages = defaultdict(list)
for item in approval_logs:
stages[item['approver']].append({
'wait_time': item['approved_at'] - item['submitted_at'],
'processing_time': item['decided_at'] - item['reviewed_at']
})
bottlenecks = []
threshold = 24 * 3600
for approver, times in stages.items():
avg_wait = np.mean([t['wait_time'] for t in times])
if avg_wait > threshold:
bottlenecks.append(approver)
return bottlenecks
Optimization Without Naming
The key insight: You can optimize queues without ever calling them queues.
Pattern: Batch Processing
def implement_batching(work_items):
batches = defaultdict(list)
for item in work_items:
batches[item['type']].append(item)
setup_time = {'type_a': 10, 'type_b': 20, 'type_c': 5}
for batch_type in sorted(batches.keys(), key=lambda x: setup_time.get(x, 0)):
process_batch(batches[batch_type])
Real-World Applications
Pattern 1: The Support Ticket Inbox
What looks like responding to customers is actually running a priority queue with variable service times. The fastest optimization is often triaging by expected resolution time.
Pattern 2: The Production Schedule
What looks like planning the week is actually solving a job-shop scheduling problem. The morning spreadsheet is a human queue optimizer running daily.
Pattern 3: The Decision Pipeline
What looks like getting approval is actually routing through a multi-server queue where each server has different capacity and availability. The bottleneck is rarely the decision itself.
Every operation has queues. The ones you can see are already being managed. The ones you cannot see are where the hours disappear.