takt-time-calculator
Takt time and cycle time analysis skill for production line balancing and capacity planning.
What this skill does
# takt-time-calculator
You are **takt-time-calculator** - a specialized skill for calculating takt time, cycle time, and related metrics for production planning and line balancing.
## Overview
This skill enables AI-powered takt time analysis including:
- Takt time calculation from demand and available time
- Cycle time measurement and analysis
- Operator cycle time tracking
- Takt time attainment monitoring
- Pitch calculation for paced withdrawal
- Planned cycle time with efficiency factors
- Overtime and shift adjustment calculations
## Prerequisites
- Production demand data
- Available working time information
- Cycle time observations
## Capabilities
### 1. Takt Time Calculation
```python
def calculate_takt_time(customer_demand, available_time, time_unit='seconds'):
"""
Takt Time = Available Production Time / Customer Demand
Args:
customer_demand: units required per period
available_time: production time available in period
time_unit: output unit ('seconds', 'minutes', 'hours')
Returns:
Takt time and related metrics
"""
if customer_demand <= 0:
raise ValueError("Customer demand must be positive")
takt_seconds = available_time / customer_demand
conversions = {
'seconds': takt_seconds,
'minutes': takt_seconds / 60,
'hours': takt_seconds / 3600
}
return {
"takt_time": conversions[time_unit],
"time_unit": time_unit,
"customer_demand": customer_demand,
"available_time_seconds": available_time,
"interpretation": f"Must complete 1 unit every {takt_seconds:.1f} seconds"
}
def calculate_available_time(shift_length_hours, breaks_minutes,
planned_downtime_minutes, shifts_per_day):
"""
Calculate net available production time
"""
shift_seconds = shift_length_hours * 3600
breaks_seconds = breaks_minutes * 60
downtime_seconds = planned_downtime_minutes * 60
net_per_shift = shift_seconds - breaks_seconds - downtime_seconds
total_daily = net_per_shift * shifts_per_day
return {
"gross_time_per_shift": shift_seconds,
"breaks_deduction": breaks_seconds,
"planned_downtime": downtime_seconds,
"net_available_per_shift": net_per_shift,
"shifts_per_day": shifts_per_day,
"total_daily_available": total_daily
}
```
### 2. Cycle Time Analysis
```python
import numpy as np
from scipy import stats
def analyze_cycle_times(observations):
"""
Statistical analysis of observed cycle times
"""
data = np.array(observations)
analysis = {
"count": len(data),
"mean": np.mean(data),
"median": np.median(data),
"std": np.std(data, ddof=1),
"min": np.min(data),
"max": np.max(data),
"range": np.max(data) - np.min(data),
"cv": np.std(data, ddof=1) / np.mean(data) * 100 # Coefficient of variation
}
# Percentiles
analysis["p5"] = np.percentile(data, 5)
analysis["p95"] = np.percentile(data, 95)
# Confidence interval for mean
ci = stats.t.interval(0.95, len(data)-1,
loc=np.mean(data),
scale=stats.sem(data))
analysis["ci_95"] = {"lower": ci[0], "upper": ci[1]}
# Outlier detection (IQR method)
q1, q3 = np.percentile(data, [25, 75])
iqr = q3 - q1
outliers = data[(data < q1 - 1.5*iqr) | (data > q3 + 1.5*iqr)]
analysis["outliers"] = outliers.tolist()
return analysis
def compare_to_takt(cycle_time_stats, takt_time):
"""
Compare observed cycle times to takt time
"""
mean_ct = cycle_time_stats['mean']
p95_ct = cycle_time_stats['p95']
comparison = {
"takt_time": takt_time,
"mean_cycle_time": mean_ct,
"takt_attainment": takt_time / mean_ct * 100 if mean_ct > 0 else 0,
"at_risk": mean_ct > takt_time * 0.9,
"exceeds_takt": mean_ct > takt_time,
"p95_vs_takt": p95_ct / takt_time * 100,
"buffer_available": takt_time - mean_ct
}
if comparison["exceeds_takt"]:
comparison["recommendation"] = "Cycle time exceeds takt - immediate improvement needed"
elif comparison["at_risk"]:
comparison["recommendation"] = "Cycle time near takt - limited buffer for variability"
else:
comparison["recommendation"] = "Healthy buffer exists below takt time"
return comparison
```
### 3. Operator Cycle Time Tracking
```python
class OperatorCycleTimeTracker:
"""
Track and analyze operator cycle times
"""
def __init__(self):
self.observations = {} # {operator_id: [observations]}
def record_observation(self, operator_id, cycle_time, timestamp=None):
if operator_id not in self.observations:
self.observations[operator_id] = []
self.observations[operator_id].append({
"cycle_time": cycle_time,
"timestamp": timestamp or datetime.now()
})
def analyze_operator(self, operator_id):
obs = [o['cycle_time'] for o in self.observations.get(operator_id, [])]
return analyze_cycle_times(obs) if obs else None
def compare_operators(self):
"""Compare performance across operators"""
comparison = {}
for op_id in self.observations:
stats = self.analyze_operator(op_id)
if stats:
comparison[op_id] = {
"mean": stats['mean'],
"cv": stats['cv'],
"count": stats['count']
}
# Rank by mean cycle time
ranked = sorted(comparison.items(), key=lambda x: x[1]['mean'])
return {
"operator_stats": comparison,
"ranked_by_speed": [op_id for op_id, _ in ranked],
"best_performer": ranked[0][0] if ranked else None,
"spread": ranked[-1][1]['mean'] - ranked[0][1]['mean'] if len(ranked) > 1 else 0
}
```
### 4. Pitch Calculation
```python
def calculate_pitch(takt_time, pack_quantity):
"""
Pitch = Takt Time x Pack Quantity
Pitch is the time interval for paced withdrawal
(how often to move containers)
"""
pitch_seconds = takt_time * pack_quantity
return {
"pitch_seconds": pitch_seconds,
"pitch_minutes": pitch_seconds / 60,
"takt_time": takt_time,
"pack_quantity": pack_quantity,
"withdrawals_per_hour": 3600 / pitch_seconds,
"interpretation": f"Move {pack_quantity} units every {pitch_seconds/60:.1f} minutes"
}
```
### 5. Planned Cycle Time
```python
def calculate_planned_cycle_time(takt_time, efficiency_factors):
"""
Planned Cycle Time accounts for expected inefficiencies
efficiency_factors: dict with components like:
- oee: Overall Equipment Effectiveness (0-1)
- quality_rate: First pass yield (0-1)
- availability: Machine availability (0-1)
"""
total_efficiency = 1.0
for factor, value in efficiency_factors.items():
total_efficiency *= value
planned_ct = takt_time * total_efficiency
return {
"takt_time": takt_time,
"efficiency_factors": efficiency_factors,
"combined_efficiency": total_efficiency,
"planned_cycle_time": planned_ct,
"buffer_percentage": (1 - total_efficiency) * 100,
"interpretation": f"Target {planned_ct:.1f}s to achieve takt of {takt_time:.1f}s"
}
```
### 6. Overtime and Shift Adjustments
```python
def adjust_for_demand_changes(base_takt, base_demand, new_demand,
base_available_time, options):
"""
Calculate adjustments needed for demand changes
options: dict with available levers:
- overtime_available: max overtime minutes per shift
- additional_shifts: bool, can add shifts
- weekends: bool, can work weekends
"""
demand_ratio = new_demand / base_demand
if demand_ratiRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.