Skip to content

ValueTraceabilityEvents¤

Trace a shared identifier across multiple stations (serial number, order ID, batch code).

Module: ts_shape.events.production.order_traceability Guide: Traceability Guide


When to Use¤

Use to track parts, orders, or batches as they move through production stations. Each station has its own UUID signal carrying the current identifier being processed. This module correlates those signals into a unified timeline showing where each item has been and how long it spent at each station.


Quick Example¤

from ts_shape.events.production.order_traceability import ValueTraceabilityEvents

tracer = ValueTraceabilityEvents(
    df=production_df,
    station_uuids={
        "cutting": "station-uuid-001",
        "welding": "station-uuid-002",
        "painting": "station-uuid-003",
        "assembly": "station-uuid-004",
    }
)

# Build full timeline per identifier per station
timeline = tracer.build_timeline()

# End-to-end lead time per identifier
lead_times = tracer.lead_time()

# Where is each item right now?
status = tracer.current_status()

Key Methods¤

Method Purpose Returns
build_timeline() Full timeline per identifier per station DataFrame
lead_time() End-to-end lead time per identifier DataFrame
current_status() Last known station for each identifier DataFrame
station_dwell_statistics() Dwell time statistics per station DataFrame

Tips & Notes¤

Use consistent identifier formats

Ensure all stations emit the same identifier format (e.g., zero-padded serial numbers). Mismatched formats will cause the tracer to treat "Order-42" and "Order-042" as different items.

Related modules


See Also¤