pm4py.stats.get_cycle_time#
- pm4py.stats.get_cycle_time(log: EventLog | DataFrame, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') float [source]#
Calculates the cycle time of the event log.
Cycle time is defined as the average time between the completion of units.
Example: In a manufacturing facility producing 100 units in a 40-hour week, the average throughput rate is 1 unit per 0.4 hours (24 minutes per unit). Therefore, the cycle time is 24 minutes on average.
- Return type:
float
- Parameters:
log – Event log (EventLog or pandas DataFrame).
activity_key (
str
) – Attribute to be used for the activity.timestamp_key (
str
) – Attribute to be used for the timestamp.case_id_key (
str
) – Attribute to be used as the case identifier.
- Returns:
The cycle time as a float.
import pm4py cycle_time = pm4py.get_cycle_time( dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp' )